block_core_navigation_sort_menu_items_by_parent_id
block_core_navigation_sort_menu_items_by_parent_id ( $menu_items )
Parameters:- (array) menu_items Menu items to sort.
Returns:- (array) An array keyed by the id of the parent menu where each element is an array of menu items that belong to that parent.
Defined at: - Introduced in WordPress: —
- Deprecated in WordPress: —
Description
Sorts a standard array of menu items into a nested structure keyed by the
id of the parent menu.