the_feed_link

Displays the permalink for the feed type.

Description

the_feed_link( (string) $anchor, (string) $feed = '' ); 

Parameters (2)

0. $anchor (string)
The link's anchor text.
1. $feed — Optional. (string) => ''
Feed type. Default empty.

Usage

  1. if ( !function_exists( 'the_feed_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/link-template.php'; 
  3.  
  4. // The link's anchor text. 
  5. $anchor = ''; 
  6.  
  7. // Optional. Feed type. Default empty. 
  8. $feed = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = the_feed_link($anchor, $feed); 
  12.  

Defined (1)

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

/wp-includes/link-template.php  
  1. function the_feed_link( $anchor, $feed = '' ) { 
  2. $link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>'; 
  3.  
  4. /** 
  5. * Filters the feed link anchor tag. 
  6. * @since 3.0.0 
  7. * @param string $link The complete anchor tag for a feed link. 
  8. * @param string $feed The feed type, or an empty string for the 
  9. * default feed type. 
  10. */ 
  11. echo apply_filters( 'the_feed_link', $link, $feed );