From 9385b59b591735b5cef4d543edc5dd8e790c45cc Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Tue, 12 Oct 2021 15:26:09 +1100 Subject: [PATCH] Update elements block support to use shared function --- lib/block-supports/elements.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/block-supports/elements.php b/lib/block-supports/elements.php index 880ee1afa3baf2..1fd7162544f030 100644 --- a/lib/block-supports/elements.php +++ b/lib/block-supports/elements.php @@ -60,15 +60,7 @@ function gutenberg_render_elements_support( $block_content, $block ) { $content = substr_replace( $block_content, ' class="' . $class_name . '"', $first_element_offset + strlen( $first_element ) - 1, 0 ); } - // Ideally styles should be loaded in the head, but blocks may be parsed - // after that, so loading in the footer for now. - // See https://core.trac.wordpress.org/ticket/53494. - add_action( - 'wp_footer', - function () use ( $style ) { - echo $style; - } - ); + gutenberg_render_block_support_style( $style ); return $content; }