WordPress.org

Make WordPress Core

Changeset 15874


Ignore:
Timestamp:
10/20/2010 07:00:57 PM (8 years ago)
Author:
scribu
Message:

Fix tax=term1+term2 queries. See #12891

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r15860 r15874  
    14711471                    }
    14721472
    1473                     $term = $q[$t->query_var];
     1473                    $term = str_replace( ' ', '+', $q[$t->query_var] );
    14741474
    14751475                    if ( strpos($term, '+') !== false ) {
    1476                         $terms = preg_split( '/[+\s]+/', $term );
     1476                        $terms = preg_split( '/[+]+/', $term );
    14771477                        foreach ( $terms as $term ) {
    14781478                            $tax_query[] = array_merge( $tax_query_defaults, array(
     
    14821482                    } else {
    14831483                        $tax_query[] = array_merge( $tax_query_defaults, array(
    1484                             'terms' => preg_split('/[,\s]+/', $term)
     1484                            'terms' => preg_split( '/[,]+/', $term )
    14851485                        ) );
    14861486                    }
Note: See TracChangeset for help on using the changeset viewer.