_is_valid_nav_menu_item

Return if a menu item is valid.

Description

_is_valid_nav_menu_item( (object) $item ); 

Parameters (1)

0. $item (object)
The menu item to check.

Usage

  1. if ( !function_exists( '_is_valid_nav_menu_item' ) ) { 
  2. require_once ABSPATH . WPINC . '/nav-menu.php'; 
  3.  
  4. // The menu item to check. 
  5. $item = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _is_valid_nav_menu_item($item); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/nav-menu.php  
  1. function _is_valid_nav_menu_item( $item ) { 
  2. return empty( $item->_invalid );