is_nav_menu_item

Advertisement

Summery Summery

Determines whether the given ID is a nav menu item.

Syntax Syntax

is_nav_menu_item( int $menu_item_id )

Parameters Parameters

$menu_item_id

(int) (Required) The ID of the potential nav menu item.

Return Return

(bool) Whether the given ID is that of a nav menu item.

Source Source

File: wp-includes/nav-menu.php

 */
function is_nav_menu_item( $menu_item_id = 0 ) {
	return ( ! is_wp_error( $menu_item_id ) && ( 'nav_menu_item' === get_post_type( $menu_item_id ) ) );

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.