Update: Backport block settings to core.#4013
Update: Backport block settings to core.#4013jorgefilipecosta wants to merge 1 commit intoWordPress:trunkfrom
Conversation
c2c9cd0 to
0b0ee04
Compare
| ); | ||
|
|
||
| if ( ! empty( $styles ) ) { | ||
| wp_enqueue_block_support_styles( $styles ); |
There was a problem hiding this comment.
The method will be deprecated in favor of wp_style_engine_get_stylesheet_from_css_rules. See #4015.
There was a problem hiding this comment.
Tested using the recommended method: it didn't work or I didn't know how to use it. It's best to look at this separately in a follow-up.
oandregal
left a comment
There was a problem hiding this comment.
Thanks for preparing the backport.
Works as expected and code looks good (same as the Gutenberg PRs it backports).
|
PR also needs the core Trac ticket. |
|
Committed at daee074. |
|
Just adding a follow-up comment regarding In the case of this PR, it might not be a very simple switch, because the CSS rules aren't constructed within the block support, but are already generated by In terms of next steps, I think it'd be good to:
Overall, I think deprecating TL;DR: It'd be good to add tests for this block support, but refactoring away the call to |
Thanks for looking into this @andrewserong It looks like @aristath has already jumped down that particular rabbit hole 😄 I hope to look at this PR very soon. It would be good to deprecate |
This PR allows a block to define the preset settings of its nested blocks using the same shape as theme.json.
Backports WordPress/gutenberg#42124 and WordPress/gutenberg#46625 into the core.
Testing