-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update: Backport block settings to core. #4013
Update: Backport block settings to core. #4013
Conversation
c2c9cd0
to
0b0ee04
Compare
); | ||
|
||
if ( ! empty( $styles ) ) { | ||
wp_enqueue_block_support_styles( $styles ); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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