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:
Felix Arntz
2019-04-05 15:32:31 +00:00
parent 7f6adbb345
commit dca58d725e
2 changed files with 11 additions and 0 deletions

View File

@@ -768,6 +768,11 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
}
}
if ( $do_blog && wp_is_recovery_mode() ) {
list( $extension ) = explode( '/', $plugin );
wp_paused_plugins()->delete( $extension );
}
if ( ! $silent ) {
/**
* Fires as a specific plugin is being deactivated.