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 |
---|---|
32 |
|
33 | /** |
34 | * Fires before the administration menu loads in the admin. |
35 | * |
36 | * The hook fires before menus and sub-menus are removed based on user privileges. |
37 | * |
38 | * @private |
39 | * @since 2.2.0 |
40 | */ |
41 | do_action( '_admin_menu' ); |
42 | } |
43 |
|
44 | // Create list of page plugin hook names. |
45 | foreach ( $menu as $menu_page ) { |
46 | if ( false !== $pos = strpos( $menu_page[2], '?' ) ) { |
47 | // Handle post_type=post|page|foo pages. |
48 | $hook_name = substr( $menu_page[2], 0, $pos ); |
49 | $hook_args = substr( $menu_page[2], $pos + 1 ); |
50 | wp_parse_str( $hook_args, $hook_args ); |