Make WordPress Core


Ignore:
Timestamp:
04/05/2019 03:32:31 PM (5 years ago)
Author:
flixos90
Message:

Bootstrap/Load: Remove extension from the list of paused extensions when it is deactivated.

With this change, fatal errors recorded before a plugin was deactivated or a theme was switched away from do not persist. This ensures that re-enabling it re-checks for fatal errors correctly.

Props aandrewdixon, dhanukanuwan, henrywright.
Fixes #46812.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r45089 r45115  
    744744    $new_theme = wp_get_theme( $stylesheet );
    745745    $template  = $new_theme->get_template();
     746
     747    if ( wp_is_recovery_mode() ) {
     748        $paused_themes = wp_paused_themes();
     749        $paused_themes->delete( $old_theme->get_stylesheet() );
     750        $paused_themes->delete( $old_theme->get_template() );
     751    }
    746752
    747753    update_option( 'template', $template );
Note: See TracChangeset for help on using the changeset viewer.