WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get lastpostmodified

Description

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.

Usage

<?php get_lastpostmodified$timezone ); ?>

Parameters

$timezone
(string) (optional) The location to get the time. Can be 'gmt', 'blog', or 'server'.
Default: 'server'

Return Values

(string) 
The date the post was last modified.

Examples

Notes

  • Uses: apply_filters() Calls 'get_lastpostmodified' filter
  • Uses global: (mixed) $cache_lastpostmodified Stores the date the last post was last modified.
  • Uses global: (object) $wpdb
  • Uses global: (integer) $blog_id The Blog ID.

Change Log

Since: 1.2.0

Source File

get_lastpostmodified() is located in wp-includes/post.php.

Related

See also index of Function Reference and index of Template Tags.