get_the_author_icq()
云策文档标注
概述
get_the_author_icq() 是一个已弃用的 WordPress 函数,用于获取当前文章作者的 ICQ 号码。自 2.8.0 版本起,建议使用 get_the_author_meta('icq') 替代。
关键要点
- 函数功能:检索当前文章作者的 ICQ 号码。
- 返回值:字符串类型,返回作者的 ICQ 号码。
- 弃用状态:自 WordPress 2.8.0 版本起被弃用,应改用 get_the_author_meta('icq')。
- 相关函数:get_the_author_meta() 用于获取作者元数据,_deprecated_function() 用于标记弃用函数。
代码示例
function get_the_author_icq() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('icq')' );
return get_the_author_meta('icq');
}注意事项
- 此函数已弃用,新代码中应避免使用,以保持兼容性和最佳实践。
- 弃用信息通过 _deprecated_function() 输出,提醒开发者更新代码。
原文内容
Retrieve the ICQ number of the author of the current post.
Description
See also
Source
function get_the_author_icq() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('icq')' );
return get_the_author_meta('icq');
}
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Deprecated. Use get_the_author_meta() |
| 1.5.0 | Introduced. |