[wp-trac] [WordPress Trac] #58746: Toolbar: Make the 'Edit site' link aware of the current template

WordPress Trac noreply at wordpress.org
Tue Jul 11 10:33:56 UTC 2023


#58746: Toolbar: Make the 'Edit site' link aware of the current template
------------------------------+---------------------
 Reporter:  Mamaduka          |       Owner:  (none)
     Type:  task (blessed)    |      Status:  new
 Priority:  normal            |   Milestone:  6.3
Component:  Toolbar           |     Version:  5.9
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+---------------------

Comment (by mikeschroder):

 I tested the current patch, and it works as expected.

 TL;DR:
 Thinking to commit, along with this additional documentation added to each
 function that is changed, so that it's clearer what the new global is used
 for:

 {{{@since 6.3.0 Added `$_wp_current_template_id` global for editing of
 current template directly from the admin bar.}}}


 Some further feedback:

 I think the user experience of opening an editor that almost, but not
 quite the same contents was unexpected, but that it's much improved from
 the current behavior of opening Home every time.

 To explain a little more (all with the patch applied):
 When "Edit Site" is clicked from the Home/index, a lot of the site's
 contents are present on the Home template in the editor, and it feels like
 "my site".

 If I click "Edit Site" from a page / post, at least on my theme, I am
 brought to the current template, but it does not reflect the contents of
 the page I was on.

 I think this is intentional / expected, but I figured I'd note my
 experience here so that if we want to improve on it later, it's here!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58746#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list