WPDev.one
Core Function
View Source on Trac ↗

block_core_navigation_parse_blocks_from_menu_items()

block_core_navigation_parse_blocks_from_menu_items( mixed $menu_items, mixed $menu_items_by_parent_id )

Turns menu item data into a nested array of parsed blocks

Parameters 2 required

Name / Type Description
array

$menu_items An array of menu items that represent an individual level of a menu.

Required
array

$menu_items_by_parent_id An array keyed by the id of the parent menu where each element is an array of menu items that belong to that parent.

Required

Return Value

(array)
An array of parsed block data.

Function Information

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