the_category_rss
云策文档标注
概述
the_category_rss 是一个 WordPress 过滤器钩子,用于在 RSS 或 Atom 订阅源中过滤和格式化文章分类列表。它允许开发者自定义分类在订阅源中的显示方式。
关键要点
- 过滤器钩子名称:the_category_rss
- 参数:$the_list(字符串,所有 RSS 文章分类列表)和 $type(字符串,订阅源类型,如 'rss2' 或 'atom',默认 'rss2')
- 用途:在订阅源中过滤文章分类,常用于 get_the_category_rss() 函数
- 引入版本:WordPress 1.2.0
原文内容
Filters all of the post categories for display in a feed.
Parameters
$the_liststring-
All of the RSS post categories.
$typestring-
Type of feed. Possible values include
'rss2','atom'.
Default'rss2'.
Source
return apply_filters( 'the_category_rss', $the_list, $type );
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |