monsterinsights_add_admin_body_class

Adds one or more classes to the body tag in the dashboard.

Description

monsterinsights_add_admin_body_class( (String) $classes ); 

Parameters (1)

0. $classes (String)
Current body classes.

Usage

  1. if ( !function_exists( 'monsterinsights_add_admin_body_class' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/admin/admin.php'; 
  3.  
  4. // Current body classes. 
  5. $classes = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = monsterinsights_add_admin_body_class($classes); 
  9.  

Defined (1)

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

/includes/admin/admin.php  
  1. function monsterinsights_add_admin_body_class( $classes ) { 
  2. $screen = get_current_screen();  
  3. if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) { 
  4. return $classes; 
  5.  
  6. return "$classes monsterinsights_page ";