GC_Date_Query::get_compare()
最后更新于:2021-11-27 13:17:21
GC_Date_Query::get_compare( array$query)Determines and validates what comparison operator to use.
参数
- $query
-
(array) (Required) A date query or a date subquery.
响应
(string) The comparison operator.
源文件
文件: gc-includes/class-gc-date-query.php
public function get_compare( $query ) {
if ( ! empty( $query['compare'] )
&& in_array( $query['compare'], array( '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ), true )
) {
return strtoupper( $query['compare'] );
}
return $this->compare;
}