Skip to content

Commit

Permalink
Editor: Change location of block support styles in wp_head.
Browse files Browse the repository at this point in the history
Backports changes from WordPress/gutenberg#39164.

Props ndiego, alexstine, cbravobernal, mamaduka.
Merges [53015] to the 5.9 branch.
See #55474.

Built from https://develop.svn.wordpress.org/branches/5.9@53017


git-svn-id: http://core.svn.wordpress.org/branches/5.9@52606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
VenusPR committed Mar 29, 2022
1 parent dbb753d commit 6a8cd32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2925,8 +2925,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.
*
Expand All @@ -2935,7 +2935,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,
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9.3-alpha-53013';
$wp_version = '5.9.3-alpha-53017';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 6a8cd32

Please sign in to comment.