Make WordPress Core


Ignore:
Timestamp:
02/17/2022 08:49:37 PM (3 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.
Merges [52768] to the 5.9 branch.
Fixes #55190.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-includes/default-filters.php

    r52594 r52769  
    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.