From 78930c49643f42be381a5dae501f95077bcc0c7b Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 27 Apr 2010 00:22:04 +0000 Subject: [PATCH] Fix custom tax and post type query var checks. Props prettyboymp. fixes #12857 #13076 git-svn-id: http://svn.automattic.com/wordpress/trunk@14246 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 73dc220963..c7d59fa7e9 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -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]; }