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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
253 | /** |
254 | * Check whether the plugin is active by checking the active_plugins list. |
255 | * |
256 | * @since 2.5.0 |
257 | * |
258 | * @param string $plugin Base plugin path from plugins directory. |
259 | * @return bool True, if in the active plugins list. False, not in the list. |
260 | */ |
261 | function is_plugin_active($plugin) { |
262 | return in_array( $plugin, apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ); |
263 | } |
264 |
|
265 | /** |
266 | * Attempts activation of plugin in a "sandbox" and redirects on success. |
267 | * |
268 | * A plugin that is already activated will not attempt to be activated again. |
269 | * |
270 | * The way it works is by setting the redirection to the error before trying to |
271 | * include the plugin file. If the plugin fails, then the redirection will not |
Line | Code |
470 | if ( $current = get_transient('update_plugins') ) { |
471 | unset( $current->response[ $plugin_file ] ); |
472 | set_transient('update_plugins', $current); |
473 | } |
474 |
|
475 | return true; |
476 | } |
477 |
|
478 | function validate_active_plugins() { |
479 | $check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') ); |
480 |
|
481 | // Sanity check. If the active plugin list is not an array, make it an |
482 | // empty array. |
483 | if ( !is_array($check_plugins) ) { |
484 | update_option('active_plugins', array()); |
485 | return; |
486 | } |
487 |
|
488 | //Invalid is any plugin that is deactivated due to error. |