_wp_reset_invalid_menu_item_parent
- %1$s is private and should not be used in themes or plugins directly.
_wp_reset_invalid_menu_item_parent ( $menu_item_data )
Access:Parameters:- (array) menu_item_data The menu item data array.
Returns:- (array) The menu item data with reset menu_item_parent.
Defined at: - Introduced in WordPress: 6.2.0
- Deprecated in WordPress: —
Description
Prevents menu items from being their own parent.Resets menu_item_parent to 0 when the parent is set to the item itself.
For use before saving `_menu_item_menu_item_parent` in nav-menus.php.