post_comments_link filter-hookWP 2.7.0

Filters the formatted post comments link HTML.

Usage

add_filter( 'post_comments_link', 'wp_kama_post_comments_link_filter', 10, 2 );

/**
 * Function for `post_comments_link` filter-hook.
 * 
 * @param string      $post_reply_link The HTML-formatted post comments link.
 * @param int|WP_Post $post            The post ID or WP_Post object.
 *
 * @return string
 */
function wp_kama_post_comments_link_filter( $post_reply_link, $post ){

	// filter...
	return $post_reply_link;
}
$post_reply_link(string)
The HTML-formatted post comments link.
$post(int|WP_Post)
The post ID or WP_Post object.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

get_post_reply_link()
post_comments_link
wp-includes/comment-template.php 1943
return apply_filters( 'post_comments_link', $post_reply_link, $post );

Where the hook is used in WordPress

Usage not found.