W3cubDocs

/WordPress

WP_Meta_Query::is_first_order_clause( array $query )

Determine whether a query clause is first-order.

Description

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

Parameters

$query

(array) (Required) Meta query arguments.

Return

(bool) Whether the query clause is a first-order clause.

Source

File: wp-includes/class-wp-meta-query.php

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

Changelog

Version Description
4.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_meta_query/is_first_order_clause