get_profile
函数
get_profile ( $field, $user = false )
- 参数
-
-
(string)
$field
User meta field.- Required: 是
-
(false|int)
$user
Optional. User ID to retrieve the field for. Default false (current user).- Required: 否
- Default: false
-
(string)
- 返回值
-
- (string) The author’s field from the current author’s DB object.
- 相关
-
- get_the_author_meta()
- 定义位置
-
-
wp-includes/deprecated.php
, line 2419
-
wp-includes/deprecated.php
- 引入
- 1.5.0
- 弃用
- 3.0.0
Retrieve user data based on field.
function get_profile( $field, $user = false ) { _deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' ); if ( $user ) { $user = get_user_by( 'login', $user ); $user = $user->ID; } return get_the_author_meta( $field, $user ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。