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.001856 sec (very slow) | 50000 times — 3.18 sec (fast) | PHP 7.1.5, WP 4.8.2

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 0.71 Introduced.

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

From category: Comments

No comments
    Log In