From d7823cb6ae34013a12bff76b5a1de3603300ba30 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Fri, 29 Mar 2024 16:14:08 +0200 Subject: [PATCH] minor changes --- packages/edit-site/src/components/actions/index.js | 3 +++ .../page-templates-template-parts/actions.js | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/actions/index.js b/packages/edit-site/src/components/actions/index.js index dde55a83057ccb..7229c0a4011380 100644 --- a/packages/edit-site/src/components/actions/index.js +++ b/packages/edit-site/src/components/actions/index.js @@ -416,6 +416,9 @@ export const postRevisionsAction = { export const renamePostAction = { id: 'rename-post', label: __( 'Rename' ), + isEligible( post ) { + return post.status !== 'trash'; + }, RenderModal: ( { items, closeModal } ) => { const [ item ] = items; const originalTitle = decodeEntities( diff --git a/packages/edit-site/src/components/page-templates-template-parts/actions.js b/packages/edit-site/src/components/page-templates-template-parts/actions.js index 0e9bbd3f1ab2dc..baea6d9c0f3def 100644 --- a/packages/edit-site/src/components/page-templates-template-parts/actions.js +++ b/packages/edit-site/src/components/page-templates-template-parts/actions.js @@ -248,16 +248,25 @@ export const renameTemplateAction = { - -