Make WordPress Core


Ignore:
Timestamp:
04/27/2010 12:22:04 AM (15 years ago)
Author:
ryan
Message:

Fix custom tax and post type query var checks. Props prettyboymp. fixes #12857 #13076

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r14104 r14246  
    276276            if ( !empty( $this->query_vars[$wpvar] ) ) {
    277277                $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar];
    278                 if ( in_array( $wpvar, $taxonomy_query_vars ) ) {
     278                if ( isset( $taxonomy_query_vars[$wpvar] ) ) {
    279279                    $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar];
    280280                    $this->query_vars['term'] = $this->query_vars[$wpvar];
    281                 } elseif ( in_array( $wpvar, $post_type_query_vars ) ) {
     281                } elseif ( isset($post_type_query_vars[$wpvar] ) ) {
    282282                    $this->query_vars['post_type'] = $post_type_query_vars[$wpvar];
    283283                    $this->query_vars['name'] = $this->query_vars[$wpvar];
Note: See TracChangeset for help on using the changeset viewer.