Changeset 53093 for trunk/src/wp-admin/site-editor.php
- Timestamp:
- 04/07/2022 01:33:03 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-editor.php
r52995 r53093 22 22 if ( ! wp_is_block_theme() ) { 23 23 wp_die( __( 'The theme you are currently using is not compatible with Full Site Editing.' ) ); 24 } 25 26 /** 27 * Do a server-side redirection if missing `postType` and `postId` 28 * query args when visiting Site Editor. 29 */ 30 $home_template = _resolve_home_block_template(); 31 if ( $home_template && empty( $_GET['postType'] ) && empty( $_GET['postId'] ) ) { 32 $redirect_url = add_query_arg( 33 $home_template, 34 admin_url( 'site-editor.php' ) 35 ); 36 wp_safe_redirect( $redirect_url ); 37 exit; 24 38 } 25 39 … … 57 71 'defaultTemplateTypes' => $indexed_template_types, 58 72 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), 73 '__unstableHomeTemplate' => $home_template, 59 74 '__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(), 60 75 '__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
Note: See TracChangeset
for help on using the changeset viewer.