Changeset 32713 for trunk/src/wp-includes/meta.php
- Timestamp:
- 06/09/2015 05:41:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r32610 r32713 955 955 956 956 /** 957 * Whether the query contains any OR relations. 958 * 959 * @since 4.3.0 960 * @access protected 961 * @var bool 962 */ 963 protected $has_or_relation = false; 964 965 /** 957 966 * Constructor. 958 967 * … … 1047 1056 if ( isset( $relation ) && 'OR' === strtoupper( $relation ) ) { 1048 1057 $clean_queries['relation'] = 'OR'; 1058 $this->has_or_relation = true; 1049 1059 1050 1060 /* … … 1579 1589 return apply_filters( 'meta_query_find_compatible_table_alias', $alias, $clause, $parent_query, $this ) ; 1580 1590 } 1591 1592 /** 1593 * Check whether the current query has any OR relations. 1594 * 1595 * In some cases, the presence of an OR relation somewhere in the query will require the use of a DISTINCT or 1596 * GROUP BY keyword in the SELECT clause. The current method can be used in these cases to determine whether 1597 * such a clause is necessary. 1598 * 1599 * @since 4.3.0 1600 * 1601 * @return bool True if the query contains any OR relations, otherwise false. 1602 */ 1603 public function has_or_relation() { 1604 return $this->has_or_relation; 1605 } 1581 1606 } 1582 1607
Note: See TracChangeset
for help on using the changeset viewer.