Changeset 39211 for trunk/src/wp-admin/includes/class-theme-upgrader.php
- Timestamp:
- 11/13/2016 09:52:49 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-theme-upgrader.php
r37432 r39211 202 202 add_filter('upgrader_source_selection', array($this, 'check_package') ); 203 203 add_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'), 10, 3); 204 // Clear cache so wp_update_themes() knows about the new theme. 205 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 ); 204 if ( $parsed_args['clear_update_cache'] ) { 205 // Clear cache so wp_update_themes() knows about the new theme. 206 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 ); 207 } 206 208 207 209 $this->run( array( … … 270 272 add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 271 273 add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 272 // Clear cache so wp_update_themes() knows about the new theme. 273 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 ); 274 if ( $parsed_args['clear_update_cache'] ) { 275 // Clear cache so wp_update_themes() knows about the new theme. 276 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 ); 277 } 274 278 275 279 $this->run( array( … … 330 334 add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 331 335 add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 332 // Clear cache so wp_update_themes() knows about the new theme.333 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );334 336 335 337 $this->skin->header(); … … 395 397 $this->maintenance_mode(false); 396 398 399 // Refresh the Theme Update information 400 wp_clean_themes_cache( $parsed_args['clear_update_cache'] ); 401 397 402 /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ 398 403 do_action( 'upgrader_process_complete', $this, array( … … 408 413 409 414 // Cleanup our hooks, in case something else does a upgrade on this connection. 410 remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );411 415 remove_filter('upgrader_pre_install', array($this, 'current_before')); 412 416 remove_filter('upgrader_post_install', array($this, 'current_after')); 413 417 remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme')); 414 415 // Refresh the Theme Update information416 wp_clean_themes_cache( $parsed_args['clear_update_cache'] );417 418 418 419 return $results;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)