mu_menu_items filter-hookWP 3.0.0

Filters available network-wide administration menu options.

Options returned to this filter are output as individual checkboxes that, when selected, enable site administrator access to the specified administration menu in certain contexts.

Adding options for specific menus here hinges on the appropriate checks and capabilities being in place in the site dashboard on the other side. For instance, when the single default option, 'plugins' is enabled, site administrators are granted access to the Plugins screen in their individual sites' dashboards.

Usage

add_filter( 'mu_menu_items', 'wp_kama_mu_menu_items_filter' );

/**
 * Function for `mu_menu_items` filter-hook.
 * 
 * @param string[] $admin_menus Associative array of the menu items available.
 *
 * @return string[]
 */
function wp_kama_mu_menu_items_filter( $admin_menus ){

	// filter...
	return $admin_menus;
}
$admin_menus(string[])
Associative array of the menu items available.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

In file: /wp-admin/network/settings.php
mu_menu_items
wp-admin/network/settings.php 487
$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );

Where the hook is used in WordPress

Usage not found.