Action hook '_user_admin_menu'

in WP Core File wp-admin/includes/menu.php at line 30

View Source

_user_admin_menu

Action Hook
Description
Fires before the administration menu loads in the User Admin. The hook fires before menus and sub-menus are removed based on user privileges.

Hook Information

File Location wp-admin/includes/menu.php View on GitHub
Hook Type Action
Line Number 30

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into _user_admin_menu
add_action('_user_admin_menu', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-admin/includes/menu.php:30 - How this hook is used in WordPress core
<?php
  25  	 * The hook fires before menus and sub-menus are removed based on user privileges.
  26  	 *
  27  	 * @since 3.1.0
  28  	 * @access private
  29  	 */
  30  	do_action( '_user_admin_menu' );
  31  } else {
  32  
  33  	/**
  34  	 * Fires before the administration menu loads in the admin.
  35  	 *

PHP Documentation

<?php
/**
	 * Fires before the administration menu loads in the User Admin.
	 *
	 * The hook fires before menus and sub-menus are removed based on user privileges.
	 *
	 * @since 3.1.0
	 * @access private
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-admin/includes/menu.php
Related Hooks

Related hooks will be displayed here in future updates.