WordPress at Your Fingertips
function is not described

WP_Meta_Query::is_first_order_clause() protected WP 4.1.0

Determine whether a query clause is first-order.

A first-order meta query clause is one that has either a 'key' or a 'value' array key.

{} It's a method of the class: WP_Meta_Query{}

No Hooks.


true|false. Whether the query clause is a first-order clause.


// protected - for code of main (parent) or child class
$result = $this->is_first_order_clause( $query );
$query(array) (required)
Meta query arguments.


Since 4.1.0 Introduced.

Code of WP_Meta_Query::is_first_order_clause() WP 5.9

protected function is_first_order_clause( $query ) {
	return isset( $query['key'] ) || isset( $query['value'] );