You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigation: Try adding navigation link variants via server (#29095)
The navigation block allows insertion of Links, Post Links, Page Links, Tag Links and Category Links. Changes here add the ability to insert links for custom post types and taxonomies. If we install a Portfolio plugin for example, we should be able to add Portfolio Links.
In trunk, the list of link variations is hardcoded. Changes here include registering navigation link variants using register_block_type_from_metadata and passing not only a render callback, but the variations array. One benefit of doing this is being able to fetch post types and taxonomies and filter by show_in_nav_menus which is not exposed via the REST API. It also has some flexibility in pulling other data from the server without needing to bloat the API response (values here are unlikely to be reused elsewhere).
0 commit comments