[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Block navigation areas functions.
File Size: | 262 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
register_navigation_areas( $new_areas ) X-Ref |
Registers the navigation areas supported by the current theme. The expected shape of the argument is: array( 'primary' => 'Primary', 'secondary' => 'Secondary', 'tertiary' => 'Tertiary', ) param: array $new_areas Supported navigation areas. since: 5.9.0 |
_wp_register_default_navigation_areas() X-Ref |
Register the default navigation areas. since: 5.9.0 |
get_navigation_areas() X-Ref |
Returns the available navigation areas. return: array Registered navigation areas. since: 5.9.0 |
_wp_migrate_menu_to_navigation_post( $new_name, WP_Theme $new_theme, WP_Theme $old_theme ) X-Ref |
Migrates classic menus to a block-based navigation post on theme switch. Assigns the created navigation post to the corresponding navigation area. param: string $new_name Name of the new theme. param: WP_Theme $new_theme New theme. param: WP_Theme $old_theme Old theme. since: 5.9.0 |
_wp_get_menu_items_at_location( $location ) X-Ref |
Returns the menu items for a WordPress menu location. return: array Menu items for the location. param: string $location The menu location. since: 5.9.0 |
_wp_sort_menu_items_by_parent_id( $menu_items ) X-Ref |
Sorts a standard array of menu items into a nested structure keyed by the id of the parent menu. return: array An array keyed by the id of the parent menu where each element param: array $menu_items Menu items to sort. since: 5.9.0 |
_wp_parse_blocks_from_menu_items( $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 since: 5.9.0 |
Generated: Mon Nov 29 01:00:03 2021 | Cross-referenced by PHPXref 0.7.1 |