bp_get_profile_field_data( string|array $args = '' )
Return XProfile field data.
Description
Parameters
- $args
-
(Optional) Array of arguments for field data.
- 'field'
(string|int|bool) Field identifier. - 'user_id'
(int) ID of the user to get field data for.
Default value: ''
- 'field'
Return
(mixed)
Source
File: bp-xprofile/bp-xprofile-template.php
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | function bp_get_profile_field_data( $args = '' ) { $r = wp_parse_args( $args , array ( 'field' => false, // Field name or ID. 'user_id' => bp_displayed_user_id() ) ); /** * Filters the profile field data. * * @since BuddyPress 1.2.0 * @since BuddyPress 2.6.0 Added the `$r` parameter. * * @param mixed $value Profile data for a specific field for the user. * @param array $r Array of parsed arguments. */ return apply_filters( 'bp_get_profile_field_data' , xprofile_get_field_data( $r [ 'field' ], $r [ 'user_id' ] ), $r ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.