Make WordPress Core

Changeset 53413 for trunk


Ignore:
Timestamp:
05/19/2022 02:25:09 AM (2 years ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-editor.php

    r53404 r53413  
    3030$home_template = _resolve_home_block_template();
    3131if ( $home_template && empty( $_GET['postType'] ) && empty( $_GET['postId'] ) ) {
     32    if ( ! empty( $_GET['styles'] ) ) {
     33        $home_template['styles'] = sanitize_key( $_GET['styles'] );
     34    }
    3235    $redirect_url = add_query_arg(
    3336        $home_template,
Note: See TracChangeset for help on using the changeset viewer.