_admin_menu
Fires before the administration menu loads in the admin.
The hook fires before menus and sub-menus are removed based on user privileges.
Usage
add_action( '_admin_menu', 'wp_kama__admin_menu_action' ); /** * Function for `_admin_menu` action-hook. * * @return void */ function wp_kama__admin_menu_action(){ // action... }
Changelog
Since 2.2.0 | Introduced. |
Where the hook is called
In file: /wp-admin/includes/menu.php
_admin_menu
wp-admin/includes/menu.php 41
do_action( '_admin_menu' );
Where the hook is used in WordPress
wp-includes/functions.php 5389
add_action( '_admin_menu', 'wp_widgets_add_menu' );