mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 06:36:47 +01:00
Query: Improve sanitization within WP_Tax_Query
.
Merges [52454] to the 5.8 branch. Props dd32, xknown, peterwilsoncc, ehtis. Built from https://develop.svn.wordpress.org/branches/5.8@52459 git-svn-id: http://core.svn.wordpress.org/branches/5.8@52051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
266c585188
commit
6f7032dcf4
@ -556,7 +556,11 @@ class WP_Tax_Query {
|
||||
return;
|
||||
}
|
||||
|
||||
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…
Reference in New Issue
Block a user