A WordPress-centric search engine for devs and theme authors



is_nav_menu_item ›

Since3.0.0
Deprecatedn/a
is_nav_menu_item ( $menu_item_id = 0 )
Parameters:
  • (int) $menu_item_id The ID of the potential nav menu item.
    Required: No
    Default:
Returns:
  • (bool) Whether the given ID is that of a nav menu item.
Defined at:
Codex:

Determines whether the given ID is a nav menu item.



Source

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