get_lastpostmodified filter-hookWP 2.3.0

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

Usage

add_filter( 'get_lastpostmodified', 'wp_kama_get_lastpostmodified_filter', 10, 3 );

/**
 * Function for `get_lastpostmodified` filter-hook.
 * 
 * @param string|false $lastpostmodified The most recent time that a post was modified, in 'Y-m-d H:i:s' format. False on failure.
 * @param string       $timezone         Location to use for getting the post modified date. See get_lastpostdate() for accepted `$timezone` values.
 * @param string       $post_type        The post type to check.
 *
 * @return string|false
 */
function wp_kama_get_lastpostmodified_filter( $lastpostmodified, $timezone, $post_type ){

	// filter...
	return $lastpostmodified;
}
$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.

Changelog

Since 2.3.0 Introduced.
Since 5.5.0 Added the $post_type parameter.

Where the hook is called

get_lastpostmodified()
get_lastpostmodified
wp-includes/post.php 7276
return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone, $post_type );

Where the hook is used in WordPress

Usage not found.