get_lastpostdate

FUNCTION wp-includes\post.php (ligne 7473) github
Filters the capability to read private posts for a custom post type when generating SQL for getting posts by author.

Paramètres

Entrée :
$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

// Utilisation de la fonction get_lastpostdate
$result = get_lastpostdate($timezone = 'server', $post_type = 'any');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...