Changeset 55338
- Timestamp:
- 02/14/2023 04:24:11 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-editor.php
r55288 r55338 27 27 if ( ! wp_is_block_theme() && ! $is_template_part_editor ) { 28 28 wp_die( __( 'The theme you are currently using is not compatible with the Site Editor.' ) ); 29 }30 31 /**32 * Do a server-side redirection if missing `postType` and `postId`33 * query args when visiting Site Editor.34 */35 $home_template = _resolve_home_block_template();36 if ( $home_template && empty( $_GET['postType'] ) && empty( $_GET['postId'] ) ) {37 if ( ! empty( $_GET['styles'] ) ) {38 $home_template['styles'] = sanitize_key( $_GET['styles'] );39 }40 $redirect_url = add_query_arg(41 $home_template,42 admin_url( 'site-editor.php' )43 );44 wp_safe_redirect( $redirect_url );45 exit;46 29 } 47 30
Note: See TracChangeset
for help on using the changeset viewer.