Correct logic in deactivate_plugins() where network_wide = null. props SergeyBiryukov. fixes #20497.

git-svn-id: https://develop.svn.wordpress.org/trunk@20555 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-04-21 00:45:53 +00:00
parent c401b0b61e
commit 40b676037c

View File

@ -593,10 +593,12 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
do_action( 'deactivate_plugin', $plugin, $network_deactivating );
if ( false !== $network_wide ) {
if ( ! is_plugin_active_for_network( $plugin ) )
if ( is_plugin_active_for_network( $plugin ) ) {
$do_network = true;
unset( $network_current[ $plugin ] );
} elseif ( $network_wide ) {
continue;
$do_network = true;
unset( $network_current[ $plugin ] );
}
}
if ( true !== $network_wide ) {