Move s/ /+ out of WP_Query, so that 'category_name=Some Category' works again. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e3126350ce
commit
0a1d745a54
|
@ -272,6 +272,11 @@ class WP {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert urldecoded spaces back into +
|
||||||
|
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t )
|
||||||
|
if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) )
|
||||||
|
$this->query_vars[$t->query_var] = str_replace( ' ', '+', $this->query_vars[$t->query_var] );
|
||||||
|
|
||||||
// Limit publicly queried post_types to those that are publicly_queryable
|
// Limit publicly queried post_types to those that are publicly_queryable
|
||||||
if ( isset( $this->query_vars['post_type']) ) {
|
if ( isset( $this->query_vars['post_type']) ) {
|
||||||
$queryable_post_types = get_post_types( array('publicly_queryable' => true) );
|
$queryable_post_types = get_post_types( array('publicly_queryable' => true) );
|
||||||
|
|
|
@ -1507,7 +1507,7 @@ class WP_Query {
|
||||||
$q[$t->query_var] = wp_basename( $q[$t->query_var] );
|
$q[$t->query_var] = wp_basename( $q[$t->query_var] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$term = str_replace( ' ', '+', $q[$t->query_var] );
|
$term = $q[$t->query_var];
|
||||||
|
|
||||||
if ( strpos($term, '+') !== false ) {
|
if ( strpos($term, '+') !== false ) {
|
||||||
$terms = preg_split( '/[+]+/', $term );
|
$terms = preg_split( '/[+]+/', $term );
|
||||||
|
|
Loading…
Reference in New Issue