is_nav_menu

Advertisement

Summery Summery

Check if the given ID is a navigation menu.

Syntax Syntax

is_nav_menu( int|string|WP_Term $menu )

Description Description

Returns true if it is; false otherwise.

Parameters Parameters

$menu

(int|string|WP_Term) (Required) Menu ID, slug, name, or object of menu to check.

Return Return

(bool) Whether the menu exists.

Source Source

File: wp-includes/nav-menu.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.