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
This commit is contained in:
parent
0f7b30d9c6
commit
e098306abe
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue