get_profile()
get_profile( string $field, false|int $user = false )
基于字段检索用户数据。
Retrieve user data based on field.
说明(Description)
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$field | (string) | 必需 | 用户元字段。 |
$user | (false | int) | 可选 | 要检索字段的用户ID。默认值为false(当前用户)。 |
返回(Return)
(string)当前作者的数据库对象中的作者字段。
源码(Source)
get_profile() 函数的代码位于 wp-includes/user.php - (2.9.2)get_profile() 函数的代码位于 wp-includes/deprecated.php - (Deprecated, 3.0)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.0.0 | wp-includes/deprecated.php:2411 | 0 | 3 |
get_profile() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_profile/