From 08c5dbc7e936c1d39771e72cf036d04bebb56d55 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 19 May 2022 02:27:13 +0000 Subject: [PATCH] Site Editor: Include `style` parameter in home template redirect. When redirecting the site editor to the home template include the `style` querystring parameter if it is set. This ensures the style panel opens if the user expects it. Props grantmkin, mamaduka, peterwilsoncc. Fixes #55752. Built from https://develop.svn.wordpress.org/trunk@53413 git-svn-id: http://core.svn.wordpress.org/trunk@53002 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/site-editor.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php index 9fac7e62c7..86f140cde3 100644 --- a/wp-admin/site-editor.php +++ b/wp-admin/site-editor.php @@ -29,6 +29,9 @@ if ( ! wp_is_block_theme() ) { */ $home_template = _resolve_home_block_template(); if ( $home_template && empty( $_GET['postType'] ) && empty( $_GET['postId'] ) ) { + if ( ! empty( $_GET['styles'] ) ) { + $home_template['styles'] = sanitize_key( $_GET['styles'] ); + } $redirect_url = add_query_arg( $home_template, admin_url( 'site-editor.php' ) diff --git a/wp-includes/version.php b/wp-includes/version.php index edf9c5f117..cc61011491 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53411'; +$wp_version = '6.1-alpha-53413'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.