Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

_is_valid_nav_menu_item() WordPress Function

The is_valid_nav_menu_item() function checks whether a given menu item is valid or not. It is useful for making sure that a given menu item is not going to produce an error when it is used.

_is_valid_nav_menu_item( object $item ) #

Determines whether a menu item is valid.


Parameters

$item

(object)(Required)The menu item to check.


Top ↑

Return

(bool) False if invalid, otherwise true.


Top ↑

Source

File: wp-includes/nav-menu.php

function _is_valid_nav_menu_item( $item ) {
	return empty( $item->_invalid );
}

Top ↑

Changelog

Changelog
VersionDescription
3.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.