Skip to content

Commit

Permalink
Post Types: allow trashing draft patterns.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tellthemachines committed Sep 14, 2023
1 parent 4bdca50 commit 11c53d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
),
Expand Down

0 comments on commit 11c53d5

Please sign in to comment.