post_comments_link WordPress Filter Hook

The post_comments_link WordPress hook is a great way to easily add a link to the comments section of your blog posts. This hook allows you to specify the text that should be used for the link, as well as the CSS class that should be applied to it.

apply_filters( 'post_comments_link', string $formatted, int|WP_Post $post ) #

Filters the formatted post comments link HTML.


Parameters

$formatted

(string)The HTML-formatted post comments link.

$post

(int|WP_Post)The post ID or WP_Post object.


Top ↑

Source

File: wp-includes/comment-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.7.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