is_nav_menu_item

Definition:
function is_nav_menu_item( $menu_item_id = 0 ) {}

Determine whether the given ID is a nav menu item.

Parameters

  • int $menu_item_id: The ID of the potential nav menu item.

Return values

returns:Whether the given ID is that of a nav menu item.

Source code

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 ) ) );

}

2143

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: