From 11c53d559bf89c4647f75ca464886d592c0c1fb1 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Thu, 14 Sep 2023 05:51:09 +0000 Subject: [PATCH] Post Types: allow trashing draft patterns. Adds `delete_posts` to capabilities for the `wp_block` post type. Props ramonopoly, johnbillion, dhruvishah2203, audrasjb. Fixes #59041. git-svn-id: https://develop.svn.wordpress.org/trunk@56577 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index e1af9227a5..7100e7c3ac 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -320,6 +320,8 @@ function create_initial_post_types() { 'edit_posts' => 'edit_posts', 'edit_published_posts' => 'edit_published_posts', 'delete_published_posts' => 'delete_published_posts', + // Enables trashing draft posts as well. + 'delete_posts' => 'delete_posts', 'edit_others_posts' => 'edit_others_posts', 'delete_others_posts' => 'delete_others_posts', ),