get_date_sql хук-фильтрWP 3.7.0

Filters the date query WHERE clause.

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

add_filter( 'get_date_sql', 'wp_kama_get_date_sql_filter', 10, 2 );

/**
 * Function for `get_date_sql` filter-hook.
 * 
 * @param string        $where WHERE clause of the date query.
 * @param WP_Date_Query $query The WP_Date_Query instance.
 *
 * @return string
 */
function wp_kama_get_date_sql_filter( $where, $query ){

	// filter...
	return $where;
}
$where(строка)
WHERE clause of the date query.
$query(WP_Date_Query)
The WP_Date_Query instance.

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

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

Где вызывается хук

WP_Date_Query::get_sql()
get_date_sql
wp-includes/class-wp-date-query.php 567
return apply_filters( 'get_date_sql', $where, $this );

Где используется хук в WordPress

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