From e098306abe5ed1732a639ddbb075d12f84b1a36b Mon Sep 17 00:00:00 2001 From: nacin Date: Sat, 21 Apr 2012 00:45:53 +0000 Subject: [PATCH] Correct logic in deactivate_plugins() where network_wide = null. props SergeyBiryukov. fixes #20497. git-svn-id: http://svn.automattic.com/wordpress/trunk@20555 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 98b6136e41..89ebdea83d 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -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 ) {