Skip to content

Commit

Permalink
Add drafts command to command palette
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Nov 5, 2024
1 parent 630ceb4 commit 39191c8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/editor/src/components/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ function useEditorCommandLoader() {
} );
}

commands.push( {
name: 'core/drafts',
label: __( 'Pages/Drafts' ),
keywords: [ 'drafts' ],
icon: edit,
callback: ( { close } ) => {
close();
window.location.href =
'/wp-admin/site-editor.php?postType=page&layout=list&activeView=drafts';
},
} );

return {
commands,
isLoading: false,
Expand Down

0 comments on commit 39191c8

Please sign in to comment.