wp-includes/class-wp-meta-query.php:168Constructor.
$meta_queryarrayoptionalarray()$relationstring
$keystring|string[]
$compare_keystringdefault: is 'IN' when $key is an array, '=' otherwise
$type_keystringdefault: is ''
$valuestring|string[]
$comparestringdefault: is 'IN' when $value is an array, '=' otherwise
$typestringdefault: is 'CHAR'. }
public function __construct( $meta_query = array() ) { if ( ! $meta_query ) { return; } if ( isset( $meta_query['relation'] ) && 'OR' === strtoupper( $meta_query['relation'] ) ) { $this->relation = 'OR'; } else { $this->relation = 'AND'; } $this->queries = $this->sanitize_query( $meta_query ); }Introduced in 5.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-meta-query.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.