WPDev.one
Core Function
View Source on Trac ↗

_get_last_post_time()

_get_last_post_time( mixed $timezone, mixed $field, mixed $post_type = 'any' )

Gets the timestamp of the last time any post was modified or published.

Parameters 2 required

Name / Type Description
string

$timezone The timezone for the timestamp. See get_lastpostdate(). for information on accepted values.

Required
$field
string

Post field to check. Accepts 'date' or 'modified'.

Required
$post_type
string

Optional. The post type to check. Default 'any'.

Return Value

((string)
| false) The timestamp in 'Y-m-d H:i:s' format, or false on failure.

Function Information

Since Version
3.1.0
Source File
wp-includes/post.php
Advertisement