Constructor.
$tax_queryarrayrequired
relation string'AND', or 'OR'. Default 'AND'....$0 arraytaxonomy stringterms string|int|arrayfield string'term_id', 'slug', 'name', or 'term_taxonomy_id'. Default: 'term_id'.operator string'AND', 'IN', ‘NOT IN’, 'EXISTS', ‘NOT EXISTS’.'IN'.include_children boolpublic function __construct( $tax_query ) {
if ( isset( $tax_query['relation'] ) ) {
$this->relation = $this->sanitize_relation( $tax_query['relation'] );
} else {
$this->relation = 'AND';
}
$this->queries = $this->sanitize_query( $tax_query );
}
You must log in before being able to contribute a note or feedback.
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_tax_query/__construct