Allow block attributes passed to block renderer by way of wp_nav_menu. #31911
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
With the introduction of the block-nav-menus theme support, themes can specify whether to use the navigation block to render classic menus (created via wp_nav_menu). It would be useful to theme developers to be able to set the attributes of the navigation block, e.g. responsiveness.
This change enables block attributes to be passed when calling wp_nav_menu() with block-nav-menus theme support enabled.
How has this been tested?
This change is leveraged by Quadrat. This PR for that theme is passing the value as we expect to be able to.
Types of changes
This simple change passes on to the Navigation Block renderer any attributes passed via the wp_nav_menu function instead of an empty array.