-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add command: Manage categories while Editing a category template #67029
base: trunk
Are you sure you want to change the base?
Add command: Manage categories while Editing a category template #67029
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This reverts commit 63f81c1.
const commands = []; | ||
|
||
// Check if we are in the Site Editor and editing a category-related template | ||
const isSiteEditor = window.location.href.includes( 'site-editor.php' ); |
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.
@karthick-murugan I don't believe this is the correct way to determine if we are in the Site Editor.
When I search the code base, the common method I see is:
const isSiteEditor = getPath( window.location.href )?.includes(
'site-editor.php'
);
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.
@carolinan - Updated the common method as per your advice. Thanks.
…d/manage-categories-command
What?
Enhancement for the Editing a category template mentioned in #50407
Why?
Currently there is no command to manage categories while editing category templates.
How?
This PR adds adds "Manage Categories" command by default when the command palette is opened while editing category templates.
Testing Instructions
Screenshots or screencast
REC-20241115165442.mp4