Filter hook 'comments_link_feed'

in WP Core File wp-includes/feed.php at line 269

View Source

comments_link_feed

Filter Hook
Description
Filters the comments permalink for the current post.

Hook Information

File Location wp-includes/feed.php View on GitHub
Hook Type Filter
Line Number 269

Hook Parameters

Type Name Description
string $comment_permalink The current comment permalink with '#comments' appended.

Usage Examples

Basic Usage
<?php
// Hook into comments_link_feed
add_filter('comments_link_feed', 'my_custom_filter', 10, 1);

function my_custom_filter($comment_permalink) {
    // Your custom filtering logic here
    return $comment_permalink;
}

Source Code Context

wp-includes/feed.php:269 - How this hook is used in WordPress core
<?php
 264  	 * @since 3.6.0
 265  	 *
 266  	 * @param string $comment_permalink The current comment permalink with
 267  	 *                                  '#comments' appended.
 268  	 */
 269  	echo esc_url( apply_filters( 'comments_link_feed', get_comments_link() ) );
 270  }
 271  
 272  /**
 273   * Displays the feed GUID for the current comment.
 274   *

PHP Documentation

<?php
/**
	 * Filters the comments permalink for the current post.
	 *
	 * @since 3.6.0
	 *
	 * @param string $comment_permalink The current comment permalink with
	 *                                  '#comments' appended.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/feed.php
Related Hooks

Related hooks will be displayed here in future updates.