Make WordPress Core


Ignore:
Timestamp:
02/17/2022 08:43:39 PM (2 years ago)
Author:
hellofromTonya
Message:

Editor: Automatically apply global styles duotone filters to render in post editor.

Global styles duotone filters were not rendering in the post editor. 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.

Follow-up [52757].

Props ajlende, abhanonstopnewsuk.
Fixes #55190.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r52593 r52768  
    575575add_action( 'wp_footer', 'wp_enqueue_global_styles', 1 );
    576576
     577// SVG filters like duotone have to be loaded at the beginning of the body in both admin and the front-end.
     578add_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
     579add_action( 'in_admin_header', 'wp_global_styles_render_svg_filters' );
     580
    577581add_action( 'wp_default_styles', 'wp_default_styles' );
    578582add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.