wp_date
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-includes/functions.php 314
$date = apply_filters( 'wp_date', $date, $format, $timestamp, $timezone );