mu_menu_items WordPress Filter Hook

The mu_menu_items hook allows you to add, remove, or modify the items in the WordPress menu. This hook is useful if you want to add custom items to the menu, or remove unwanted items.

apply_filters( 'mu_menu_items', string[] $admin_menus ) #

Filters available network-wide administration menu options.


Description

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.


Top ↑

Parameters

$admin_menus

(string[])Associative array of the menu items available.


Top ↑

Source

File: wp-admin/network/settings.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.