WP_Meta_Query::is_first_order_clause()
Determines 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.
Method of the class: WP_Meta_Query{}
No Hooks.
Return
true|false
. Whether the query clause is a first-order clause.
Usage
// protected - for code of main (parent) or child class $result = $this->is_first_order_clause( $query );
- $query(array) (required)
- Meta query arguments.
Changelog
Since 4.1.0 | Introduced. |
WP_Meta_Query::is_first_order_clause() WP Meta Query::is first order clause code WP 6.6.2
protected function is_first_order_clause( $query ) { return isset( $query['key'] ) || isset( $query['value'] ); }