WP_Date_Query::get_compare

Advertisement

Summery Summery

Determines and validates what comparison operator to use.

Syntax Syntax

WP_Date_Query::get_compare( array $query )

Parameters Parameters

$query

(Required) A date query or a date subquery.

Return Return

(string) The comparison operator.

Source Source

File: wp-includes/class-wp-date-query.php

			&& in_array( $query['compare'], array( '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ), true )
		) {
			return strtoupper( $query['compare'] );
		}

		return $this->compare;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.

Advertisement

Leave a Reply