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