customize_nav_menu_available_items WordPress Filter Hook

The customize_nav_menu_available_items hook allows you to add custom items to the list of available menu items when creating a new menu in the WordPress Customizer. This can be useful if you want to add a custom link or other item to your menu that is not part of the default WordPress menu system.

apply_filters( 'customize_nav_menu_available_items', array $items, string $object_type, string $object_name, int $page ) #

Filters the available menu items.


Parameters

$items

(array)The array of menu items.

$object_type

(string)The object type.

$object_name

(string)The object name.

$page

(int)The current page number.


Top ↑

Source

File: wp-includes/class-wp-customize-nav-menus.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

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.