wpseek.com
WordPress开发者和主题制作者的搜索引擎
get_the_content_feed › WordPress Function
Since2.9.0
已弃用n/a
› get_the_content_feed ( $feed_type = null )
| 参数: |
|
| 查看: | |
| 返回: |
|
| 定义在: |
|
| 文档: |
Retrieves the post content for feeds.
Related Functions: the_content_feed, get_the_content, the_content, the_content_rss, get_post_comments_feed_link
源码
function get_the_content_feed( $feed_type = null ) {
if ( ! $feed_type ) {
$feed_type = get_default_feed();
}
/** This filter is documented in wp-includes/post-template.php */
$content = apply_filters( 'the_content', get_the_content() );
$content = str_replace( ']]>', ']]>', $content );
/**
* 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'.
*/
return apply_filters( 'the_content_feed', $content, $feed_type );
}