Widgets $main_header_aside = 'main-header-aside'; $main_header_content_aside = ' main-header-content-aside'; $main_content_aside = ' main-content-aside'; $main_footer_aside = ' main-footer-aside'; $on = '--enabled'; $off = '--disabled'; // Main Header Aside if ( is_active_sidebar( $main_header_aside ) ) { echo ' ' . $main_header_aside . $on; } else { echo ' ' . $main_header_aside . $off; } // Main Content Header Aside if ( is_active_sidebar( $main_header_content_aside ) ) { echo ' ' . $main_header_content_aside . $on; } else { echo ' ' . $main_header_content_aside . $off; } // Main Content Aside if ( is_active_sidebar( $main_content_aside ) ) { echo ' ' . $main_content_aside . $on; } else { echo ' ' . $main_content_aside . $off; } // Main Footer Aside if ( is_active_sidebar( $main_footer_aside ) ) { echo ' ' . $main_footer_aside . $on; } else { echo ' ' . $main_footer_aside . $off; } // In Customizer if ( is_customize_preview() ) { echo ' ' . 'view--customizer'; } // Customizer: Custom Header if ( has_header_image() ) { echo ' ' . 'wbp-media-banner' . $on; } else { echo ' ' . 'wbp-media-banner' . $off; } // Customizer: Custom Logo if ( has_custom_logo() ) { echo ' ' . 'wbp-main-logo' . $on; } else { echo ' ' . 'wbp-main-logo' . $off; } if ( isset( $post ) ) { echo ' ' . 'view--' . $post->post_type; } if ( is_singular() ) { echo ' ' . 'view--' . $post->post_type . '--' . $post->post_name; } if ( 'blank' === get_header_textcolor() ) { echo ' ' . 'wbp-main-name-description' . $off; } else { echo ' ' . 'wbp-main-name-description' . $on; } if ( get_bloginfo( 'description', 'display' ) ) { echo ' ' . 'wbp-main-description--populated'; } else { echo ' ' . 'wbp-main-description--empty'; } // Admin Bar if ( is_admin_bar_showing() ) { echo ' ' . 'wp-admin-bar' . $on; } else { echo ' ' . 'wp-admin-bar' . $off; } // Comments if ( is_singular() ) { $comments_count_int = (int) get_comments_number( get_the_ID() ); // Comments Population Count if ( $comments_count_int == 1 ) { echo ' '.'comments-population--populated--single'; } elseif ( $comments_count_int > 1 ) { echo ' '.'comments-population--populated--multiple'; } elseif ( $comments_count_int == 0 ) { echo ' '.'comments-population--populated--zero'; } // Comment Creation Ability if ( comments_open() ) { echo ' '.'comment-creation-ability--enabled'; } else { echo ' '.'comment-creation-ability--disabled'; } // Comments Population Status if ( $comments_count_int > 1 ) { echo ' '.'comments-population--populated'; } else { echo ' '.'comments-population--empty'; } } // Category if ( is_singular() ) { foreach ( ( get_the_category( $post->ID ) ) as $category ) { echo ' '.'category--' . $category->category_nicename; } } } add_action( 'applicator_hook_html_class', 'applicator_func_html_class'); } // Body Class if ( ! function_exists( 'applicator_func_body_class' ) ) { function applicator_func_body_class( $classes ) { $classes[] = 'body'; return $classes; } add_filter( 'body_class', 'applicator_func_body_class' ); }