Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
  • Loading branch information
westonruter committed Jun 18, 2025
commit 1debf45660fb9e352b4ea98e20a0d151143c669e
2 changes: 1 addition & 1 deletion src/wp-includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -6372,7 +6372,7 @@ function wp_get_global_styles_custom_css() {
*/
function wp_enqueue_global_styles_custom_css() {
_deprecated_function( __FUNCTION__, '6.7.0', 'wp_enqueue_global_styles' );
if ( ! wp_is_block_theme() ) {
if ( ! wp_is_block_theme() || is_customize_preview() ) {
return;
}

Expand Down
5 changes: 4 additions & 1 deletion src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2533,10 +2533,13 @@ function wp_enqueue_global_styles() {

$stylesheet = wp_get_global_stylesheet();

if ( $is_block_theme ) {
if ( $is_block_theme && ! is_customize_preview() ) {
/*
* Dequeue the Customizer's custom CSS
* and add it before the global styles custom CSS.
* This is not done in the Customizer preview to
* facilitate live previewing changes via
* wp-includes/js/customize-preview.js.
*/
remove_action( 'wp_head', 'wp_custom_css_cb', 101 );
// Get the custom CSS from the Customizer and add it to the global stylesheet.
Expand Down
Loading