rss_enclosure
云策文档标注
概述
rss_enclosure 是一个 WordPress 过滤器,用于修改当前文章的 RSS enclosure HTML 链接标签。它允许开发者自定义输出格式。
关键要点
- 过滤器名称:rss_enclosure
- 参数:$html_link_tag(字符串),包含 URI 和其他属性的 HTML 链接标签
- 相关函数:rss_enclosure() 用于显示当前文章的 RSS enclosure
- 引入版本:WordPress 2.2.0
原文内容
Filters the RSS enclosure HTML link tag for the current post.
Parameters
$html_link_tagstring-
The HTML link tag with a URI and other attributes.
Source
echo apply_filters( 'rss_enclosure', '<enclosure url="' . esc_url( trim( $enclosure[0] ) ) . '" length="' . absint( trim( $enclosure[1] ) ) . '" type="' . esc_attr( $type ) . '" />' . "n" );
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |