xprofile_group_fields

Filters the group fields for the next_group method.

Description

apply_filters( 'xprofile_group_fields', (array) $this_group_fields, (int) $this_group_id ); 

Parameters (2)

0. $this_group_fields (array)
Array of fields for the group.
1. $this_group_id (int)
ID of the field group.

Usage

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

Defined (1)

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

/bp-xprofile/classes/class-bp-xprofile-data-template.php  
  1. $this->group->fields = apply_filters( 'xprofile_group_fields', $this->group->fields, $this->group->id );