get_comment_excerpt

FUNCTION wp-includes\comment-template.php (ligne 646) github
Retrieves the excerpt of the given comment. Returns a maximum of 20 words with an ellipsis appended if necessary.

Paramètres

Entrée :
$comment_id = 0
Sortie :
@param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the excerpt.
@return string The possibly truncated comment excerpt.

Utilisation

// Utilisation de la fonction get_comment_excerpt
$result = get_comment_excerpt($comment_id = 0);

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

Actualités

Chargement des actualités...