Skip to content

Commit 6617a80

Browse files
committed
fix(editor): gate Customizer CSS strip to WP 7.0+
1 parent def7ff1 commit 6617a80

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

includes/class-patches.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public static function init() {
4646
add_action( 'tribe_events_views_v2_after_make_view', [ __CLASS__, 'remove_tec_extra_excerpt_filtering' ], 1 );
4747

4848
// Prevent Customizer "Additional CSS" from leaking into the iframed block editor in WP 7.0+.
49-
add_filter( 'block_editor_settings_all', [ __CLASS__, 'strip_customizer_css_from_editor' ], 999 );
49+
if ( version_compare( get_bloginfo( 'version' ), '7.0', '>=' ) ) {
50+
add_filter( 'block_editor_settings_all', [ __CLASS__, 'strip_customizer_css_from_editor' ], 999 );
51+
}
5052
}
5153

5254
/**

0 commit comments

Comments
 (0)