catchresponsive_body_classes

Adds Catchresponsive layout classes to the array of body classes.

Description

catchresponsive_body_classes( $classes ); 

Parameters (1)

0. $classes
The classes.

Usage

  1. if ( !function_exists( 'catchresponsive_body_classes' ) ) { 
  2. require_once '/inc/catchresponsive-core.php'; 
  3.  
  4. // The classes. 
  5. $classes = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = catchresponsive_body_classes($classes); 
  9.  

Defined (1)

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

/inc/catchresponsive-core.php  
  1. function catchresponsive_body_classes( $classes ) { 
  2.  
  3. // Adds a class of group-blog to blogs with more than 1 published author 
  4. if ( is_multi_author() ) { 
  5. $classes[] = 'group-blog'; 
  6.  
  7.  
  8. switch ( $layout ) { 
  9. case 'left-sidebar': 
  10. $classes[] = 'two-columns content-right'; 
  11. break; 
  12.  
  13. case 'right-sidebar': 
  14. $classes[] = 'two-columns content-left'; 
  15. break; 
  16.  
  17. case 'no-sidebar': 
  18. $classes[] = 'no-sidebar content-width'; 
  19. break; 
  20.  
  21. case 'no-sidebar-one-column': 
  22. $classes[] = 'no-sidebar one-column'; 
  23. break; 
  24.  
  25. case 'no-sidebar-full-width': 
  26. $classes[] = 'no-sidebar full-width'; 
  27. break; 
  28.  
  29. if ( "" != $options['content_layout'] ) { 
  30. $classes[] = $options['content_layout']; 
  31.  
  32. //Count number of menus avaliable and set class accordingly 
  33. $mobile_menu_count = 1; // For primary menu 
  34.  
  35. if ( has_nav_menu( 'secondary' ) ) { 
  36. $mobile_menu_count++; 
  37.  
  38. if ( has_nav_menu( 'header-right' ) ) { 
  39. $mobile_menu_count++; 
  40.  
  41. switch ( $mobile_menu_count ) { 
  42. case 1: 
  43. $classes[] = 'mobile-menu-one'; 
  44. break; 
  45.  
  46. case 2: 
  47. $classes[] = 'mobile-menu-two'; 
  48. break; 
  49.  
  50. case 3: 
  51. $classes[] = 'mobile-menu-three'; 
  52. break; 
  53.  
  54. $classes = apply_filters( 'catchresponsive_body_classes', $classes ); 
  55.  
  56. return $classes;