wp_get_nav_menu_name WordPress Filter Hook

The wp_get_nav_menu_name hook allows you to get the name of a navigation menu. This can be useful if you need to programmatically get the name of a menu for display purposes.

apply_filters( 'wp_get_nav_menu_name', string $menu_name, string $location ) #

Filters the navigation menu name being returned.


Parameters

$menu_name

(string)Menu name.

$location

(string)Menu location identifier.


Top ↑

Source

File: wp-includes/nav-menu.php

View on Trac



Top ↑

Changelog

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