function get_lastpostmodified($timezone = 'server') {}

Retrieve last post modified date depending on timezone.
The server timezone is the default and is the difference between GMT and server time. The ‘blog’ value is just when the last post was modified. The ‘gmt’ is when the last post was modified in GMT time.


  • string $timezone: The location to get the time. Can be ‘gmt’, ‘blog’, or ‘server’.

Return values

returns:The date the post was last modified.

Defined filters

  • get_lastpostmodified
    apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone )

Source code

function get_lastpostmodified($timezone = 'server') {

	$lastpostmodified = _get_last_post_time( $timezone, 'modified' );

	$lastpostdate = get_lastpostdate($timezone);

	if ( $lastpostdate > $lastpostmodified )

		$lastpostmodified = $lastpostdate;

	return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: