WordPress at a glance

comments_link() WP 1.0

Display the link to the current post comments.

Works based on: get_comments_link()
✈ 1 time = 0.001856s = very slow | 50000 times = 3.18s = fast | PHP 7.1.5, WP 4.8.2

No Hooks.

Return

Null. Nothing.

Usage

comments_link( $deprecated, $deprecated_2 );
$deprecated(string)
Not Used.
Default: ''
$deprecated_2(string)
Not Used.
Default: ''

Changelog

Since 0.71 Introduced.

Code of comments link: wp-includes/comment-template.php WP 5.2.2

<?php
function comments_link( $deprecated = '', $deprecated_2 = '' ) {
	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '0.72' );
	}
	if ( ! empty( $deprecated_2 ) ) {
		_deprecated_argument( __FUNCTION__, '1.3.0' );
	}
	echo esc_url( get_comments_link() );
}

Related Functions

From category: Comments

No comments
    Hello, !     Log In . Register