Filter hook 'the_feed_link'

in WP Core File wp-includes/link-template.php at line 679

View Source

the_feed_link

Filter Hook
Description
Filters the feed link anchor tag.

Hook Information

File Location wp-includes/link-template.php View on GitHub
Hook Type Filter
Line Number 679

Hook Parameters

Type Name Description
string $link The complete anchor tag for a feed link.
string $feed The feed type. Possible values include 'rss2', 'atom', or an empty string for the default feed type.

Usage Examples

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

function my_custom_filter($link, $feed) {
    // Your custom filtering logic here
    return $link;
}

Source Code Context

wp-includes/link-template.php:679 - How this hook is used in WordPress core
<?php
 674  	 *
 675  	 * @param string $link The complete anchor tag for a feed link.
 676  	 * @param string $feed The feed type. Possible values include 'rss2', 'atom',
 677  	 *                     or an empty string for the default feed type.
 678  	 */
 679  	echo apply_filters( 'the_feed_link', $link, $feed );
 680  }
 681  
 682  /**
 683   * Retrieves the permalink for the feed type.
 684   *

PHP Documentation

<?php
/**
	 * Filters the feed link anchor tag.
	 *
	 * @since 3.0.0
	 *
	 * @param string $link The complete anchor tag for a feed link.
	 * @param string $feed The feed type. Possible values include 'rss2', 'atom',
	 *                     or an empty string for the default feed type.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/link-template.php
Related Hooks

Related hooks will be displayed here in future updates.