Determines whether this is a first-order clause.
Checks to see if the current clause has any time-related keys.
If so, it’s first-order.
$queryarrayrequired
protected function is_first_order_clause( $query ) {
$time_keys = array_intersect( $this->time_keys, array_keys( $query ) );
return ! empty( $time_keys );
}
| Version | Description |
|---|---|
| 4.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_date_query/is_first_order_clause