the_content_feed()
云策文档标注
概述
the_content_feed() 是一个 WordPress 函数,用于在 RSS 或 Atom 等订阅源中显示文章内容。它通过调用 get_the_content_feed() 来输出内容,并支持指定订阅源类型。
关键要点
- 函数用途:在订阅源中显示文章内容,适用于 RSS、Atom 等格式。
- 参数:$feed_type(可选),指定订阅源类型,如 rss2、atom、rss、rdf,默认值为 null。
- 实现方式:内部调用 get_the_content_feed() 函数来获取并输出内容。
- 相关函数:get_the_content_feed() 用于检索订阅源中的文章内容。
- 版本历史:自 WordPress 2.9.0 版本引入。
原文内容
Displays the post content for feeds.
Parameters
$feed_typestringoptional-
The type of feed. rss2 | atom | rss | rdf
Default:
null
Source
function the_content_feed( $feed_type = null ) {
echo get_the_content_feed( $feed_type );
}
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |