WP_Date_Query::is_first_order_clause()protectedWP 4.1.0

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.

Метод класса: WP_Date_Query{}

Хуков нет.

Возвращает

true|false. True if this is a first-order clause.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->is_first_order_clause( $query );
$query(массив) (обязательный)
Query clause.

Список изменений

С версии 4.1.0 Введена.

Код WP_Date_Query::is_first_order_clause() WP 6.5.2

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