Skip to content

Commit

Permalink
Duotone: Avoid rendering duplicate stylesheet and SVG (#33233)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Jul 7, 2021
1 parent 123debc commit cba842a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/block-supports/duotone.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,7 @@ function ( $selector ) use ( $duotone_id ) {
'register_attribute' => 'gutenberg_register_duotone_support',
)
);

// Remove WordPress core filter to avoid rendering duplicate support elements.
remove_filter( 'render_block', 'wp_render_duotone_support', 10, 2 );
add_filter( 'render_block', 'gutenberg_render_duotone_support', 10, 2 );

0 comments on commit cba842a

Please sign in to comment.