Action hook '_network_admin_menu'

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

View Source

_network_admin_menu

Action Hook
Description
Fires before the administration menu loads in the Network 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 19

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

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

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

Source Code Context

wp-admin/includes/menu.php:19 - How this hook is used in WordPress core
<?php
  14  	 * The hook fires before menus and sub-menus are removed based on user privileges.
  15  	 *
  16  	 * @since 3.1.0
  17  	 * @access private
  18  	 */
  19  	do_action( '_network_admin_menu' );
  20  } elseif ( is_user_admin() ) {
  21  
  22  	/**
  23  	 * Fires before the administration menu loads in the User Admin.
  24  	 *

PHP Documentation

<?php
/**
	 * Fires before the administration menu loads in the Network 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.