_is_valid_nav_menu_item()
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() is valid nav menu item code WP 6.7.2
function _is_valid_nav_menu_item( $item ) { return empty( $item->_invalid ); }