Open up theme.json processing - #22520
Merged
Merged
Conversation
|
Size Change: 0 B Total Size: 1.12 MB ℹ️ View Unchanged
|
oandregal
marked this pull request as ready for review
May 21, 2020 12:11
youknowriad
reviewed
May 21, 2020
| register_post_type( 'wp_global_styles', $args ); | ||
| } | ||
|
|
||
| if ( gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing' ) ) { |
Contributor
There was a problem hiding this comment.
Should we just replace the wrapping with gutenberg_experimental_global_styles_has_theme_json_support instead?
Would that be different?
Member
Author
There was a problem hiding this comment.
I wish we could, but the function we use to locate the file (locate_template) requires some of the WordPress constants to be loaded so it knows where to look for the file.
youknowriad
approved these changes
May 21, 2020
youknowriad
left a comment
Contributor
There was a problem hiding this comment.
I didn't test tbh but what can go wrong :P
12 tasks
oandregal
added a commit
that referenced
this pull request
Sep 3, 2020
Since #22520 was merged on May we've been enqueuing the presets as CSS variables whether or not the theme had support for theme.json as a way to speed up themes using them and get feedback. There are enough checks in place that this is inocuous.
oandregal
added a commit
that referenced
this pull request
Sep 8, 2020
Since #22520 was merged on May we've been enqueuing the presets as CSS variables whether or not the theme had support for theme.json as a way to speed up themes using them and get feedback. There are enough checks in place that this is inocuous.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the previous conditions required for
experimental-theme.jsonto be processed, open it up to the front-end as well as all block editors (post, site, widgets). Previously we checked whether 1) the FSE experiment was enabled and 2) the editor was the site editor.Testing Instructions
Test that it doesn't load if the theme doesn't provide an
experimental-theme.jsonfile:#global-styles-inline-css.--wp--preset. The expected result is that you don't find any CSS Custom Property.Test that it loads if the theme provides an
experimental-theme.jsonfile:experimental-theme.jsonwithin the theme directory. Let it be empty.#global-styles-inline-css.--wp--preset. The expected result is that the same CSS Custom Properties you can find in the front-end should be present.