WordPress at a glance

comment_link() WP 1.0

Display the link to the comments.

  • Since 4.4.0 Introduced the $comment argument.
Works based on: get_comment_link()
✈ 1 time = 0.053325s = extreme slow | 50000 times = 9.37s = fast

No Hooks.

Return

Nothing (null).

Usage

comment_link( $comment );
$comment(int/WP_Comment)
Comment object or id.
Default: global comment object

Code of comment_link: wp-includes/feed.php VER 5.0.1

<?php
function comment_link( $comment = null ) {
	/**
	 * Filters the current comment's permalink.
	 *
	 * @since 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 ) ) );
}

Related Functions

From tag: Comments

More from tag: Link (URL)

More from category: Comments Loop

No comments
    Hello, !     Log In . Register