From 82c0591117b9970304f5cc04c3274ecc6fd36e36 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 29 Mar 2022 13:26:38 +0000 Subject: [PATCH] Editor: Change location of block support styles in `wp_head`. Backports changes from https://github.com/WordPress/gutenberg/pull/39164. Props ndiego, alexstine, cbravobernal, mamaduka. See #55474. git-svn-id: https://develop.svn.wordpress.org/trunk@53015 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 2f87019b81..6b7ccea2f7 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -2926,8 +2926,8 @@ function wp_enqueue_global_styles_css_custom_properties() { * * For block themes, it's loaded in the head. * For classic ones, it's loaded in the body - * because the wp_head action (and wp_enqueue_scripts) - * happens before the render_block. + * because the wp_head action happens before + * the render_block. * * @link https://core.trac.wordpress.org/ticket/53494. * @@ -2936,7 +2936,7 @@ function wp_enqueue_global_styles_css_custom_properties() { function wp_enqueue_block_support_styles( $style ) { $action_hook_name = 'wp_footer'; if ( wp_is_block_theme() ) { - $action_hook_name = 'wp_enqueue_scripts'; + $action_hook_name = 'wp_head'; } add_action( $action_hook_name,