Skip to content

Commit

Permalink
Toolbar: Update the site editor link in the Admin Bar.
Browse files Browse the repository at this point in the history
The details page is being removed from the site editor in 6.6. we need to direct the admin bar menu item to the "edit" mode page directly.

Props youknowriad, mamaduka.
Fixes #61266.

git-svn-id: https://develop.svn.wordpress.org/trunk@58223 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
youknowriad committed May 28, 2024
1 parent e0d2960 commit 647f285
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wp-includes/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
*
* @since 5.9.0
* @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar.
* @since 6.6.0 Added the `canvas` query arg to the Site Editor link.
*
* @global string $_wp_current_template_id
*
Expand All @@ -481,6 +482,7 @@ function wp_admin_bar_edit_site_menu( $wp_admin_bar ) {
array(
'postType' => 'wp_template',
'postId' => $_wp_current_template_id,
'canvas' => 'edit',
),
admin_url( 'site-editor.php' )
),
Expand Down

0 comments on commit 647f285

Please sign in to comment.