bp_get_the_profile_field_edit_value

Filters the XProfile field edit value.

Description

apply_filters( 'bp_get_the_profile_field_edit_value', (string) $field_value, (string) $field_type, (int) $field_id ); 

Parameters (3)

0. $field_value (string)
Current field edit value.
1. $field_type (string)
Type for the profile field.
2. $field_id (int)
ID for the profile field.

Usage

To run the hook, copy the example below.
  1. $field_value = apply_filters( 'bp_get_the_profile_field_edit_value', $field_value, $field_type, $field_id ); 
  2.  
  3. if ( !empty( $field_value ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_get_the_profile_field_edit_value callback 
  2. function filter_bp_get_the_profile_field_edit_value( $field_value, $field_type, $field_id ) { 
  3. // make filter magic happen here... 
  4. return $field_value
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_get_the_profile_field_edit_value', 'filter_bp_get_the_profile_field_edit_value', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_get_the_profile_field_edit_value', 'filter_bp_get_the_profile_field_edit_value', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/bp-xprofile/bp-xprofile-template.php  
  1. return apply_filters( 'bp_get_the_profile_field_edit_value', $field_value, $field->type, $field->id );