the_feed_link
Filters the feed link anchor tag.
Description
Parameters (2)
- 0. $link (string)
- The complete anchor tag for a feed link.
- 1. $feed (string)
- The feed type, or an empty string for the default feed type.
Usage
- To run the hook, copy the example below.
- $link = apply_filters( 'the_feed_link', $link, $feed );
- if ( !empty( $link ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the the_feed_link callback
- function filter_the_feed_link( $link, $feed ) {
- // make filter magic happen here...
- return $link;
- };
- // add the filter
- add_filter( 'the_feed_link', 'filter_the_feed_link', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'the_feed_link', 'filter_the_feed_link', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/link-template.php
- echo apply_filters( 'the_feed_link', $link, $feed );