Filters the date formatted based on the locale.
$format, $timestamp = null, $timezone = null
Sortie :
@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. @param bool $gmt Whether to use GMT timezone. Only applies if timestamp was not provided. @param string $format PHP date format. @param int|null $timestamp Optional. Unix timestamp. Defaults to current time. @param DateTimeZone|null $timezone Optional. Timezone to output result in. Defaults to timezone @return string|false The date, translated if locale specifies it. False on invalid timestamp input.
// Utilisation de la fonction wp_date
$result = wp_date($format, $timestamp = null, $timezone = null);
if ($result) {
// Votre logique ici
}
Chargement des actualités...