WordPress at a glance

comment_link() WP 1.0

Display the link to the comments.

Works based on: get_comment_link()
1 time = 0.053325s = extremely slow | 50000 times = 9.37s = fast
Hooks from the function
Return

Null. Nothing.

Usage

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

Changelog

Since 1.5.0 Introduced.
Since 4.4.0 Introduced the $comment argument.

Code of comment_link() WP 5.5.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 ) ) );
}

From tag: Comments

More from tag: Link (URL)

More from category: Comments Loop

No comments
    Log In . Register