wp_get_nav_menu_object WordPress Filter Hook

The wp_get_nav_menu_object hook allows you to get the nav menu object for a given menu. This can be useful if you need to get information about a menu, such as its name or its items.

apply_filters( 'wp_get_nav_menu_object', WP_Term|false $menu_obj, int|string|WP_Term $menu ) #

Filters the nav_menu term retrieved for wp_get_nav_menu_object().


Parameters

$menu_obj

(WP_Term|false)Term from nav_menu taxonomy, or false if nothing had been found.

$menu

(int|string|WP_Term)The menu ID, slug, name, or object passed to wp_get_nav_menu_object().


Top ↑

Source

File: wp-includes/nav-menu.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.