Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: deactivate_plugin

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
518      $network_current = get_site_option( 'active_sitewide_plugins', array() );
519      $current = get_option( 'active_plugins', array() );
520      $do_blog = $do_network = false;
521
522      foreach ( (array) $plugins as $plugin ) {
523           $plugin = plugin_basename($plugin);
524           if ( ! is_plugin_active($plugin) )
525                continue;
526           if ( ! $silent )
527                do_action( 'deactivate_plugin', trim( $plugin ) );
528
529           if ( is_plugin_active_for_network($plugin) ) {
530                // Deactivate network wide
531                $do_network = true;
532                unset( $network_current[ $plugin ] );
533           } else {
534                // Deactivate for this blog only
535                $key = array_search( $plugin, (array) $current );
536                if ( false !== $key ) {