When queries are passed to `WP_Tax_Query`, the value for `operator` is assumed to be uppercase. This is an unnecessary constraint. In `->get_sql()`, cast it using `$operator = strtoupper( $query['operator'] )`.
Props clifgriffin. Fixes #27557. Built from https://develop.svn.wordpress.org/trunk@28618 git-svn-id: http://core.svn.wordpress.org/trunk@28442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
207bfa43b3
commit
96d788132a
|
@ -743,7 +743,7 @@ class WP_Tax_Query {
|
|||
}
|
||||
|
||||
$terms = $query['terms'];
|
||||
$operator = $query['operator'];
|
||||
$operator = strtoupper( $query['operator'] );
|
||||
|
||||
if ( 'IN' == $operator ) {
|
||||
|
||||
|
@ -3993,4 +3993,4 @@ function wp_check_term_hierarchy_for_loops( $parent, $term_id, $taxonomy ) {
|
|||
wp_update_term( $loop_member, $taxonomy, array( 'parent' => 0 ) );
|
||||
|
||||
return $parent;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue