Ticket #11697: 11697.diff
| File 11697.diff, 728 bytes (added by , 16 years ago) |
|---|
-
wp-includes/query.php
2143 2143 } elseif ( !$this->is_singular ) { 2144 2144 $where .= " AND ($wpdb->posts.post_status = 'publish'"; 2145 2145 2146 if ( is_admin() ) 2146 if ( is_admin() ) { 2147 2147 $where .= " OR $wpdb->posts.post_status = 'future' OR $wpdb->posts.post_status = 'draft' OR $wpdb->posts.post_status = 'pending'"; 2148 2149 if ( is_user_logged_in() ) {2150 2148 $where .= current_user_can( "read_private_{$post_type_cap}s" ) ? " OR $wpdb->posts.post_status = 'private'" : " OR $wpdb->posts.post_author = $user_ID AND $wpdb->posts.post_status = 'private'"; 2151 2149 } 2152 2150