admin_menu action-hookWP 1.5.0

Fires before the administration menu loads in the admin.

Usage

add_action( 'admin_menu', 'wp_kama_admin_menu_action' );

/**
 * Function for `admin_menu` action-hook.
 * 
 * @param string $context Empty context.
 *
 * @return void
 */
function wp_kama_admin_menu_action( $context ){

	// action...
}
$context(string)
Empty context.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

In file: /wp-admin/includes/menu.php
admin_menu
wp-admin/includes/menu.php 155
do_action( 'admin_menu', '' );

Where the hook is used in WordPress

wp-admin/includes/class-custom-background.php 51
add_action( 'admin_menu', array( $this, 'init' ) );
wp-admin/includes/class-custom-image-header.php 59
add_action( 'admin_menu', array( $this, 'init' ) );
wp-admin/menu.php 248
add_action( 'admin_menu', '_add_themes_utility_last', 101 );
wp-admin/menu.php 311
add_action( 'admin_menu', '_add_plugin_file_editor_to_tools', 101 );
wp-includes/default-filters.php 537
add_action( 'admin_menu', '_add_post_type_submenus' );
wp-includes/theme.php 2998
remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
wp-includes/theme.php 3011
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );