-
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
Section Styles: Clean up block style variation filters #62858
Section Styles: Clean up block style variation filters #62858
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
✅ Checked the deleted filters against the Core patch
Could you remind me how to test this again? |
Thanks for the quick review. I've tried updating the test instructions. I'll try again here for good measure.
register_block_style(
'core/group',
array(
'name' => 'my-custom-variation',
'label' => __( 'Custom' ),
)
); {
...
"styles": {
"variations": {
"my-custom-variation": {
"color": {
"background": "black",
"text": "white"
},
}
}
}
} |
That's the bit I forgot. LGTM |
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 all variants.
🚢
It was only a recent change to the way it all works so easily done! Appreciate the repeated reviews on this one. |
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.
All the variations of variations are testing well for me, too! 😄
7acdcef
to
37ac727
Compare
What?
Removes block style variation filters that were initially added to core for 6.6 but ultimately removed in WordPress/wordpress-develop#6873.
Why?
The functions don't exist and the filters are never ended up in core so there's nothing to remove in Gutenberg. The removal of the filters should have been removed before landing #62712.
How?
Delete lines.
Testing Instructions
register_block_style
/styles
directory includingblockTypes
styles.variations
(must be registered via either of the above two methods)register_block_style
or theme.json partial in prior stepsregister_block_style
, passing only thename
andlabel
in thestyle_properties
array. This registration will mean the theme style variation's definition is not sanitized.`register_block_style` Example
Theme.json Partial Example
Theme Style Variation Example (`styles.variations`)
Alternatively, confirm that the removed filters don't exist in core and are safe to remove since WordPress/wordpress-develop#6873 was committed.
Screenshots or screencast
No visual changes.