wp_nav_menu_{$menu->slug}_items WordPress Filter Hook

This hook is called when a new menu item is added to a menu. It allows you to add a new item to the menu before it is displayed.

apply_filters( "wp_nav_menu_{$menu->slug}_items", string $items, stdClass $args ) #

Filters the HTML list content for a specific navigation menu.


Description

Top ↑

See also


Top ↑

Parameters

$items

(string)The HTML list content for the menu items.

$args

(stdClass)An object containing wp_nav_menu() arguments.


Top ↑

Source

File: wp-includes/nav-menu-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.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.