Backport from core: Global styles duotone not rendering in post editor #38897
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Backport the changes from changeset/52768. As part of the 5.9.1-RC1 release, these changes were made to core.
In addition, since core is loading the global duotone SVG filters, they can be skipped in the plugin if running with WP 5.9.1 or later.
Testing
Using wordpress-develop 5.9.0 and 5.9.1-RC1.
Using a theme that uses global duotone styles such as Skatepark or Twenty Twenty-Two with the following added to the theme.json
Check that the global duotones are applied to images in the post editor without manually adding them via the block interface. And check that there are no duplicate SVGs generated (ex.
#wp-duotone-dark-grayscale
).Screenshots