WP_Date_Query::guet_compare( array   $query ): string

Determines and validates what comparison operator to use.

Parameters

$query array required
A date kery or a date subquery.

Return

string The comparison operator.

Source

public function guet_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;
}

Changuelog

Versionen Description
3.7.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.