[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> class-wp-classic-to-block-menu-converter.php (summary)

WP_Classic_To_Block_Menu_Converter class

File Size: 132 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Classic_To_Block_Menu_Converter:: (3 methods):
  convert()
  group_by_parent_id()
  to_blocks()


Class: WP_Classic_To_Block_Menu_Converter  - X-Ref

Converts a Classic Menu to Block Menu blocks.

convert( $menu )   X-Ref
Converts a Classic Menu to blocks.

return: string|WP_Error The serialized and normalized parsed blocks on success,
param: WP_Term $menu The Menu term object of the menu to convert.

group_by_parent_id( $menu_items )   X-Ref
Returns an array of menu items grouped by the id of the parent menu item.

return: array
param: array $menu_items An array of menu items.

to_blocks( $menu_items, $menu_items_by_parent_id )   X-Ref
Turns menu item data into a nested array of parsed blocks

return: array An array of parsed block data.
param: array $menu_items              An array of menu items that represent
param: array $menu_items_by_parent_id An array keyed by the id of the



Generated : Sat Nov 23 08:20:01 2024 Cross-referenced by PHPXref