WP_Date_Query::get_compare( array $query )

Determines and validates what comparison operator to use.


Parameters

$query

(Required) A date query or a date subquery.


Return

(string) The comparison operator.


Source

File: wp-includes/date.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;
	}


Changelog

Changelog
Version Description
WP-3.7.0 Introduced.