/**
 * Register the extra body classes to add in the pages
 *
 * @param array $classes
 *
 * @return array
 * @since 1.0.0
 */
function yit_add_body_class($classes)
{
    $layout = yit_get_option('general-layout-type');
    $classes[] = $layout . '-layout';
    if ($layout == 'fluid') {
        $classes[] = 'stretched-layout';
    }
    $classes = yit_detect_browser_body_class($classes);
    if (is_singular('post')) {
        $blog_single_type = yit_get_option('blog-single-type');
        $classes[] = empty($blog_single_type) ? 'blog-single' : 'blog-single blog-single-' . $blog_single_type;
    }
    if (yit_get_option('general-activate-responsive') == 'yes') {
        $classes[] = 'responsive';
    }
    return $classes;
}
Пример #2
0
/**
 * Register the extra body classes to add in the pages
 *
 * @param array $classes
 *
 * @return array
 * @since 1.0.0
 */
function yit_add_body_class($classes)
{
    $classes[] = yit_get_option('general-layout-type') . '-layout';
    $classes = yit_detect_browser_body_class($classes);
    if (is_singular('post')) {
        $classes[] = 'blog-single-' . yit_get_option('blog-single-type');
    }
    if (yit_get_option('general-activate-responsive') == 'yes') {
        $classes[] = 'responsive';
    }
    return $classes;
}
 /**
  * Retrieve true if is IE9 or IE8, false otherwise.
  *
  * @return bool
  * @since 2.0.0
  * @author Andrea Grillo <*****@*****.**>
  */
 function yit_is_old_ie()
 {
     global $is_IE;
     $browser_detect = yit_detect_browser_body_class();
     return $is_IE && (in_array('ie8', $browser_detect) || in_array('ie9', $browser_detect)) ? true : false;
 }