Ticket #24818: 24818.2.diff
| File 24818.2.diff, 854 bytes (added by , 13 years ago) |
|---|
-
wp-admin/includes/class-wp-posts-list-table.php
57 57 $post_type_object = get_post_type_object( $post_type ); 58 58 59 59 if ( !current_user_can( $post_type_object->cap->edit_others_posts ) ) { 60 $exclude_states = get_post_stati( array( 'show_in_admin_all_list' => false ) ); 60 61 $this->user_posts_count = $wpdb->get_var( $wpdb->prepare( " 61 62 SELECT COUNT( 1 ) FROM $wpdb->posts 62 WHERE post_type = %s AND post_status NOT IN ( ' trash', 'auto-draft' )63 WHERE post_type = %s AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' ) 63 64 AND post_author = %d 64 65 ", $post_type, get_current_user_id() ) ); 65 66