xprofile_data_value_before_save

The BuddyPress xprofile data value before save hook.

Description

apply_filters( 'xprofile_data_value_before_save', (unknown) $this_value, (unknown) $this_id, (bool) $true, (unknown) $instance ); 

Parameters (4)

0. $this_value (unknown)
The this value.
1. $this_id (unknown)
The this id.
2. $true (bool) => true
The true.
3. $instance (unknown)
The instance.

Usage

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

Defined (1)

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

/bp-xprofile/classes/class-bp-xprofile-profiledata.php  
  1. $this->value = apply_filters( 'xprofile_data_value_before_save', $this->value, $this->id, true, $this );