feed_content_type
云策文档标注
概述
feed_content_type 过滤器用于修改特定 feed 类型的内容类型。它允许开发者自定义 feed 的 Content-Type 头,以指示 feed 包含的数据类型。
关键要点
- 过滤器名称:feed_content_type
- 参数:$content_type(字符串,表示 feed 的内容类型)和 $type(字符串,表示 feed 类型,可能值包括 'rss'、'rss2'、'atom' 和 'rdf')
- 返回值:应用过滤器后的 $content_type
- 相关函数:feed_content_type() 用于返回指定 feed 类型的内容类型
- 引入版本:WordPress 2.8.0
原文内容
Filters the content type for a specific feed type.
Parameters
$content_typestring-
Content type indicating the type of data that a feed contains.
$typestring-
Type of feed. Possible values include
'rss', rss2′,'atom', and'rdf'.
Source
return apply_filters( 'feed_content_type', $content_type, $type );
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |