Esempio n. 1
0
 function estetico_add_body_class($classes)
 {
     global $template_name;
     if (is_front_page() || $template_name == 'home') {
         $classes[] = 'home';
     } else {
         $classes[] = 'inner';
     }
     if (estetico_show_slider()) {
         $classes[] = 'show-rev-slider';
     } else {
         $classes[] = 'show-flat-header';
     }
     try {
         if (class_exists('RevSlider')) {
             $revSlider = new RevSlider();
             $revSlider->initByAlias(estetico_get_setting('revslider_id'));
         }
     } catch (Exception $ex) {
         $classes[] = "missing-rev-slider";
     }
     if (false == estetico_show_slider() && '' == estetico_get_setting('inner_pages_header')) {
         $classes[] = 'empty-header';
     }
     $sidebar_position = estetico_get_setting('sidebar_position');
     $classes[] = 'sidebar-position-' . $sidebar_position;
     return $classes;
 }
Esempio n. 2
0
<?php

global $template_name;
$header_configuration = estetico_get_setting('header_configuration');
$is_homepage = estetico_is_homepage();
$show_slider = estetico_show_slider();
if (!$show_slider) {
    $dir = wp_upload_dir();
    $inner_pages_header = estetico_get_setting('inner_pages_header');
    $header = wp_get_image_editor($inner_pages_header);
    if (!is_wp_error($header)) {
        $header->crop(0, 0, 940, 220);
        $header->save($dir['path'] . DIRECTORY_SEPARATOR . 'inner_pages_header_cropped.jpg');
        $inner_pages_header = $dir['url'] . '/inner_pages_header_cropped.jpg';
    }
}
$show_quick_search = estetico_get_setting('show_quick_search') == 'yes' ? true : false;
$main_properties_page = estetico_get_properties_page_id();
$properties_page_url = estetico_get_properties_page_url_wpml($main_properties_page);
$sidebar_position_mobile = estetico_get_setting('sidebar_position_mobile');
?>
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php 
language_attributes();
?>
>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php 
language_attributes();