wp_date хук-фильтрWP 5.3.0

Filters the date formatted based on the locale.

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

add_filter( 'wp_date', 'wp_kama_date_filter', 10, 4 );

/**
 * Function for `wp_date` filter-hook.
 * 
 * @param string       $date      Formatted date string.
 * @param string       $format    Format to display the date.
 * @param int          $timestamp Unix timestamp.
 * @param DateTimeZone $timezone  Timezone.
 *
 * @return string
 */
function wp_kama_date_filter( $date, $format, $timestamp, $timezone ){

	// filter...
	return $date;
}
$date(строка)
Formatted date string.
$format(строка)
Format to display the date.
$timestamp(int)
Unix timestamp.
$timezone(DateTimeZone)
Timezone.

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

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

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

wp_date()
wp_date
wp-includes/functions.php 314
$date = apply_filters( 'wp_date', $date, $format, $timestamp, $timezone );

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

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