Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: _admin_menu

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
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 );