Make WordPress Core

Ticket #12287: query.diff

File query.diff, 591 bytes (added by momo360modena, 15 years ago)
  • wp-includes/query.php

     
    19491949                                if ( !is_wp_error($post_ids) && count($post_ids) ) {
    19501950                                        $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") ";
    19511951                                        $post_type = 'any';
    1952                                         $q['post_status'] = 'publish';
     1952                                        if ( !isset($q['post_status']) || empty($q['post_status']) )
     1953                                                $q['post_status'] = 'publish';
    19531954                                        $post_status_join = true;
    19541955                                } else {
    19551956                                        $whichcat = " AND 0 ";