-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Navigation screen: Add opt-in Navigation block rendering
Allows themes to opt-in to having `wp_nav_menu()` render a complete Navigation block in place of the menu. This allows arbitrarily complex Navigation block structures can be used in an existing theme. When a theme declares `add_theme_support( 'block-nav-menus' )`, users are able to add non-link blocks to a Navigation using the Navigation screen. This block tree is stored as menu items and re-assembled into a Navigation block for display using `render_block()` in the frontend. Non-link blocks are stored using a menu item with type `'block'` which renders properly in `nav-menus.php`. This allows users to switch to a theme that does not support block menus and still see their data in WP Admin.
- Loading branch information
1 parent
e3d4e49
commit 3a47a1a
Showing
8 changed files
with
390 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.