wp_date filter-hookWP 5.3.0

Filters the date formatted based on the locale.

Usage

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(string)
Formatted date string.
$format(string)
Format to display the date.
$timestamp(int)
Unix timestamp.
$timezone(DateTimeZone)
Timezone.

Changelog

Since 5.3.0 Introduced.

Where the hook is called

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

Where the hook is used in WordPress

Usage not found.