-
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 (#24503)
* 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. * Navigation: Remove unused argument * Navigation: Fix phpunit tests * Shorten 'Gutenberg Block' label to 'Block' * Navigation: Add @return inline documentation * Navigation: Add label to content textarea * Navigation: Hide all non-content fields from Block menu items * Navigation: Fix loss of block content when saving menu in nav-menus.php
- Loading branch information
1 parent
280668d
commit 10e25f6
Showing
10 changed files
with
423 additions
and
130 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
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.