Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stylebook path to exceptions for classic themes in site editor. #7865

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft
Changes from all commits
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
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
Loading