get_comments_link WordPress Filter Hook

The get_comments_link hook is used to display a link to the comments for a post. This hook is used by the default WordPress comments template.

apply_filters( 'get_comments_link', string $comments_link, int|WP_Post $post_id ) #

Filters the returned post comments permalink.


Parameters

$comments_link

(string)Post comments permalink with '#comments' appended.

$post_id

(int|WP_Post)Post ID or WP_Post object.


Top ↑

Source

File: wp-includes/comment-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More