Skip to content

Is it possible to remove Core/Blocks supports? #48428

Answered by t-hamano
alexis-magina asked this question in Q&A
Discussion options

You must be logged in to vote

Hi.

If your theme has theme.json, you can opt-out by setting the following. This is a sample that disables the button background color and border radius controls.

{
	"$schema": "https://schemas.wp.org/trunk/theme.json",
	"version": 2,
	"settings": {
		"appearanceTools": true,
		"layout": {
			"contentSize": "840px",
			"wideSize": "1100px"
		},
		"blocks": {
			"core/button": {
				"color": {
					"background": false,
					"customGradient": false,
					"gradients": []
				},
				"border": {
					"radius": false
				}
			}
		}
	}
}

However, you cannot opt out of settings that are unique to that block, such as the width setting of the button block.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tomdevisser
Comment options

Answer selected by tomdevisser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants