bp_get_the_profile_field_visibility_level_label

Filters the profile field visibility level label.

Description

apply_filters( 'bp_get_the_profile_field_visibility_level_label', (string) $fields_level_label, (string) $level ); 

Parameters (2)

0. $fields_level_label (string)
Field visibility level label.
1. $level (string)
Field visibility level.

Usage

To run the hook, copy the example below.
  1. $fields_level_label = apply_filters( 'bp_get_the_profile_field_visibility_level_label', $fields_level_label, $level ); 
  2.  
  3. if ( !empty( $fields_level_label ) ) { 
  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_visibility_level_label callback 
  2. function filter_bp_get_the_profile_field_visibility_level_label( $fields_level_label, $level ) { 
  3. // make filter magic happen here... 
  4. return $fields_level_label
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_get_the_profile_field_visibility_level_label', 'filter_bp_get_the_profile_field_visibility_level_label', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_get_the_profile_field_visibility_level_label', 'filter_bp_get_the_profile_field_visibility_level_label', 10, 2 ); 

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_visibility_level_label', $fields[ $level ]['label'], $level );