bp_xprofile_wp_user_sync_exclude_fields

Exclude our xprofile fields, but allow filtering.

Description

apply_filters( 'bp_xprofile_wp_user_sync_exclude_fields', (string) $exclude_fields, (array) $this_options ); 

The relevant params are passed to the filter so that other plugins can make an informed choice of what to return.

To retain the first name and last name fields, an appropriate way to do this would look something like:

add_filter( bp_xprofile_wp_user_sync_exclude_fields,, my_function ); function my_function( $exclude_fields )

Parameters (2)

0. $exclude_fields (string)
Comma-delimited pseudo-array of custom fields
1. $this_options (array)
Array of custom field IDs

Usage

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

Defined (1)

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

/bp-xprofile-wp-user-sync.php  
  1. return apply_filters(