WP_Date_Query::get_sql()

Generate WHERE clause to be appended to a main query.


Return

(string) MySQL WHERE clause.


Source

File: wp-includes/date.php

	public function get_sql() {
		$sql = $this->get_sql_clauses();

		$where = $sql['where'];

		/**
		 * Filters the date query WHERE clause.
		 *
		 * @since WP-3.7.0
		 *
		 * @param string        $where WHERE clause of the date query.
		 * @param WP_Date_Query $this  The WP_Date_Query instance.
		 */
		return apply_filters( 'get_date_sql', $where, $this );
	}


Changelog

Changelog
Version Description
WP-3.7.0 Introduced.