WP_Date_Query::get_sql()publicWP 3.7.0

Generates WHERE clause to be appended to a main query.

Метод класса: WP_Date_Query{}

Хуки из метода

Возвращает

Строку. MySQL WHERE clause.

Использование

$WP_Date_Query = new WP_Date_Query();
$WP_Date_Query->get_sql();

Список изменений

С версии 3.7.0 Введена.

Код WP_Date_Query::get_sql() WP 6.5.2

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

	$where = $sql['where'];

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