On this page
the_feed_link( string $anchor, string $feed = '' )
Displays the permalink for the feed type.
Parameters
$anchorstring Required-
The link's anchor text.
$feedstring Optional-
Feed type. Possible values include
'rss2','atom'.
Default is the value of get_default_feed() .Default:
''
Source
File: wp-includes/link-template.php. View all references
function the_feed_link( $anchor, $feed = '' ) {
$link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>';
/**
* 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.
*/
echo apply_filters( 'the_feed_link', $link, $feed );
}
Hooks
- apply_filters( 'the_feed_link',
string $link ,string $feed ) -
Filters the feed link anchor tag.
Related
Uses
| Uses | Description |
|---|---|
| get_feed_link() wp-includes/link-template.php | Retrieves the permalink for the feed type. |
| 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/the_feed_link