From d842ee459835d28771078c91784a1738a28a4d3c Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Mon, 5 Aug 2024 06:39:21 +0000 Subject: [PATCH] Block Styles: Fix ordering of stylesheets when a style variation is applied. Adjusts the dependency order to ensure stylesheets are output in the correct order. Syncs the PHP changes from https://github.com/WordPress/gutenberg/pull/63918. Props talldanwp, aaronrobertshaw, andrewserong, aristath, mukesh27, ramonopoly, ytfeldrawkcab. Fixes #61748. git-svn-id: https://develop.svn.wordpress.org/trunk@58850 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/block-style-variations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-supports/block-style-variations.php b/src/wp-includes/block-supports/block-style-variations.php index 77659bf86f..2e86cb71af 100644 --- a/src/wp-includes/block-supports/block-style-variations.php +++ b/src/wp-includes/block-supports/block-style-variations.php @@ -196,7 +196,7 @@ function wp_render_block_style_variation_support_styles( $parsed_block ) { return $parsed_block; } - wp_register_style( 'block-style-variation-styles', false, array( 'global-styles', 'wp-block-library' ) ); + wp_register_style( 'block-style-variation-styles', false, array( 'wp-block-library', 'global-styles' ) ); wp_add_inline_style( 'block-style-variation-styles', $variation_styles ); /*