get_lastpostdate WordPress Filter Hook
The get_lastpostdate() function is used to get the post date of the last post. This function can be used with any post type.
apply_filters( 'get_lastpostdate', string|false $lastpostdate , string $timezone , string $post_type ) #
Filters the most recent time that a post on the site was published.
Parameters
- $lastpostdate
(string|false)The most recent time that a post was published, in 'Y-m-d H:i:s' format. False on failure.
- $timezone
(string)Location to use for getting the post published date. See get_lastpostdate() for accepted
$timezone
values.- $post_type
(string)The post type to check.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
5.5.0 | Added the $post_type parameter. |
2.3.0 | Introduced. |