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 |
|---|---|
| 117 | $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group |
| 118 | |
| 119 | $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); |
| 120 | |
| 121 | // Back-compat for old top-levels |
| 122 | $_wp_real_parent_file['post.php'] = 'edit.php'; |
| 123 | $_wp_real_parent_file['post-new.php'] = 'edit.php'; |
| 124 | $_wp_real_parent_file['page-new.php'] = 'edit-pages.php'; |
| 125 | |
| 126 | do_action('_admin_menu'); |
| 127 | |
| 128 | // Create list of page plugin hook names. |
| 129 | foreach ($menu as $menu_page) { |
| 130 | $hook_name = sanitize_title(basename($menu_page[2], '.php')); |
| 131 | |
| 132 | // ensure we're backwards compatible |
| 133 | $compat = array( |
| 134 | 'index' => 'dashboard', |
| 135 | 'edit' => 'posts', |