post_comments_feed_link_html

Filters the post comment feed link anchor tag.

Description

apply_filters( 'post_comments_feed_link_html', (string) $link, (int) $post_id, (string) $feed ); 

Parameters (3)

0. $link (string)
The complete anchor tag for the comment feed link.
1. $post_id (int)
The post id.
2. $feed (string)
The feed type, or an empty string for the default feed type.

Usage

To run the hook, copy the example below.
  1. $link = apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed ); 
  2.  
  3. if ( !empty( $link ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the post_comments_feed_link_html callback 
  2. function filter_post_comments_feed_link_html( $link, $post_id, $feed ) { 
  3. // make filter magic happen here... 
  4. return $link
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'post_comments_feed_link_html', 'filter_post_comments_feed_link_html', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'post_comments_feed_link_html', 'filter_post_comments_feed_link_html', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/link-template.php  
  1. echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed );