← All changes
|
vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
+0
-15
3.10.12
→
3.9.2
View file →
| @@ -283,23 +283,8 @@ | ||
| 283 | 283 | $theme = $folder . '/style.css'; |
| 284 | 284 | $nonce = 'upgrade-theme_' . $theme; |
| 285 | 285 | $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme ); |
| 286 | 286 | |
| 287 | - /** | |
| 288 | - * The rollback will attach a temporary theme for the rollback to the transient. | |
| 289 | - * However, when executing the upgrade for the attached theme we need to change the slug to the original theme slug. | |
| 290 | - * This is because it will use the slug to create a temp folder for the theme used during the upgrade. | |
| 291 | - */ | |
| 292 | - add_filter( | |
| 293 | - 'upgrader_package_options', | |
| 294 | - function( $options ) use ( $folder, $theme ) { | |
| 295 | - if ( isset( $options['hook_extra']['theme'] ) && $options['hook_extra']['theme'] === $theme && isset( $options['hook_extra']['temp_backup']['slug'] ) ) { | |
| 296 | - $options['hook_extra']['temp_backup']['slug'] = $folder; | |
| 297 | - } | |
| 298 | - return $options; | |
| 299 | - } | |
| 300 | - ); | |
| 301 | - | |
| 302 | 287 | $upgrader = new \Theme_Upgrader( new \Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) ); |
| 303 | 288 | $upgrader->upgrade( $theme ); |
| 304 | 289 | delete_transient( $this->product->get_key() . '_warning_rollback' ); |
| 305 | 290 | wp_die( |