get_lastpostdate хук-фильтрWP 2.3.0

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

Использование

add_filter( 'get_lastpostdate', 'wp_kama_get_lastpostdate_filter', 10, 3 );

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

	// filter...
	return $lastpostdate;
}
$lastpostdate(строка|false)
The most recent time that a post was published, in 'Y-m-d H:i:s' format. False on failure.
$timezone(строка)
Location to use for getting the post published date. See get_lastpostdate() for accepted $timezone values.
$post_type(строка)
The post type to check.

Список изменений

С версии 2.3.0 Введена.
С версии 5.5.0 Added the $post_type parameter.

Где вызывается хук

get_lastpostdate()
get_lastpostdate
wp-includes/post.php 7413
return apply_filters( 'get_lastpostdate', $lastpostdate, $timezone, $post_type );

Где используется хук в WordPress

Использование не найдено.