WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menu_object

SummerySummery

Filters the wp_get_nav_menu_object() result to supply the previewed menu object.

Syntax

WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menu_object( object|null $menu_obj, string $menu_id )

DescriptionDescription

Requesting a nav_menu object by anything but ID is not supported.

ParametersParameters

$menu_obj

(object|null) (Required) Object returned by wp_get_nav_menu_object().

$menu_id

(string) (Required) ID of the nav_menu term. Requests by slug or name will be ignored.

ReturnReturn

(object|null)

SourceSource

File: wp-includes/customize/class-wp-customize-nav-menu-setting.php


			

ChangelogChangelog

Changelog
Version Description
4.3.0 Introduced.

See alsoSee also

Scroll to Top