WP_Date_Query::is_first_order_clause( array $query ): bool

Determines whether this is a first-order clause.

Description

Checks to see if the current clause has any time-related keys.
If so, it’s first-order.

Parameters

$queryarrayrequired
Query clause.

Return

bool True if this is a first-order clause.

Source

protected function is_first_order_clause( $query ) {
	$time_keys = array_intersect( $this->time_keys, array_keys( $query ) );
	return ! empty( $time_keys );
}

Changelog

VersionDescription
4.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.