[ad_1]
Not sure if I am doing this correctly, but I wanted to set the defaults for a few of this plugin’s blocks in my theme.json.
I know I can do that for core blocks like this:
{
"version": 2,
"$schema": "https://schemas.wp.org/trunk/theme.json",
"settings": {
"appearanceTools": true,
"border": {
...
},
"color": {
...
},
"layout": {
"contentSize": "1600px",
"wideSize": "100%"
},
"spacing": {
...
},
"typography": {
...
},
"blocks": {
"core/heading": {
"color": {
"text": true,
"background": false,
"link": false,
"palette": [
{
"color": "#ffffff",
"slug": "white",
"name": "White"
},
{
"color": "#4f99bb",
"slug": "blue",
"name": "#4f99bb - Blue"
}
]
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--MINE)"
}
}
}
},However, when I try to add in the areoi/container block like this (under “blocks”)
"areoi/container": {
"attributes": {
"container": {
"type": "string",
"default": "container-xl"
}
}
}It doesn’t work.
Note: When I edit the default value in the blocks/container/block.json, it does work.
Am I going about this the wrong way? Is there a PHP function instead to override the default value for this or any other block in this plugin?
Thanks in advance!
