Skip to content
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

Fix global styles duotone not rendering in post editor #2331

Closed

Conversation

ajlende
Copy link

@ajlende ajlende commented Feb 17, 2022

Global styles duotone filters were not rendering in the post editor (there is a separate issue for the site editor (WordPress/gutenberg#37727). This fixes that by adding wp_global_styles_render_svg_filters to the in_admin_header so it renders in the body before the editor.

To test, use a theme which adds duotone filters to a block in theme.json (Skatepark is one such example). Or add the following to twentytwentytwo's theme.json and ensure that an image added to a post is shown with the duotone filter by default in both the editor and front end.

{
    "styles": {
        "blocks": {
            "core/image": {
                "filter": {
                    "duotone": "var(--wp--preset--duotone--primary-and-secondary)"
                }
            }
        }
    }
}

Trac ticket: https://core.trac.wordpress.org/ticket/55190


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link
Contributor

@hellofromtonya hellofromtonya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Marking for commit. Thank you @ajlende

@hellofromtonya
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants