函数原型
get_currentuserinfo(): bool|WP_User
函数描述
Populate global variables with information about the currently logged in user.
是否弃用
Warning: This function has been deprecated. Use wp_get_current_user() instead.
函数参数
无
函数返回值
bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
函数位置
File: wp-includes/pluggable-deprecated.php.
函数源码
function get_currentuserinfo() {
_deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );
return _wp_get_current_user();
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.5.0 | Use wp_get_current_user() |
| 0.71 | Introduced. |

