get_the_author_aim()
云策文档标注
概述
get_the_author_aim() 是一个已弃用的 WordPress 函数,用于获取当前文章作者的 AIM 地址。自 WordPress 2.8.0 起,建议使用 get_the_author_meta('aim') 替代。
关键要点
- 函数功能:检索当前文章作者的 AIM 地址。
- 弃用状态:自 WordPress 2.8.0 版本起被弃用,推荐使用 get_the_author_meta('aim')。
- 返回值:返回字符串类型的作者 AIM 地址。
- 相关函数:与 get_the_author_meta() 和 _deprecated_function() 相关。
代码示例
function get_the_author_aim() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('aim')' );
return get_the_author_meta('aim');
}注意事项
- 此函数已弃用,新代码中应避免使用,改用 get_the_author_meta('aim') 以确保兼容性。
- 弃用信息通过 _deprecated_function() 标记,使用时可能会触发警告。
原文内容
Retrieve the AIM address of the author of the current post.
Description
See also
Source
function get_the_author_aim() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('aim')' );
return get_the_author_meta('aim');
}
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Deprecated. Use get_the_author_meta() |
| 1.5.0 | Introduced. |