Skip to content

Commit

Permalink
Correct logic in deactivate_plugins() where network_wide = null. prop…
Browse files Browse the repository at this point in the history
…s SergeyBiryukov. fixes #20497.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Apr 21, 2012
1 parent 0f7b30d commit e098306
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wp-admin/includes/plugin.php
Expand Up @@ -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 ) {
Expand Down

0 comments on commit e098306

Please sign in to comment.