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 |
---|---|
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'); |
66 |
|
67 | $submenu['plugins.php'][5] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); |
68 | $submenu['plugins.php'][10] = array(__('Plugin Editor'), 'edit_plugins', 'plugin-editor.php'); |
69 |
|
70 | $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); |
71 | $submenu['themes.php'][10] = array(__('Theme Editor'), 'edit_themes', 'theme-editor.php'); |
72 |
|
73 | do_action('_admin_menu'); |
74 |
|
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 | } |
79 |
|
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. |