PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.5.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.5.0
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php +19 -2 3.1.33.5.0 View file →
@@ -36,9 +36,9 @@
36 36 * @param Product $product Product data.
37 37 *
38 38 * @return bool Should load module?
39 39 */
40 - public abstract function can_load( $product );
40 + abstract public function can_load( $product );
41 41
42 42 /**
43 43 * Bootstrap the module.
44 44 *
@@ -43,9 +43,9 @@
43 43 * Bootstrap the module.
44 44 *
45 45 * @param Product $product Product object.
46 46 */
47 - public abstract function load( $product );
47 + abstract public function load( $product );
48 48
49 49 /**
50 50 * Check if the product is from partner.
51 51 *
@@ -61,6 +61,23 @@
61 61 }
62 62 }
63 63
64 64 return array_key_exists( $product->get_slug(), Module_Factory::$slugs );
65 + }
66 +
67 + /**
68 + * Wrapper for wp_remote_get on VIP environments.
69 + *
70 + * @param string $url Url to check.
71 + * @param array $args Option params.
72 + *
73 + * @return array|\WP_Error
74 + */
75 + public function safe_get( $url, $args = array() ) {
76 + return function_exists( 'vip_safe_wp_remote_get' )
77 + ? vip_safe_wp_remote_get( $url )
78 + : wp_remote_get( //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get, Already used.
79 + $url,
80 + $args
81 + );
65 82 }
66 83 }