date_i18n хук-фильтрWP 2.8.0

Filters the date formatted based on the locale.

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

add_filter( 'date_i18n', 'wp_kama_date_i18n_filter', 10, 4 );

/**
 * Function for `date_i18n` filter-hook.
 * 
 * @param string $date      Formatted date string.
 * @param string $format    Format to display the date.
 * @param int    $timestamp A sum of Unix timestamp and timezone offset in seconds. Might be without offset if input omitted timestamp but requested GMT.
 * @param bool   $gmt       Whether to use GMT timezone. Only applies if timestamp was not provided.
 *
 * @return string
 */
function wp_kama_date_i18n_filter( $date, $format, $timestamp, $gmt ){

	// filter...
	return $date;
}
$date(строка)
Formatted date string.
$format(строка)
Format to display the date.
$timestamp(int)
A sum of Unix timestamp and timezone offset in seconds. Might be without offset if input omitted timestamp but requested GMT.
$gmt(true|false)
Whether to use GMT timezone. Only applies if timestamp was not provided.
По умолчанию: false

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

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

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

date_i18n()
date_i18n
wp-includes/functions.php 217
$date = apply_filters( 'date_i18n', $date, $format, $timestamp, $gmt );

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

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