From 39191c8406865f6532adf2a9a3866f378a361bc7 Mon Sep 17 00:00:00 2001 From: karthick-murugan Date: Tue, 5 Nov 2024 12:11:14 +0530 Subject: [PATCH] Add drafts command to command palette --- packages/editor/src/components/commands/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/editor/src/components/commands/index.js b/packages/editor/src/components/commands/index.js index b4b9c05db256d7..381f07e681baeb 100644 --- a/packages/editor/src/components/commands/index.js +++ b/packages/editor/src/components/commands/index.js @@ -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,