the_permalink_rss
Filters the permalink to the post for use in feeds.
Description
Parameters (1)
- 0. $get_permalink (string) =>
get_permalink()
- The current post permalink.
Usage
- To run the hook, copy the example below.
- $get_permalink = apply_filters( 'the_permalink_rss', $get_permalink );
- if ( !empty( $get_permalink ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the the_permalink_rss callback
- function filter_the_permalink_rss( $get_permalink ) {
- // make filter magic happen here...
- return $get_permalink;
- };
- // add the filter
- add_filter( 'the_permalink_rss', 'filter_the_permalink_rss', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'the_permalink_rss', 'filter_the_permalink_rss', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/feed.php
- echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) );