On this page
comments_link_feed()
Outputs the link to the comments for the current post in an XML safe way.
Source
File: wp-includes/feed.php. View all references
function comments_link_feed() {
/**
* Filters the comments permalink for the current post.
*
* @since 3.6.0
*
* @param string $comment_permalink The current comment permalink with
* '#comments' appended.
*/
echo esc_url( apply_filters( 'comments_link_feed', get_comments_link() ) );
}
Hooks
- apply_filters( 'comments_link_feed',
string $comment_permalink ) -
Filters the comments permalink for the current post.
Related
Uses
| Uses | Description |
|---|---|
| get_comments_link() wp-includes/comment-template.php | Retrieves the link to the current post comments. |
| esc_url() wp-includes/formatting.php | Checks and cleans a URL. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/comments_link_feed