Ticket #29789: 29789.fix3.diff
File 29789.fix3.diff, 1.2 KB (added by , 9 years ago) |
---|
-
.php
old new class WP_Posts_List_Table extends WP_List_Table { 282 282 $actions = array(); 283 283 $post_type_obj = get_post_type_object( $this->screen->post_type ); 284 284 285 // Don't show bulk options if the user can't edit posts. 286 if ( ! current_user_can( $post_type_obj->cap->edit_posts ) ) { 287 return $actions; 285 // Only show bulk edit options if the user can edit_posts. 286 if ( current_user_can( $post_type_obj->cap->edit_posts ) ) { 287 if ( $this->is_trash ) { 288 $actions['untrash'] = __( 'Restore' ); 289 } else { 290 $actions['edit'] = __( 'Edit' ); 291 } 288 292 } 289 293 290 if ( $this->is_trash ) { 291 $actions['untrash'] = __( 'Restore' ); 292 } else { 293 $actions['edit'] = __( 'Edit' ); 294 } 295 294 // Only show bulk delete options if the user can delete_posts. 296 295 if ( current_user_can( $post_type_obj->cap->delete_posts ) ) { 297 296 if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) { 298 297 $actions['delete'] = __( 'Delete Permanently' );