-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toolbar: Make the 'Edit site' link aware of the current template #4810
Toolbar: Make the 'Edit site' link aware of the current template #4810
Conversation
f723f97
to
978c894
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. However, we also need two docblock updates :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Mamaduka for the PR, $
missing in global.
Co-authored-by: Mukesh Panchal <[email protected]>
Co-authored-by: Mukesh Panchal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
PR makes the 'Edit site' link in the toolbar contextually aware of the current template.
How
Introduces a new global
$_wp_current_template_id
that stores the current template ID during the template resolution.We can't use the existing
$_wp_current_template_content
global as it only stores template contents.Refs
Gutenberg issue: WordPress/gutenberg#37850
Trac ticket: https://core.trac.wordpress.org/ticket/58746