Opened 7 years ago
Last modified 7 years ago
#48375 new enhancement
Introduce a separate capability for trashing a post
| Reported by: | johnbillion | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | granular-capabilities needs-patch |
| Cc: | Focuses: |
Description
Related: #41674
It's sometimes desirable to allow users to trash posts but not permanently delete them once trashed, nor empty the trash.
There should be a meta capability, trash_post|trash_posts, which by default maps to delete_post|delete_posts which is used when a post is trashed instead of deleted. This would allow a plugin to grant a user the ability to trash posts but not permanently delete them.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@johnbillion If a user with this capability trashes a post, and the trash is set to automatically empty itself after X days, then users with only this capability would technically still be able to permanently delete a post (though not immediately) because
wp_scheduled_delete()does not check who trashed the post.Because this capability would map to
delete_post|delete_postsby default, this may be something that falls into plugin territory. But it came to mind thinking this one through and wanted to mention it here for thought.