diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
| commit | 12de05107e4c8b006bde6ee8916f34eb476d08da (patch) | |
| tree | 123ee54ecd1f3f777373b7df54a4604012d43640 /wp-includes/classes.php | |
| parent | e51c7a9ca4bfdb45fa3ec7334bd33871e78c68b1 (diff) | |
| download | wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.gz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.xz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.zip | |
WP Merge with revision 8075
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1328 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/classes.php')
| -rw-r--r-- | wp-includes/classes.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 0d866fa..a454bef 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -26,6 +26,7 @@ class WP { global $wp_rewrite; $this->query_vars = array(); + $taxonomy_query_vars = array(); if ( is_array($extra_query_vars) ) $this->extra_query_vars = & $extra_query_vars; @@ -140,6 +141,10 @@ class WP { $this->public_query_vars = apply_filters('query_vars', $this->public_query_vars); + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) + if ( isset($t->query_var) ) + $taxonomy_query_vars[$t->query_var] = $taxonomy; + for ($i=0; $i<count($this->public_query_vars); $i += 1) { $wpvar = $this->public_query_vars[$i]; if (isset($this->extra_query_vars[$wpvar])) @@ -153,8 +158,13 @@ class WP { elseif (!empty($perma_query_vars[$wpvar])) $this->query_vars[$wpvar] = $perma_query_vars[$wpvar]; - if ( !empty( $this->query_vars[$wpvar] ) ) + if ( !empty( $this->query_vars[$wpvar] ) ) { $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; + if ( in_array( $wpvar, $taxonomy_query_vars ) ) { + $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; + $this->query_vars['term'] = $this->query_vars[$wpvar]; + } + } } foreach ($this->private_query_vars as $var) { |
