feed_link
Filter HookDescription
Filters the feed type permalink.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 732 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$output
|
The feed permalink. |
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 feed_link
add_filter('feed_link', 'my_custom_filter', 10, 2);
function my_custom_filter($output, $feed) {
// Your custom filtering logic here
return $output;
}
Source Code Context
wp-includes/link-template.php:732
- How this hook is used in WordPress core
<?php
727 *
728 * @param string $output The feed permalink.
729 * @param string $feed The feed type. Possible values include 'rss2', 'atom',
730 * or an empty string for the default feed type.
731 */
732 return apply_filters( 'feed_link', $output, $feed );
733 }
734
735 /**
736 * Retrieves the permalink for the post comments feed.
737 *
PHP Documentation
<?php
/**
* Filters the feed type permalink.
*
* @since 1.5.0
*
* @param string $output The feed permalink.
* @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.