bbp_get_the_body_class

The bbPress bbp get the body class hook.

Description

apply_filters( 'bbp_get_the_body_class', (unknown) $classes, (unknown) $bbp_classes, (unknown) $wp_classes, (unknown) $custom_classes ); 

Parameters (4)

0. $classes (unknown)
The classes.
1. $bbp_classes (unknown)
The bbp classes.
2. $wp_classes (unknown)
The wp classes.
3. $custom_classes (unknown)
The custom classes.

Usage

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

Defined (1)

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

/includes/common/template.php  
  1. $classes = apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );