the_permalink_rss
云策文档标注
概述
the_permalink_rss 是一个 WordPress 过滤器,用于在 RSS 或 Atom 等订阅源中过滤文章的固定链接。它允许开发者修改或自定义在订阅源中显示的链接。
关键要点
- 过滤器名称:the_permalink_rss
- 参数:$post_permalink(字符串类型,当前文章的固定链接)
- 用途:在订阅源中过滤和自定义文章链接
- 相关函数:the_permalink_rss() 用于显示订阅源中的链接
- 引入版本:WordPress 2.3.0
代码示例
echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) );
原文内容
Filters the permalink to the post for use in feeds.
Parameters
$post_permalinkstring-
The current post permalink.
Source
echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) );
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |