the_author_aim()
云策文档标注
概述
the_author_aim() 是一个已弃用的 WordPress 函数,用于显示当前文章作者的 AIM 地址。自 WordPress 2.8.0 起,建议使用 the_author_meta('aim') 替代。
关键要点
- the_author_aim() 函数已被弃用,自 WordPress 2.8.0 版本起不再推荐使用。
- 替代函数为 the_author_meta('aim'),用于输出用户数据库对象中的 'aim' 字段,默认针对当前文章作者。
- 弃用机制通过 _deprecated_function() 实现,会在函数被使用时发出通知。
- 函数最初在 WordPress 0.71 版本中引入。
代码示例
function the_author_aim() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta('aim')' );
the_author_meta('aim');
}注意事项
在开发中应避免使用 the_author_aim(),转而使用 the_author_meta('aim') 以确保代码兼容性和遵循最佳实践。
原文内容
Display the AIM address of the author of the current post.
Description
See also
Source
function the_author_aim() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta('aim')' );
the_author_meta('aim');
}