bp_get_profile_field_data
Filters the profile field data.
Description
Parameters (2)
- 0. $xprofile_get_field_data (mixed) =>
xprofile_get_field_data( $r['field'], $r['user_id'] )
- Profile data for a specific field for the user.
- 1. $r (array)
- Array of parsed arguments.
Usage
- To run the hook, copy the example below.
- $xprofile_get_field_data = apply_filters( 'bp_get_profile_field_data', $xprofile_get_field_data, $r );
- if ( !empty( $xprofile_get_field_data ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_profile_field_data callback
- function filter_bp_get_profile_field_data( $xprofile_get_field_data, $r ) {
- // make filter magic happen here...
- return $xprofile_get_field_data;
- };
- // add the filter
- add_filter( 'bp_get_profile_field_data', 'filter_bp_get_profile_field_data', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_profile_field_data', 'filter_bp_get_profile_field_data', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-xprofile/bp-xprofile-template.php
- return apply_filters( 'bp_get_profile_field_data', xprofile_get_field_data( $r['field'], $r['user_id'] ), $r );