-
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
Duotone: Allow users to specify custom filters #38055
Conversation
I love the custom color idea for the Duotone. It just feels weird that it would be set via the Customizer interface as it takes the user out of the block editor. Isn't the Customizer going away soon? |
Yes ideally this should be possible from within Global Styles. Skatepark is a universal theme so it is attempting to achieve the same things as Global Styles though the customizer, while we transition users to the Site Editor. |
We also have an issue (#36541) open for adding duotone to global styles, but as far as I know, development hasn't started on that part yet. |
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.
Looks like everything is working fine in the themes that usually test
@@ -158,7 +158,7 @@ function wp_get_global_styles_svg_filters() { | |||
|
|||
$supports_theme_json = WP_Theme_JSON_Resolver_Gutenberg::theme_has_support(); | |||
|
|||
$origins = array( 'default', 'theme' ); |
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.
Hey, the code in the folder lib/compat/wordpress-5.9
is expected to be part of WordPress 5.9? Is this being ported to WordPress core? I presume it isn't, so we'd need to revert this PR and look at different ways to do this.
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.
Revert here: #38150
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.
Why can't we just port to core instead of reverting and working around it here? Is that just more complicated or something?
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.
Yeah, if the change was part of 5.9, this would have been fine. Though when this landed only the 5.9 leads could approve PRs for core and that would need to happen before.
In general, code in a lib/compat/wordpress-X.Y
folder needs to be in sync with what was shipped in that same WordPress X.Y release.
This reverts commit 74530bc.
Description
In order to allow themes to specify their own custom duotone filters, we need to allow SVG to be output for filters defined in the custom key of the Global Styles json object.
How has this been tested?
Use the Skatepark theme
Open the customizer and select a custom color
Check that images have duotone applied with the new colors
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).