Ticket #15487: 15487.singular.diff

File 15487.singular.diff, 882 bytes (added by markjaquith, 3 years ago)

Do not set is_(category|tag|tax) for is_singular

  • wp-includes/query.php

     
    15911591                        ); 
    15921592                } 
    15931593 
    1594                 foreach ( $tax_query as $query ) { 
    1595                         if ( 'IN' == $query['operator'] ) { 
    1596                                 switch ( $query['taxonomy'] ) { 
    1597                                         case 'category': 
    1598                                                 $this->is_category = true; 
    1599                                                 break; 
    1600                                         case 'post_tag': 
    1601                                                 $this->is_tag = true; 
    1602                                                 break; 
    1603                                         default: 
    1604                                                 $this->is_tax = true; 
     1594                if ( !$this->is_singular() ) { 
     1595                        foreach ( $tax_query as $query ) { 
     1596                                if ( 'IN' == $query['operator'] ) { 
     1597                                        switch ( $query['taxonomy'] ) { 
     1598                                                case 'category': 
     1599                                                        $this->is_category = true; 
     1600                                                        break; 
     1601                                                case 'post_tag': 
     1602                                                        $this->is_tag = true; 
     1603                                                        break; 
     1604                                                default: 
     1605                                                        $this->is_tax = true; 
     1606                                        } 
    16051607                                } 
    16061608                        } 
    16071609                }