Skip to content

Commit 1debf45

Browse files
committed
1 parent 6493acc commit 1debf45

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/wp-includes/deprecated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6372,7 +6372,7 @@ function wp_get_global_styles_custom_css() {
63726372
*/
63736373
function wp_enqueue_global_styles_custom_css() {
63746374
_deprecated_function( __FUNCTION__, '6.7.0', 'wp_enqueue_global_styles' );
6375-
if ( ! wp_is_block_theme() ) {
6375+
if ( ! wp_is_block_theme() || is_customize_preview() ) {
63766376
return;
63776377
}
63786378

src/wp-includes/script-loader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2533,10 +2533,13 @@ function wp_enqueue_global_styles() {
25332533

25342534
$stylesheet = wp_get_global_stylesheet();
25352535

2536-
if ( $is_block_theme ) {
2536+
if ( $is_block_theme && ! is_customize_preview() ) {
25372537
/*
25382538
* Dequeue the Customizer's custom CSS
25392539
* and add it before the global styles custom CSS.
2540+
* This is not done in the Customizer preview to
2541+
* facilitate live previewing changes via
2542+
* wp-includes/js/customize-preview.js.
25402543
*/
25412544
remove_action( 'wp_head', 'wp_custom_css_cb', 101 );
25422545
// Get the custom CSS from the Customizer and add it to the global stylesheet.

0 commit comments

Comments
 (0)