mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 03:34:33 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@45115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -744,6 +744,12 @@ function switch_theme( $stylesheet ) {
|
||||
$new_theme = wp_get_theme( $stylesheet );
|
||||
$template = $new_theme->get_template();
|
||||
|
||||
if ( wp_is_recovery_mode() ) {
|
||||
$paused_themes = wp_paused_themes();
|
||||
$paused_themes->delete( $old_theme->get_stylesheet() );
|
||||
$paused_themes->delete( $old_theme->get_template() );
|
||||
}
|
||||
|
||||
update_option( 'template', $template );
|
||||
update_option( 'stylesheet', $stylesheet );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user