| Conditions | 8 |
| Paths | 64 |
| Total Lines | 27 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | function strip_body_classes( $classes ) { |
||
| 19 | // Adds a class of group-blog to blogs with more than 1 published author. |
||
| 20 | if ( is_multi_author() ) { |
||
| 21 | $classes[] = 'group-blog'; |
||
| 22 | } |
||
| 23 | // Add class of hfeed to non-singular pages. |
||
| 24 | if ( ! is_singular() ) { |
||
| 25 | $classes[] = 'hfeed'; |
||
| 26 | } |
||
| 27 | // Add class if we're viewing the Customizer for easier styling of theme options. |
||
| 28 | if ( is_customize_preview() ) { |
||
| 29 | $classes[] = 'strip-customizer'; |
||
| 30 | } |
||
| 31 | // Add class on front page. |
||
| 32 | if ( is_front_page() && 'posts' !== get_option( 'show_on_front' ) ) { |
||
| 33 | $classes[] = 'strip-front-page'; |
||
| 34 | } |
||
| 35 | // Add a class if there is a custom header. |
||
| 36 | if ( has_header_image() ) { |
||
| 37 | $classes[] = 'has-header-image'; |
||
| 38 | } |
||
| 39 | // Add class if the site title and tagline is hidden. |
||
| 40 | if ( 'blank' === get_header_textcolor() ) { |
||
| 41 | $classes[] = 'title-tagline-hidden'; |
||
| 42 | } |
||
| 43 | return $classes; |
||
| 44 | } |
||
| 45 | add_filter( 'body_class', 'strip_body_classes' ); |
||
| 46 |