Ticket #14170: deactivate_plugins.diff
File deactivate_plugins.diff, 1.2 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/plugin.php
512 512 * @since unknown 513 513 * 514 514 * @param string|array $plugins Single plugin or list of plugins to deactivate. 515 * @param bool $silent Optional, default is false. Prevent calling deactivate hook. 515 * @param bool $silent Optional, default is false. Prevent calling deactivate hook. 516 * Used by the updater to internally deactivate plugins, but not notifying them 517 * of the fact, to prevent unexpected output. 516 518 */ 517 519 function deactivate_plugins( $plugins, $silent = false ) { 518 520 $network_current = get_site_option( 'active_sitewide_plugins', array() ); … … 539 541 } 540 542 } 541 543 542 // Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output.543 if ( ! $silent) {544 // Don't trigger if the plugin will still be active on the current blog 545 if ( !$silent && !( $do_network && in_array( $plugin, $current ) ) ) { 544 546 do_action( 'deactivate_' . trim( $plugin ) ); 545 547 do_action( 'deactivated_plugin', trim( $plugin ) ); 546 548 }