From 92f3ef38ca67db3bdd13ae3a2d4750c9926ad079 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 26 Jul 2021 10:55:20 +0400 Subject: [PATCH] Global Styles: Avoid rendering duplicate elements stylesheet --- lib/block-supports/elements.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/block-supports/elements.php b/lib/block-supports/elements.php index 0505d5d5969a40..48fd10d32767e9 100644 --- a/lib/block-supports/elements.php +++ b/lib/block-supports/elements.php @@ -63,5 +63,6 @@ function gutenberg_render_elements_support( $block_content, $block ) { } - +// Remove WordPress core filter to avoid rendering duplicate elements stylesheet. +remove_filter( 'render_block', 'wp_render_elements_support', 10, 2 ); add_filter( 'render_block', 'gutenberg_render_elements_support', 10, 2 );