Changeset 20525 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 04/19/2012 03:41:29 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r20229 r20525 573 573 * 574 574 * @param string|array $plugins Single plugin or list of plugins to deactivate. 575 * @param mixed $network_wide Whether to deactivate the plugin for all sites in the network. 576 * A value of null (the default) will deactivate plugins for both the site and the network. 575 577 * @param bool $silent Prevent calling deactivation hooks. Default is false. 576 578 */ 577 function deactivate_plugins( $plugins, $silent = false ) {579 function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { 578 580 if ( is_multisite() ) 579 581 $network_current = get_site_option( 'active_sitewide_plugins', array() ); … … 586 588 continue; 587 589 588 $network_ wide =is_plugin_active_for_network( $plugin );590 $network_deactivating = false !== $network_wide && is_plugin_active_for_network( $plugin ); 589 591 590 592 if ( ! $silent ) 591 do_action( 'deactivate_plugin', $plugin, $network_wide ); 592 593 if ( $network_wide ) { 593 do_action( 'deactivate_plugin', $plugin, $network_deactivating ); 594 595 if ( false !== $network_wide ) { 596 if ( ! is_plugin_active_for_network( $plugin ) ) 597 continue; 594 598 $do_network = true; 595 599 unset( $network_current[ $plugin ] ); 596 } else { 600 } 601 602 if ( true !== $network_wide ) { 597 603 $key = array_search( $plugin, $current ); 598 604 if ( false !== $key ) { … … 603 609 604 610 if ( ! $silent ) { 605 do_action( 'deactivate_' . $plugin, $network_ wide);606 do_action( 'deactivated_plugin', $plugin, $network_ wide);611 do_action( 'deactivate_' . $plugin, $network_deactivating ); 612 do_action( 'deactivated_plugin', $plugin, $network_deactivating ); 607 613 } 608 614 }
Note: See TracChangeset
for help on using the changeset viewer.