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 |
---|---|
78 | check_admin_referer('plugin-activation-error_' . $plugin); |
79 |
|
80 | $valid = validate_plugin($plugin); |
81 | if ( is_wp_error($valid) ) |
82 | wp_die($valid); |
83 |
|
84 | error_reporting( E_ALL ^ E_NOTICE ); |
85 | @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. |
86 | include(WP_PLUGIN_DIR . '/' . $plugin); |
87 | do_action('activate_' . $plugin); |
88 | exit; |
89 | break; |
90 | case 'deactivate': |
91 | check_admin_referer('deactivate-plugin_' . $plugin); |
92 | deactivate_plugins($plugin); |
93 | update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated')); |
94 | wp_redirect("plugins.php?deactivate=true&plugin_status=$status&paged=$page"); |
95 | exit; |
96 | break; |