WPDev.one
Core Function
View Source on Trac ↗

block_core_navigation_sort_menu_items_by_parent_id()

block_core_navigation_sort_menu_items_by_parent_id( mixed $menu_items )

Sorts a standard array of menu items into a nested structure keyed by the

Parameters 1 required

Name / Type Description
$menu_items
array

Menu items to sort.

Required

Return Value

(array)
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.

Function Information

Since Version
5.9.0
Source File
wp-includes/blocks/navigation.php
Advertisement