Fix registration of default taxonomies so that proper rewrite rules are written.

git-svn-id: https://develop.svn.wordpress.org/trunk@11141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-04-30 19:05:32 +00:00
parent c50d877687
commit 1f47d7d591
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -1399,7 +1399,7 @@ class WP_Query {
if ( empty($qv['taxonomy']) || empty($qv['term']) ) {
$this->is_tax = false;
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
if ( isset($t->query_var) && isset($qv[$t->query_var]) && '' != $qv[$t->query_var] ) {
if ( $t->query_var && isset($qv[$t->query_var]) && '' != $qv[$t->query_var] ) {
$qv['taxonomy'] = $taxonomy;
$qv['term'] = $qv[$t->query_var];
$this->is_tax = true;
@@ -1938,7 +1938,7 @@ class WP_Query {
$terms = get_terms($q['taxonomy'], array('slug'=>$q['term']));
} else {
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
if ( isset($t->query_var) && '' != $q[$t->query_var] ) {
if ( $t->query_var && '' != $q[$t->query_var] ) {
$terms = get_terms($taxonomy, array('slug'=>$q[$t->query_var]));
if ( !is_wp_error($terms) )
break;