mirror of
git://develop.git.wordpress.org/
synced 2025-04-05 12:42:35 +02:00
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, gziolo. Merges [53413] to the 6.0 branch. Fixes #55752. git-svn-id: https://develop.svn.wordpress.org/branches/6.0@53415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8dafbef75c
commit
a1d10fecf5
@ -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' )
|
||||
|
Loading…
x
Reference in New Issue
Block a user