Changeset 16259
- Timestamp:
- 11/09/2010 04:45:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r16258 r16259 1473 1473 'operator' => 'IN', 1474 1474 ); 1475 } else { 1476 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { 1477 if ( $t->query_var && !empty( $q[$t->query_var] ) ) { 1478 $tax_query_defaults = array( 1479 'taxonomy' => $taxonomy, 1480 'field' => 'slug', 1481 'operator' => 'IN' 1482 ); 1483 1484 if ( $t->rewrite['hierarchical'] ) { 1485 $q[$t->query_var] = wp_basename( $q[$t->query_var] ); 1486 } 1487 1488 $term = str_replace( ' ', '+', $q[$t->query_var] ); 1489 1490 if ( strpos($term, '+') !== false ) { 1491 $terms = preg_split( '/[+]+/', $term ); 1492 foreach ( $terms as $term ) { 1493 $tax_query[] = array_merge( $tax_query_defaults, array( 1494 'terms' => array( $term ) 1495 ) ); 1496 } 1497 } else { 1475 } 1476 1477 foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { 1478 if ( $t->query_var && !empty( $q[$t->query_var] ) ) { 1479 $tax_query_defaults = array( 1480 'taxonomy' => $taxonomy, 1481 'field' => 'slug', 1482 'operator' => 'IN' 1483 ); 1484 1485 if ( $t->rewrite['hierarchical'] ) { 1486 $q[$t->query_var] = wp_basename( $q[$t->query_var] ); 1487 } 1488 1489 $term = str_replace( ' ', '+', $q[$t->query_var] ); 1490 1491 if ( strpos($term, '+') !== false ) { 1492 $terms = preg_split( '/[+]+/', $term ); 1493 foreach ( $terms as $term ) { 1498 1494 $tax_query[] = array_merge( $tax_query_defaults, array( 1499 'terms' => preg_split( '/[,]+/',$term )1495 'terms' => array( $term ) 1500 1496 ) ); 1501 1497 } 1498 } else { 1499 $tax_query[] = array_merge( $tax_query_defaults, array( 1500 'terms' => preg_split( '/[,]+/', $term ) 1501 ) ); 1502 1502 } 1503 1503 }
Note: See TracChangeset
for help on using the changeset viewer.