Changeset 48397 for trunk/src/wp-admin/includes/class-theme-upgrader.php
- Timestamp:
- 07/07/2020 06:58:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-theme-upgrader.php
r48390 r48397 353 353 wp_clean_themes_cache( $parsed_args['clear_update_cache'] ); 354 354 355 // Ensure any future auto-update failures trigger a failure email by removing the last 356 // failure notification from the list when themes update successfully. 357 $past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() ); 358 359 if ( isset( $past_failure_emails[ $theme ] ) ) { 360 unset( $past_failure_emails[ $theme ] ); 361 update_option( 'auto_plugin_theme_update_emails', $past_failure_emails ); 362 } 363 355 364 return true; 356 365 } … … 480 489 remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ) ); 481 490 491 // Ensure any future auto-update failures trigger a failure email by removing the last 492 // failure notification from the list when themes update successfully. 493 $past_failure_emails = get_option( 'auto_plugin_theme_update_emails', array() ); 494 495 foreach ( $results as $theme => $result ) { 496 // Maintain last failure notification when themes failed to update manually. 497 if ( ! $result || is_wp_error( $result ) || ! isset( $past_failure_emails[ $theme ] ) ) { 498 continue; 499 } 500 501 unset( $past_failure_emails[ $theme ] ); 502 } 503 update_option( 'auto_plugin_theme_update_emails', $past_failure_emails ); 504 482 505 return $results; 483 506 }
Note: See TracChangeset
for help on using the changeset viewer.