mirror of
git://develop.git.wordpress.org/
synced 2025-04-09 06:32:28 +02:00
Query: Improve sanitization within WP_Tax_Query
.
Merges [52454] to the 5.9 branch. Props dd32, xknown, peterwilsoncc, ehtis. git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52458 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8a131093a3
commit
abb893a104
@ -556,7 +556,11 @@ class WP_Tax_Query {
|
||||
return;
|
||||
}
|
||||
|
||||
$query['terms'] = array_unique( (array) $query['terms'] );
|
||||
if ( 'slug' === $query['field'] || 'name' === $query['field'] ) {
|
||||
$query['terms'] = array_unique( (array) $query['terms'] );
|
||||
} else {
|
||||
$query['terms'] = wp_parse_id_list( $query['terms'] );
|
||||
}
|
||||
|
||||
if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
|
||||
$this->transform_query( $query, 'term_id' );
|
||||
|
Loading…
x
Reference in New Issue
Block a user