WP_Meta_Query::has_or_relation()publicWP 4.3.0

Checks whether the current query has any OR relations.

In some cases, the presence of an OR relation somewhere in the query will require the use of a DISTINCT or GROUP BY keyword in the SELECT clause. The current method can be used in these cases to determine whether such a clause is necessary.

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

Хуков нет.

Возвращает

true|false. True if the query contains any OR relations, otherwise false.

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

$WP_Meta_Query = new WP_Meta_Query();
$WP_Meta_Query->has_or_relation();

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

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

Код WP_Meta_Query::has_or_relation() WP 6.5.2

public function has_or_relation() {
	return $this->has_or_relation;
}