Default block alignment class is not in get_block_wrapper_attributes #50027
Labels
Needs Technical Feedback
Needs testing from a developer perspective.
[Package] Blocks
/packages/blocks
[Type] Bug
An existing feature does not function as intended
Description
I created a block, the settings are below in the block.json.
The block should have a full width alignment by default (mentioned here in the documentation: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align)
This works good in the editor. But in my render file, the
get_block_wrapper_attributes()
function is not outputting the align class.The align class is only returned when I configure another block width then the one that’s in the attributes (so ‘none’ or ‘wide’). The default alignment is never returned, even after toggling another one and going back to the default alignment.
Step-by-step reproduction instructions
get_block_wrapper_attributes()
to output the classes in the wrapper div;get_block_wrapper_attributes()
.Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: