_is_valid_nav_menu_item()WP 3.2.0

Determines whether a menu item is valid.

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

true|false. False if invalid, otherwise true.

Usage

_is_valid_nav_menu_item( $item );
$item(object) (required)
The menu item to check.

Changelog

Since 3.2.0 Introduced.

_is_valid_nav_menu_item() code WP 6.4.3

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