the_content_feed
Filter HookDescription
Filters the post content for use in feeds.Hook Information
File Location |
wp-includes/feed.php
View on GitHub
|
Hook Type | Filter |
Line Number | 208 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$content
|
The current post content. |
string
|
$feed_type
|
Type of feed. Possible values include 'rss2', 'atom'. Default 'rss2'. |
Usage Examples
Basic Usage
<?php
// Hook into the_content_feed
add_filter('the_content_feed', 'my_custom_filter', 10, 2);
function my_custom_filter($content, $feed_type) {
// Your custom filtering logic here
return $content;
}
Source Code Context
wp-includes/feed.php:208
- How this hook is used in WordPress core
<?php
203 *
204 * @param string $content The current post content.
205 * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
206 * Default 'rss2'.
207 */
208 return apply_filters( 'the_content_feed', $content, $feed_type );
209 }
210
211 /**
212 * Displays the post content for feeds.
213 *
PHP Documentation
<?php
/**
* Filters the post content for use in feeds.
*
* @since 2.9.0
*
* @param string $content The current post content.
* @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
* Default 'rss2'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/feed.php
Related Hooks
Related hooks will be displayed here in future updates.