bp_get_the_profile_field_datebox

Filters the output for the profile field datebox.

Description

apply_filters( 'bp_get_the_profile_field_datebox', (string) $html, (string) $args_type, (string) $day, (string) $month, (string) $year, (int) $this_field_obj_id, (string) $date ); 

Parameters (7)

0. $html (string)
HTML output for the field.
1. $args_type (string)
Which date type is being rendered for.
2. $day (string)
Date formatted for the current day.
3. $month (string)
Date formatted for the current month.
4. $year (string)
Date formatted for the current year.
5. $this_field_obj_id (int)
ID of the field object being rendered.
6. $date (string)
Current date.

Usage

To run the hook, copy the example below.
  1. $html = apply_filters( 'bp_get_the_profile_field_datebox', $html, $args_type, $day, $month, $year, $this_field_obj_id, $date ); 
  2.  
  3. if ( !empty( $html ) ) { 
  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_datebox callback 
  2. function filter_bp_get_the_profile_field_datebox( $html, $args_type, $day, $month, $year, $this_field_obj_id, $date ) { 
  3. // make filter magic happen here... 
  4. return $html
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_get_the_profile_field_datebox', 'filter_bp_get_the_profile_field_datebox', 10, 7 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_get_the_profile_field_datebox', 'filter_bp_get_the_profile_field_datebox', 10, 7 ); 

Defined (1)

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

/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php  
  1. echo apply_filters( 'bp_get_the_profile_field_datebox', $html, $args['type'], $day, $month, $year, $this->field_obj->id, $date );