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
64 $submenu['options-general.php'][35] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
65 $submenu['options-general.php'][40] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php');
67 $submenu['plugins.php'][5] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
68 $submenu['plugins.php'][10] = array(__('Plugin Editor'), 'edit_plugins', 'plugin-editor.php');
70 $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
71 $submenu['themes.php'][10] = array(__('Theme Editor'), 'edit_themes', 'theme-editor.php');
73 do_action('_admin_menu');
75 // Create list of page plugin hook names.
76 foreach ($menu as $menu_page) {
77      $admin_page_hooks[$menu_page[2]] = sanitize_title($menu_page[0]);
78 }
80 $_wp_submenu_nopriv = array();
81 $_wp_menu_nopriv = array();
82 // Loop over submenus and remove pages for which the user does not have privs.