the_excerpt_rss
云策文档标注
概述
the_excerpt_rss 是一个 WordPress 过滤器,用于在 RSS 或 Atom 订阅源中过滤文章的摘要输出。它允许开发者修改或自定义摘要内容,适用于 feed 生成场景。
关键要点
- 过滤器名称:the_excerpt_rss
- 参数:$output(字符串类型,表示当前文章摘要)
- 用途:在 feed 中显示文章摘要时,通过 apply_filters 调用此过滤器
- 相关函数:the_excerpt_rss() 用于在 feed 中显示摘要
- 引入版本:WordPress 1.2.0
原文内容
Filters the post excerpt for a feed.
Parameters
$outputstring-
The current post excerpt.
Source
echo apply_filters( 'the_excerpt_rss', $output );
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |