Ticket #31199: 31199-2.patch
File 31199-2.patch, 1.0 KB (added by , 4 years ago) |
---|
-
wp-admin/includes/class-wp-posts-list-table.php
400 400 $actions = array(); 401 401 $post_type_obj = get_post_type_object( $this->screen->post_type ); 402 402 403 if ( current_user_can( $post_type_obj->cap->edit_posts ) ) { 403 if ( empty( $post_type_object ) ) { 404 return $actions; 405 } 406 407 if ( ! empty( $post_type_obj->cap->edit_posts ) && current_user_can( $post_type_obj->cap->edit_posts ) ) { 404 408 if ( $this->is_trash ) { 405 409 $actions['untrash'] = __( 'Restore' ); 406 410 } else { … … 408 412 } 409 413 } 410 414 411 if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {415 if ( ! empty( $post_type_obj->cap->delete_posts ) && current_user_can( $post_type_obj->cap->delete_posts ) ) { 412 416 if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) { 413 417 $actions['delete'] = __( 'Delete Permanently' ); 414 418 } else {