rss_tag_pre
云策文档标注
概述
rss_tag_pre 是一个 WordPress 动作钩子,在 RSS 或 Atom 源的 xml 和 rss 标签之间触发,用于自定义源输出。
关键要点
- 这是一个动作钩子,允许开发者在源生成过程中插入自定义代码。
- 参数 $context 指定源类型,如 'rss2'、'atom' 等。
- 从 WordPress 4.0.0 版本开始引入。
代码示例
do_action( 'rss_tag_pre', 'rss2' );
原文内容
Fires between the xml and rss tags in a feed.
Parameters
$contextstring-
Type of feed. Possible values include
'rss2','rss2-comments','rdf','atom', and'atom-comments'.
Source
do_action( 'rss_tag_pre', 'rss2' );
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |