File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6372,7 +6372,7 @@ function wp_get_global_styles_custom_css() {
6372
6372
*/
6373
6373
function wp_enqueue_global_styles_custom_css () {
6374
6374
_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 () ) {
6376
6376
return ;
6377
6377
}
6378
6378
Original file line number Diff line number Diff line change @@ -2533,10 +2533,13 @@ function wp_enqueue_global_styles() {
2533
2533
2534
2534
$ stylesheet = wp_get_global_stylesheet ();
2535
2535
2536
- if ( $ is_block_theme ) {
2536
+ if ( $ is_block_theme && ! is_customize_preview () ) {
2537
2537
/*
2538
2538
* Dequeue the Customizer's custom CSS
2539
2539
* 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.
2540
2543
*/
2541
2544
remove_action ( 'wp_head ' , 'wp_custom_css_cb ' , 101 );
2542
2545
// Get the custom CSS from the Customizer and add it to the global stylesheet.
You can’t perform that action at this time.
0 commit comments