mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00: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. Fixes #55752. git-svn-id: https://develop.svn.wordpress.org/trunk@53413 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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' )
|
||||
|
||||
Reference in New Issue
Block a user