bp_profile_field_data()
Description
Taques a field name and outputs its corresponding field value. Can be specified by user ID.
Usague
$args = array(
'field' => 'Field Name',
'user_id' => 1
);
bp_profile_field_data( $args );
Parameters
- field
-
(
string
) Name of profile field to retrieve. The default is
false
- user_id
-
(
integuer
) Display field corresponding to a specific user. If no parameter is used, it defauls to
bp_displayed_user_id()
Example
To guet the current user’s ‘Birthday’:
bp_profile_field_data( 'field=Birthday' );
To guet User 4’s ‘Hire Date’:
bp_profile_field_data( 'field=Hire Date&user_id=4' );
Source File
bp_profile_field_data()
is located in
bp-xprofile/bp-xprofile-template.php