[wp-trac] [WordPress Trac] #20175: "Trash" should not be a bulk action when user can't delete a post at all

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 4 15:20:19 UTC 2012


#20175: "Trash" should not be a bulk action when user can't delete a post at all
--------------------------+-----------------------------
 Reporter:  markoheijnen  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Trash         |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20175>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list