function wptouch_get_body_classes() { global $wptouch_pro; $body_classes = array(); // Add a class to the body when we're in preview mode, or the preview window if (wptouch_in_preview()) { $body_classes[] = 'preview-mode'; } $colors = foundation_get_theme_colors(); foreach ($colors as $color) { $domain_settings = $wptouch_pro->get_settings($color->domain); if (isset($color->luma_threshold) && $color->luma_threshold != false) { $current_luma = wptouch_hex_to_luma($domain_settings->{$color->setting}); if ($current_luma < $color->luma_threshold) { $body_classes[] = 'dark-' . $color->luma_class; } else { $body_classes[] = 'light-' . $color->luma_class; } } } return implode(' ', apply_filters('wptouch_body_classes', $body_classes)); }
function classic_body_classes($classes) { $settings = classic_get_settings(); if ($settings->rounded_corners) { $classes[] = 'rounded-corners'; } $heading_luma = wptouch_hex_to_luma($settings->classic_header_color); if ($heading_luma <= 150) { $classes[] = 'dark-header'; } else { $classes[] = 'light-header'; } $body_luma = wptouch_hex_to_luma($settings->classic_background_color); if ($body_luma <= 150) { $classes[] = 'dark-body'; } else { $classes[] = 'light-body'; } return $classes; }
function bauhaus_body_classes($classes) { $settings = bauhaus_get_settings(); $heading_luma = wptouch_hex_to_luma($settings->bauhaus_header_color); $shape_type = $settings->bauhaus_shape_type; if ($heading_luma <= 150) { $classes[] = 'dark-header'; } else { $classes[] = 'light-header'; } $body_luma = wptouch_hex_to_luma($settings->bauhaus_background_color); if ($body_luma <= 150) { $classes[] = 'dark-body'; } else { $classes[] = 'light-body'; } $post_page_head_luma = wptouch_hex_to_luma($settings->bauhaus_post_page_header_color); if ($post_page_head_luma <= 150) { $classes[] = 'dark-post-head'; } else { $classes[] = 'light-post-head'; } $classes[] = $shape_type; if (!$settings->bauhaus_show_comment_bubbles) { $classes[] = 'no-com-bubbles'; } return $classes; }