Changeset 54176 for trunk/src/wp-admin/site-editor.php
- Timestamp:
- 09/15/2022 12:18:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-editor.php
r53784 r54176 20 20 } 21 21 22 if ( ! wp_is_block_theme() ) {22 if ( ! ( current_theme_supports( 'block-template-parts' ) || wp_is_block_theme() ) ) { 23 23 wp_die( __( 'The theme you are currently using is not compatible with Full Site Editing.' ) ); 24 } 25 26 $is_template_part_editor = isset( $_GET['postType'] ) && 'wp_template_part' === sanitize_key( $_GET['postType'] ); 27 if ( ! wp_is_block_theme() && ! $is_template_part_editor ) { 28 wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); 24 29 } 25 30 … … 65 70 $block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) ); 66 71 $custom_settings = array( 67 'siteUrl' => site_url(), 68 'postsPerPage' => get_option( 'posts_per_page' ), 69 'styles' => get_block_editor_theme_styles(), 70 'defaultTemplateTypes' => $indexed_template_types, 71 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), 72 '__unstableHomeTemplate' => $home_template, 72 'siteUrl' => site_url(), 73 'postsPerPage' => get_option( 'posts_per_page' ), 74 'styles' => get_block_editor_theme_styles(), 75 'defaultTemplateTypes' => $indexed_template_types, 76 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), 77 'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(), 78 'supportsTemplatePartsMode' => ! wp_is_block_theme() && current_theme_supports( 'block-template-parts' ), 79 '__unstableHomeTemplate' => $home_template, 73 80 ); 81 82 /** 83 * Home template resolution is not needed when block template parts are supported. 84 * Set the value to `true` to satisfy the editor initialization guard clause. 85 */ 86 if ( $custom_settings['supportsTemplatePartsMode'] ) { 87 $custom_settings['__unstableHomeTemplate'] = true; 88 } 74 89 75 90 // Add additional back-compat patterns registered by `current_screen` et al.
Note: See TracChangeset
for help on using the changeset viewer.