diff --git a/packages/core-commands/src/add-post-type-commands.js b/packages/core-commands/src/admin-navigation-commands.js similarity index 60% rename from packages/core-commands/src/add-post-type-commands.js rename to packages/core-commands/src/admin-navigation-commands.js index 47e6014f56944..577e7258df0b6 100644 --- a/packages/core-commands/src/add-post-type-commands.js +++ b/packages/core-commands/src/admin-navigation-commands.js @@ -3,9 +3,9 @@ */ import { useCommand } from '@wordpress/commands'; import { __ } from '@wordpress/i18n'; -import { plus } from '@wordpress/icons'; +import { external, plus } from '@wordpress/icons'; -export function useAddPostTypeCommands() { +export function useAdminNavigationCommands() { useCommand( { name: 'core/add-new-post', label: __( 'Add new post' ), @@ -22,4 +22,12 @@ export function useAddPostTypeCommands() { document.location.href = 'post-new.php?post_type=page'; }, } ); + useCommand( { + name: 'core/manage-reusable-blocks', + label: __( 'Manage all custom patterns' ), + callback: () => { + document.location.href = 'edit.php?post_type=wp_block'; + }, + icon: external, + } ); } diff --git a/packages/core-commands/src/private-apis.js b/packages/core-commands/src/private-apis.js index b0e0cd87040f6..de5b0de197600 100644 --- a/packages/core-commands/src/private-apis.js +++ b/packages/core-commands/src/private-apis.js @@ -1,12 +1,12 @@ /** * Internal dependencies */ -import { useAddPostTypeCommands } from './add-post-type-commands'; +import { useAdminNavigationCommands } from './admin-navigation-commands'; import { useSiteEditorNavigationCommands } from './site-editor-navigation-commands'; import { lock } from './lock-unlock'; function useCommands() { - useAddPostTypeCommands(); + useAdminNavigationCommands(); useSiteEditorNavigationCommands(); }