Changeset 57543 for trunk/src/wp-admin/site-editor.php
- Timestamp:
- 02/06/2024 07:40:21 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-editor.php
r56570 r57543 20 20 } 21 21 22 if ( ! ( current_theme_supports( 'block-template-parts' ) || wp_is_block_theme() ) ) {23 wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) );24 }25 26 22 $is_template_part = isset( $_GET['postType'] ) && 'wp_template_part' === sanitize_key( $_GET['postType'] ); 27 23 $is_template_part_path = isset( $_GET['path'] ) && 'wp_template_partall' === sanitize_key( $_GET['path'] ); 28 24 $is_template_part_editor = $is_template_part || $is_template_part_path; 25 $is_patterns = isset( $_GET['postType'] ) && 'wp_block' === sanitize_key( $_GET['postType'] ); 26 $is_patterns_path = isset( $_GET['path'] ) && 'patterns' === sanitize_key( $_GET['path'] ); 27 $is_patterns_editor = $is_patterns || $is_patterns_path; 29 28 30 if ( ! wp_is_block_theme() && ! $is_template_part_editor ) { 31 wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); 29 if ( ! wp_is_block_theme() ) { 30 if ( ! current_theme_supports( 'block-template-parts' ) && $is_template_part_editor ) { 31 wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); 32 } elseif ( ! $is_patterns_editor && ! $is_template_part_editor ) { 33 wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); 34 } 32 35 } 33 36
Note: See TracChangeset
for help on using the changeset viewer.