From 97777de2ffacd38cb927e46d446182742f935323 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Fri, 22 Nov 2024 14:41:34 +1100 Subject: [PATCH] Add stylebook path to exceptions for classic themes in site editor. --- src/wp-admin/site-editor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/site-editor.php b/src/wp-admin/site-editor.php index 3207bccdf2632..d15812f19ef50 100644 --- a/src/wp-admin/site-editor.php +++ b/src/wp-admin/site-editor.php @@ -25,11 +25,12 @@ $is_patterns = isset( $_GET['postType'] ) && 'wp_block' === sanitize_key( $_GET['postType'] ); $is_patterns_path = isset( $_GET['path'] ) && 'patterns' === sanitize_key( $_GET['path'] ); $is_patterns_editor = $is_patterns || $is_patterns_path; +$is_stylebook_path = isset( $_GET['path'] ) && 'stylebook' === sanitize_key( $_GET['path'] ); if ( ! wp_is_block_theme() ) { if ( ! current_theme_supports( 'block-template-parts' ) && $is_template_part_editor ) { wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); - } elseif ( ! $is_patterns_editor && ! $is_template_part_editor ) { + } elseif ( ! $is_patterns_editor && ! $is_template_part_editor && ! $is_stylebook_path ) { wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); } }