Make WordPress Core

Ticket #12856: query.php.patch

File query.php.patch, 1002 bytes (added by momo360modena, 15 years ago)
  • Users/amaury/Desktop/SVN/WPtrunk/wp-includes/query.php

     
    20382038                                $post_ids = get_objects_in_term($term_ids, $taxonomy);
    20392039                                if ( !is_wp_error($post_ids) && !empty($post_ids) ) {
    20402040                                        $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") ";
    2041                                         $post_type = 'any';
    2042                                         $q['post_status'] = 'publish';
     2041                                       
     2042                                        if ( !isset($post_type) || empty($post_type) )
     2043                                            $post_type = 'any';
     2044                                       
     2045                                        if ( !isset($q['post_status']) || empty($q['post_status']) )
     2046                                            $q['post_status'] = 'publish';
     2047                                       
    20432048                                        $post_status_join = true;
    20442049                                } else {
    20452050                                        $whichcat = " AND 0 ";
     
    20482053                }
    20492054
    20502055                // Author/user stuff
    2051 
    20522056                if ( empty($q['author']) || ($q['author'] == '0') ) {
    20532057                        $whichauthor='';
    20542058                } else {