body_class

Filters the list of CSS body classes for the current post or page.

Description

add_filter( 'body_class', (string) $minileven_body_classes ); 

Parameters (1)

0. $minileven_body_classes (string) => 'minileven_body_classes'
The minileven body classes.

Usage

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

Defined (3)

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

/modules/minileven/theme/pub/minileven/inc/tweaks.php  
  1. add_filter( 'body_class', 'minileven_body_classes' ); 
/modules/theme-tools/content-options/post-details.php  
  1. add_filter( 'body_class', 'jetpack_post_details_body_classes' ); 
/modules/theme-tools/site-logo/inc/class-site-logo.php  
  1. add_filter( 'body_class', array( $this, 'body_classes' ) );