Filters the capability to read private posts for a custom post type when generating SQL for getting posts by author.
$timezone = 'server', $post_type = 'any'
Sortie :
@param string $cap Capability. @param string $timezone Optional. The timezone for the timestamp. Accepts 'server', 'blog', or 'gmt'. @param string $post_type Optional. The post type to check. Default 'any'. @return string The date of the last post, or false on failure.
// Utilisation de la fonction get_lastpostdate
$result = get_lastpostdate($timezone = 'server', $post_type = 'any');
if ($result) {
// Votre logique ici
}
Chargement des actualités...