Make WordPress Core

Ticket #27362: query.php.patch

File query.php.patch, 778 bytes (added by mattonomics, 10 years ago)
  • src/wp-includes/query.php

     
    36633663                                        $term = get_term_by( 'slug', $this->get( 'category_name' ), 'category' );
    36643664                                }
    36653665                        } elseif ( $this->is_tag ) {
    3666                                 $term = get_term( $this->get( 'tag_id' ), 'post_tag' );
     3666                                if ( $this->get( 'tag_id' ) ) {
     3667                                        $term = get_term( $this->get( 'tag_id' ), 'post_tag' );
     3668                                } elseif ( $this->get( 'tag' ) ) {
     3669                                        $term = get_term_by( 'slug', $this->get( 'tag' ), 'post_tag' );
     3670                                }
    36673671                        } else {
    36683672                                $tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' );
    36693673                                $query = reset( $tax_query_in_and );