-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Core Commands: Add Dashboard
option to return to dashboard
#71261
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
Core Commands: Add Dashboard
option to return to dashboard
#71261
Conversation
I did not quite fully understand the usage of the experimental setting - "Command Palette: enable everywhere", since everything seems to work even after this is kept unchecked. This comment on the original PR says this should be enabled by default with the GB plugin, so technically, do the settings need to be removed? cc: @t-hamano Screen.Recording.2025-08-20.at.04.12.40.1.mov |
label: __( 'Dashboard' ), | ||
icon: dashboard, | ||
callback: () => { | ||
document.location.assign( 'index.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.
document.location.assign( '/wp-admin/' );
Also works here.
Sorry, it was my mistake 😅 The setting should be removed. I plan to improve the design of the command palette, so I'll fix it accordingly. |
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. |
8090f9b
to
a531272
Compare
a531272
to
3c95f9f
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 👍
What?
Closes #71258
Adds a "Dashboard" option to the Command Palette that allows users to quickly return to the admin dashboard. The Dashboard command only appears when using the block editor screens, like the post editor or the site editor.
Why?
Currently, there's no option in the Command Palette to return to the
wp-admin
dashboard when working in editors.How?
Added a new conditional "Dashboard" command to the
useAdminNavigationCommands
hook inpackages/core-commands/src/admin-navigation-commands.js
. The command uses URL detection to only appear in editor contexts.Testing Instructions
Cmd or Ctrl + K
Enter
Screencasts
Screen.Recording.2025-08-21.at.14.53.33.mov