WordPress.org

Make WordPress Core

Ticket #19939: even-better-patch.diff

File even-better-patch.diff, 1.0 KB (added by wonderboymusic, 4 years ago)
  • wp-includes/query.php

     
    29292929                $this->queried_object = null; 
    29302930                $this->queried_object_id = 0; 
    29312931 
    2932                 if ( $this->is_category || $this->is_tag || $this->is_tax ) { 
     2932                if ( $this->is_post_type_archive ) { 
     2933                        $this->queried_object = get_post_type_object( $this->get('post_type') ); 
     2934                } elseif ( $this->is_category || $this->is_tag || $this->is_tax ) { 
    29332935                        $tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' ); 
    29342936 
    29352937                        $query = reset( $tax_query_in_and ); 
     
    29462948                                if ( $this->is_category ) 
    29472949                                        _make_cat_compat( $this->queried_object ); 
    29482950                        } 
    2949                 } elseif ( $this->is_post_type_archive ) { 
    2950                         $this->queried_object = get_post_type_object( $this->get('post_type') ); 
    29512951                } elseif ( $this->is_posts_page ) { 
    29522952                        $page_for_posts = get_option('page_for_posts'); 
    29532953                        $this->queried_object = & get_page( $page_for_posts );