WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
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 ) { |