#20175 closed defect (bug) (fixed)
"Trash" should not be a bulk action when user can't delete a post at all
| Reported by: | markoheijnen | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Posts, Post Types | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
When a user can't delete posts at all for a certain post type the bulk action to delete posts is useless.
Not sure if the following check is correct:
if ( current_user_can( $post_type_object->cap->delete_post ) ) {
if ( $this->is_trash || !EMPTY_TRASH_DAYS )
$actions['delete'] = __( 'Delete Permanently' );
else
$actions['trash'] = __( 'Move to Trash' );
}
Maybe the edit/restore functionality should have some similar check
Attachments (1)
Change History (9)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
delete_posts should be plural. Otherwise, seems good at a glance.