the_permalink_rss
Filter HookDescription
Filters the permalink to the post for use in feeds.Hook Information
File Location |
wp-includes/feed.php
View on GitHub
|
Hook Type | Filter |
Line Number | 252 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$post_permalink
|
The current post permalink. |
Usage Examples
Basic Usage
<?php
// Hook into the_permalink_rss
add_filter('the_permalink_rss', 'my_custom_filter', 10, 1);
function my_custom_filter($post_permalink) {
// Your custom filtering logic here
return $post_permalink;
}
Source Code Context
wp-includes/feed.php:252
- How this hook is used in WordPress core
<?php
247 *
248 * @since 2.3.0
249 *
250 * @param string $post_permalink The current post permalink.
251 */
252 echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) );
253 }
254
255 /**
256 * Outputs the link to the comments for the current post in an XML safe way.
257 *
PHP Documentation
<?php
/**
* Filters the permalink to the post for use in feeds.
*
* @since 2.3.0
*
* @param string $post_permalink The current post permalink.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/feed.php
Related Hooks
Related hooks will be displayed here in future updates.