WP_Date_Query::get_compare( array $query )
Determines and validates what comparison operator to use.
Description Description
Parameters Parameters
- $query
-
(array) (Required) A date query or a date subquery.
Return Return
(string) The comparison operator.
Source Source
File: wp-includes/class-wp-date-query.php
public function get_compare( $query ) { if ( ! empty( $query['compare'] ) && in_array( $query['compare'], array( '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) { return strtoupper( $query['compare'] ); } return $this->compare; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |