comment_link( int|WP_Comment $comment = null )

Display the link to the comments.


Parameters

$comment

(int|WP_Comment) (Optional) Comment object or id. Defaults to global comment object.

Default value: null


Source

File: wp-includes/feed.php

function comment_link( $comment = null ) {
	/**
	 * Filters the current comment's permalink.
	 *
	 * @since WP-3.6.0
	 *
	 * @see get_comment_link()
	 *
	 * @param string $comment_permalink The current comment permalink.
	 */
	echo esc_url( apply_filters( 'comment_link', get_comment_link( $comment ) ) );
}


Changelog

Changelog
Version Description
WP-4.4.0 Introduced the $comment argument.
WP-1.5.0 Introduced.