Skip to content

Commit

Permalink
Post Actions: Hide the trash action for auto-drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed May 22, 2024
1 parent 8075cb1 commit 28b0dbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/components/post-actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const trashPostAction = {
label: __( 'Move to Trash' ),
isPrimary: true,
icon: trash,
isEligible( { status } ) {
return status !== 'trash';
isEligible( item ) {
return ! [ 'auto-draft', 'trash' ].includes( item.status );
},
supportsBulk: true,
hideModalHeader: true,
Expand Down

0 comments on commit 28b0dbb

Please sign in to comment.