We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default alignment can be added by setting the value of the $align property in the block class:
$align
/** * The default block alignment. * * @var string */ public $align = 'full';
This works as expected on uncached blocks. When caching blocks, it then generates block.json that looks something like this:
block.json
{ "name": "acf\/example-block", "title": "Exmaple Block", "description": "Description here", "category": "text", "icon": "editor-ul", "align": "full",
However, the align key isn't a supported key in block.json. I believe the default should instead be set in the block attributes, like:
align
{ "name": "acf\/example-block", "title": "Exmaple Block", "description": "Description here", "category": "text", "icon": "editor-ul", "attributes": { "align": { "type": "string", "default": "full" } },
I can submit a PR in the next day or two to address this.
The text was updated successfully, but these errors were encountered:
Good catch! PR very appreciated. Looks like https://www.advancedcustomfields.com/resources/extending-acf-blocks-with-block-supports/ is a decent example for it all.
Sorry, something went wrong.
No branches or pull requests
Default alignment can be added by setting the value of the
$align
property in the block class:This works as expected on uncached blocks. When caching blocks, it then generates
block.json
that looks something like this:However, the
align
key isn't a supported key inblock.json
. I believe the default should instead be set in the block attributes, like:I can submit a PR in the next day or two to address this.
The text was updated successfully, but these errors were encountered: