Ticket #6772: 6772.2.diff
| File 6772.2.diff, 0.5 kB (added by DD32, 4 months ago) |
|---|
-
wp-includes/query.php
old new 1337 1337 } 1338 1338 foreach ( $statuswheres as $statuswhere ) 1339 1339 $where .= " AND $statuswhere"; 1340 } elseif ( !$this->is_singular ) {1340 } elseif ( !$this->is_singular && ! ( isset($q['post_type']) && 'attachment' == $q['post_type'] ) ) { 1341 1341 $where .= " AND ($wpdb->posts.post_status = 'publish'"; 1342 1342 1343 1343 if ( is_admin() )
