Determines and validates what comparison operator to use.
Parameters
$query
arrayrequired- A date query or a date subquery.
Source
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;
}
Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.