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