Skip to content

Commit 7b3ea1a

Browse files
committed
Administration: Update Site Editor URLs to use path-based format.
Updates Site Editor URLs from legacy query parameters to the new path-based p parameter format. Props jabir20, phpbits, sainathpoojary, SirLouen, westonruter, wildworks. Fixes #63110. git-svn-id: https://develop.svn.wordpress.org/trunk@61634 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d3b793f commit 7b3ea1a

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/wp-admin/includes/dashboard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,7 @@ function wp_welcome_panel() {
21292129
<?php if ( $is_block_theme ) : ?>
21302130
<h3><?php _e( 'Switch up your site&#8217;s look & feel with Styles' ); ?></h3>
21312131
<p><?php _e( 'Tweak your site, or give it a whole new look! Get creative &#8212; how about a new color palette or font?' ); ?></p>
2132-
<a href="<?php echo esc_url( admin_url( '/site-editor.php?path=%2Fwp_global_styles' ) ); ?>"><?php _e( 'Edit styles' ); ?></a>
2132+
<a href="<?php echo esc_url( add_query_arg( 'p', rawurlencode( '/styles' ), admin_url( 'site-editor.php' ) ) ); ?>"><?php _e( 'Edit styles' ); ?></a>
21332133
<?php else : ?>
21342134
<h3><?php _e( 'Discover a new way to build your site.' ); ?></h3>
21352135
<p><?php _e( 'There is a new kind of WordPress theme, called a block theme, that lets you build the site you&#8217;ve always wanted &#8212; with blocks and styles.' ); ?></p>

src/wp-includes/post.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,8 @@ function create_initial_post_types() {
359359

360360
$template_edit_link = 'site-editor.php?' . build_query(
361361
array(
362-
'postType' => '%s',
363-
'postId' => '%s',
364-
'canvas' => 'edit',
362+
'p' => '/%s/%s',
363+
'canvas' => 'edit',
365364
)
366365
);
367366

@@ -531,9 +530,8 @@ function create_initial_post_types() {
531530

532531
$navigation_post_edit_link = 'site-editor.php?' . build_query(
533532
array(
534-
'postId' => '%s',
535-
'postType' => 'wp_navigation',
536-
'canvas' => 'edit',
533+
'p' => '/wp_navigation/%s',
534+
'canvas' => 'edit',
537535
)
538536
);
539537

0 commit comments

Comments
 (0)