WP_Meta_Query::has_or_relation() WordPress Method
The WP_Meta_Query::has_or_relation() method is used to check if the current meta query has an OR relation.
WP_Meta_Query::has_or_relation() #
Checks whether the current query has any OR relations.
Contents
Description
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.
Return
(bool) True if the query contains any OR
relations, otherwise false.
Source
File: wp-includes/class-wp-meta-query.php
public function has_or_relation() { return $this->has_or_relation; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |