Make WordPress Core


Ignore:
Timestamp:
05/20/2022 12:17:16 AM (22 months 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, gziolo.
Merges [53413] to the 6.0 branch.
Fixes #55752.

Location:
branches/6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0

  • branches/6.0/src/wp-admin/site-editor.php

    r53405 r53415  
    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.