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

git-svn-id: https://develop.svn.wordpress.org/trunk@14246 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-04-27 00:22:04 +00:00
parent 3e9cc3ebd9
commit 6ba4b97fc8
1 changed files with 2 additions and 2 deletions

View File

@ -275,10 +275,10 @@ class WP {
if ( !empty( $this->query_vars[$wpvar] ) ) {
$this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar];
if ( in_array( $wpvar, $taxonomy_query_vars ) ) {
if ( isset( $taxonomy_query_vars[$wpvar] ) ) {
$this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar];
$this->query_vars['term'] = $this->query_vars[$wpvar];
} elseif ( in_array( $wpvar, $post_type_query_vars ) ) {
} elseif ( isset($post_type_query_vars[$wpvar] ) ) {
$this->query_vars['post_type'] = $post_type_query_vars[$wpvar];
$this->query_vars['name'] = $this->query_vars[$wpvar];
}