-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add: Frontend section presets output #42124
Conversation
2614fb1
to
51b5d5f
Compare
Thank you a lot for the review @oandregal!
The parameters order was wrong on the last commit. It is fixed. All the feedback was applied! |
Backports PHP changes in WordPress/gutenberg#42124 to the core. Adds the missing mechanism to output frontend styles of block level presets to the core. Props mcsf, oandregal, dmsnell, draganescu. See #56467.
Backports PHP changes in WordPress/gutenberg#42124 to the core. Adds the missing mechanism to output frontend styles of block level presets to the core. Props mcsf, oandregal, dmsnell, draganescu. See #56467. Built from https://develop.svn.wordpress.org/trunk@54305 git-svn-id: http://core.svn.wordpress.org/trunk@53864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Backports PHP changes in WordPress/gutenberg#42124 to the core. Adds the missing mechanism to output frontend styles of block level presets to the core. Props mcsf, oandregal, dmsnell, draganescu. See #56467. Built from https://develop.svn.wordpress.org/trunk@54305 git-svn-id: https://core.svn.wordpress.org/trunk@53864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
IIUC, we'll want to include this in GB 14.2 in order to unblock this |
Cherry-picked this into |
Backports PHP changes in WordPress/gutenberg#42124 to the core. Adds the missing mechanism to output frontend styles of block level presets to the core. Props mcsf, oandregal, dmsnell, draganescu. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54305 602fd350-edb4-49c9-b593-d223f7449a82
Hey, while working on #46579 I realized this PR was not backported to WordPress 6.1. When we land that PR and then backport to WordPress 6.2 everything will be fine, but I wanted to raise in case you think this should be ported for a potential WordPress 6.1.X release. |
…ement When we introduced #42124 new block supports behavior we did so with a PCRE replacement that opened the possibility for a few bugs related to processing the HTML attributes. It was noted in that PR that this would be a good candidate for the `WP_HTML_Tag_Processor`. In this patch we're performing that replacement as follow-up work. This should improve the reliability and hopefully the readability of what is being done to the HTML as it renders.
…pper. When we introduced #42124 new block supports behavior we did so with a PCRE replacement that opened the possibility for a few bugs related to processing the HTML attributes. It was noted in that PR that this would be a good candidate for the `WP_HTML_Tag_Processor`. In this patch we're performing that replacement as follow-up work. This should improve the reliability and hopefully the readability of what is being done to the HTML as it renders.
@jorgefilipecosta, does this change have a WP core backport PR? Unfortunately, I wasn't able to find any. |
Part of #40318.
This PR allows a block to define the preset settings of its nested blocks using the same shape as theme.json.
Continuation of #40547.
Shape
Formatted json:
Engine output
What?
It follows what was defined in #40547. The presets of a section overwrite everything set on the theme.json, even block-specific presets, so for the global presets of a section, we need to overwrite any block-specific settings as discussed in the other PR, which makes a complex CSS rule.
It follows the algorithms that were discussed with @oandregal and @youknowriad.
Testing
I pasted the group block above in the editor and verified the output on the front was the one also shared above and identical to the following screenshot: