WP_Meta_Query::is_first_order_clause()protectedWP 4.1.0

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.

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

Хуков нет.

Возвращает

true|false. Whether the query clause is a first-order clause.

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

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

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

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

Код WP_Meta_Query::is_first_order_clause() WP 6.5.2

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