get_lastpostmodified WordPress Filter Hook

The get_lastpostmodified Wordpress hook allows you to retrieve the date and time of the last post or page that was modified. This can be useful for displaying the most recent updated content on your site.

apply_filters( 'get_lastpostmodified', string|false $lastpostmodified, string $timezone, string $post_type ) #

Filters the most recent time that a post on the site was modified.


Parameters

$lastpostmodified

(string|false)The most recent time that a post was modified, in 'Y-m-d H:i:s' format. False on failure.

$timezone

(string)Location to use for getting the post modified date. See get_lastpostdate() for accepted $timezone values.

$post_type

(string)The post type to check.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Added the $post_type parameter.
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More