permalink_single_rss()
云策文档标注
概述
permalink_single_rss() 是一个已弃用的 WordPress 函数,用于输出 RSS 源中文章的固定链接。自 2.3.0 版本起,建议使用 the_permalink_rss() 替代。
关键要点
- 该函数已被弃用,自 WordPress 2.3.0 起,应改用 the_permalink_rss() 函数。
- 函数接受一个已弃用的参数 $deprecated,但实际功能是直接调用 the_permalink_rss()。
- 相关函数包括 the_permalink_rss() 用于在源中显示文章固定链接,以及 _deprecated_function() 用于标记弃用函数。
代码示例
function permalink_single_rss($deprecated = '') {
_deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
the_permalink_rss();
}注意事项
- 在开发中应避免使用此函数,以保持代码兼容性和遵循最佳实践。
- 如果需要在源中输出文章固定链接,请直接调用 the_permalink_rss()。
原文内容
Print the permalink to the RSS feed.
Description
See also
Parameters
$deprecatedstringrequired
Source
function permalink_single_rss($deprecated = '') {
_deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
the_permalink_rss();
}
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Deprecated. Use the_permalink_rss() |
| 0.71 | Introduced. |