Changeset 15860
- Timestamp:
- 10/20/2010 12:07:23 PM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r15847 r15860 282 282 } 283 283 284 if ( isset( $taxonomy_query_vars[$wpvar] ) ) { 285 $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; 286 $this->query_vars['term'] = $this->query_vars[$wpvar]; 287 } elseif ( isset($post_type_query_vars[$wpvar] ) ) { 284 if ( isset($post_type_query_vars[$wpvar] ) ) { 288 285 $this->query_vars['post_type'] = $post_type_query_vars[$wpvar]; 289 286 $this->query_vars['name'] = $this->query_vars[$wpvar]; -
trunk/wp-includes/query.php
r15850 r15860 1453 1453 $tax_query[] = array( 1454 1454 'taxonomy' => $q['taxonomy'], 1455 'terms' => $q['term'], 1455 'terms' => array( $q['term'] ), 1456 'field' => 'slug', 1456 1457 ); 1457 } 1458 1459 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { 1460 if ( $t->query_var && !empty( $q[$t->query_var] ) ) { 1461 $tax_query_defaults = array( 1462 'taxonomy' => $taxonomy, 1463 'field' => 'slug', 1464 'operator' => 'IN' 1465 ); 1466 1467 if ( $t->rewrite['hierarchical'] ) { 1468 $q[$t->query_var] = basename($q[$t->query_var]); 1469 if ( $taxonomy == $q['taxonomy'] ) 1470 $q['term'] = basename($q['term']); 1471 } 1472 1473 $term = $q[$t->query_var]; 1474 1475 if ( strpos($term, '+') !== false ) { 1476 $terms = preg_split( '/[+\s]+/', $term ); 1477 foreach ( $terms as $term ) { 1458 } else { 1459 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { 1460 if ( $t->query_var && !empty( $q[$t->query_var] ) ) { 1461 $tax_query_defaults = array( 1462 'taxonomy' => $taxonomy, 1463 'field' => 'slug', 1464 'operator' => 'IN' 1465 ); 1466 1467 if ( $t->rewrite['hierarchical'] ) { 1468 $q[$t->query_var] = basename($q[$t->query_var]); 1469 if ( $taxonomy == $q['taxonomy'] ) 1470 $q['term'] = basename($q['term']); 1471 } 1472 1473 $term = $q[$t->query_var]; 1474 1475 if ( strpos($term, '+') !== false ) { 1476 $terms = preg_split( '/[+\s]+/', $term ); 1477 foreach ( $terms as $term ) { 1478 $tax_query[] = array_merge( $tax_query_defaults, array( 1479 'terms' => array( $term ) 1480 ) ); 1481 } 1482 } else { 1478 1483 $tax_query[] = array_merge( $tax_query_defaults, array( 1479 'terms' => array( $term)1484 'terms' => preg_split('/[,\s]+/', $term) 1480 1485 ) ); 1481 1486 } 1482 } else {1483 $tax_query[] = array_merge( $tax_query_defaults, array(1484 'terms' => preg_split('/[,\s]+/', $term)1485 ) );1486 1487 } 1487 1488 }
Note: See TracChangeset
for help on using the changeset viewer.