Skip to content

Commit

Permalink
Add stylebook path to exceptions for classic themes in site editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Nov 22, 2024
1 parent 8cd0ec0 commit 97777de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wp-admin/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );

Check failure on line 28 in src/wp-admin/site-editor.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Spaces must be used for mid-line alignment; tabs are not allowed

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.' ) );
}
}
Expand Down

0 comments on commit 97777de

Please sign in to comment.