From cba842a101df8a0cc0c2476768facc0c1e017532 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 7 Jul 2021 21:42:13 +0400 Subject: [PATCH] Duotone: Avoid rendering duplicate stylesheet and SVG (#33233) --- lib/block-supports/duotone.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/block-supports/duotone.php b/lib/block-supports/duotone.php index f3b4743832f0ae..fcf9191dc32775 100644 --- a/lib/block-supports/duotone.php +++ b/lib/block-supports/duotone.php @@ -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 );