-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
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
theme.json: add appearanceTools
flag to opt-in into appearance UI controls
#36646
Conversation
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.json
calledappearanceTools
whose 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
appearanceTools
for the name, which leavesappearance
free 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: