get_comments_link

FUNCTION wp-includes\comment-template.php (ligne 849) github
Filters the returned single comment permalink.

Paramètres

Entrée :
$post = 0
Sortie :
@param string     $comment_link The comment permalink with '#comment-$id' appended.
@param WP_Comment $comment      The current comment object.
@param array      $args         An array of arguments to override the defaults.
@param int        $cpage        The calculated 'cpage' value.
@param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
@return string The link to the comments.

Utilisation

// Utilisation de la fonction get_comments_link
$result = get_comments_link($post = 0);

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

Actualités

Chargement des actualités...