W3cubDocs

/WordPress

apply_filters( ‘get_post_time’, string|int $time, string $format, bool $gmt )

Filters the localized time a post was written.

Parameters

$timestring|int
Formatted date string or Unix timestamp if $format is 'U' or 'G'.
$formatstring
Format to use for retrieving the time the post was written.
Accepts 'G', 'U', or PHP date format.
$gmtbool
Whether to retrieve the GMT time.

Source

return apply_filters( 'get_post_time', $time, $format, $gmt );

Changelog

Version Description
2.6.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_post_time