theme.json: add appearanceTools flag to opt-in into appearance UI controls#36646
theme.json: add appearanceTools flag to opt-in into appearance UI controls#36646
appearanceTools flag to opt-in into appearance UI controls#36646Conversation
appearanceTools flag to opt-in into appareance settingsappearanceTools flag to opt-in into appareance UI controls
appearanceTools flag to opt-in into appareance UI controlsappearanceTools flag to opt-in into appearance UI controls
|
What happen with a child theme? |
Same as before: the child overrides the parent. Did you run into any issue? |
youknowriad
left a comment
There was a problem hiding this comment.
This looks good to me personally.
Let's not forget to backport the theme.json unit tests updates that happened since WP 5.8 into WordPress trunk
@youknowriad what do you mean by this? |
|
I mean that during the 5.9 lifecycle we did some changes to theme.json php unit tests like in this PR and we might not have back ported everything to Core. Since at some point we will remove this code from Gutenberg (theme.json classes and tests), we should make sure to backport all the tests to avoid losing coverage. |
|
FWIW, all of them should be already in core, that was part of the initial backporting (except for the PRs that still need to backported, such as this one). |
|
@oandregal not tryed yet on child theme. |
|
Everything should work as expected, but wider and extensive testing is always appreciated :) |
Fixes #36187
Follow-up to #36246 and #36477
This PR adds a new setting property in
theme.jsoncalledappearanceToolswhose function is to opt-in into all appearance UI controls.The result is that a theme.json like this one:
is the same as this other:
Themes that don't use this flag need to individually enable the opt-in features, which is the same behavior as of now in
trunk.Notes
Name
After some discussion in the first PR #36246 and consulting other people, we're going with
appearanceToolsfor the name, which leavesappearancefree for the future and clarifies the purpose of the flag.Cascade behavior
Themes can still set anything to false and will be respected. So, this
theme.json:is the same as: