PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.10.12
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.10.12
4.0.9 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 All 150 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php +6 -8 4.0.5 → 3.10.12 View file →
@@ -12,9 +12,8 @@
12 12 namespace ThemeisleSDK\Modules;
13 13
14 14 // Exit if accessed directly.
15 15 use ThemeisleSDK\Common\Abstract_Module;
16 -use ThemeisleSDK\Loader;
17 16 use ThemeisleSDK\Product;
18 17
19 18 if ( ! defined( 'ABSPATH' ) ) {
20 19 exit;
@@ -120,10 +119,10 @@
120 119 $url = $this->get_versions_api_url();
121 120 if ( empty( $url ) ) {
122 121 return [];
123 122 }
124 - $response = function_exists( 'vip_safe_wp_remote_get' )
125 - ? vip_safe_wp_remote_get( $url )
123 + $response = function_exists( 'wp_remote_get_wp_remote_get' )
124 + ? wp_remote_get_wp_remote_get( $url )
126 125 : wp_remote_get( $url ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get
127 126 if ( is_wp_error( $response ) ) {
128 127 return array();
129 128 }
@@ -184,9 +183,9 @@
184 183 $version = $this->get_rollback();
185 184 if ( empty( $version ) ) {
186 185 return $links;
187 186 }
188 - $links[] = '<a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) . '">' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', Loader::$labels['rollback']['cta'] ), $version['version'] ) . '</a>';
187 + $links[] = '<a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) . '">' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', 'Rollback to v%s' ), $version['version'] ) . '</a>';
189 188
190 189 return $links;
191 190 }
192 191
@@ -291,13 +290,12 @@
291 290 * This is because it will use the slug to create a temp folder for the theme used during the upgrade.
292 291 */
293 292 add_filter(
294 293 'upgrader_package_options',
295 - function ( $options ) use ( $folder, $theme ) {
294 + function( $options ) use ( $folder, $theme ) {
296 295 if ( isset( $options['hook_extra']['theme'] ) && $options['hook_extra']['theme'] === $theme && isset( $options['hook_extra']['temp_backup']['slug'] ) ) {
297 296 $options['hook_extra']['temp_backup']['slug'] = $folder;
298 297 }
299 -
300 298 return $options;
301 299 }
302 300 );
303 301
@@ -394,10 +392,10 @@
394 392 /**
395 393 * Fires after the option has been updated.
396 394 *
397 395 * @param mixed $old_value The old option value.
398 - * @param mixed $value The new option value.
399 - * @param string $option Option name.
396 + * @param mixed $value The new option value.
397 + * @param string $option Option name.
400 398 */
401 399 public function update_active_plugins_action( $old_value, $value, $option ) {
402 400 delete_site_transient( 'update_plugins' );
403 401 wp_cache_delete( 'plugins', 'plugins' );