Esempio n. 1
0
function et_layout_body_class($classes)
{
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        }
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    if (true === et_get_option('cover_background', true)) {
        $classes[] = 'et_cover_background';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons)) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('left' !== ($header_style = et_get_option('header_style', 'left'))) {
        $classes[] = esc_attr("et_header_style_{$header_style}");
    }
    if ((is_page() || is_singular('project')) && 'on' == get_post_meta(get_the_ID(), '_et_pb_side_nav', true) && et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_side_nav_page';
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    return $classes;
}
Esempio n. 2
0
function et_layout_body_class($classes)
{
    if ('rgba' == substr(et_get_option('primary_nav_bg', '#ffffff'), 0, 4) && false === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_transparent_nav';
    }
    // home-posts class is used by customizer > blog to work. It modifies post title and meta
    // of WP default layout (home, archive, single), but should not modify post title and meta of blog module (page as home)
    if (in_array('home', $classes) && !in_array('page', $classes)) {
        $classes[] = 'home-posts';
    }
    if (true === et_get_option('nav_fullwidth', false)) {
        if (true === et_get_option('vertical_nav', false)) {
            $classes[] = 'et_fullwidth_nav_temp';
        } else {
            $classes[] = 'et_fullwidth_nav';
        }
    }
    if (true === et_get_option('secondary_nav_fullwidth', false)) {
        $classes[] = 'et_fullwidth_secondary_nav';
    }
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
        if ('right' === et_get_option('vertical_nav_orientation', 'left')) {
            $classes[] = 'et_vertical_right';
        }
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        } else {
            if ('on' !== et_get_option('divi_fixed_nav', 'on')) {
                $classes[] = 'et_non_fixed_nav';
            }
        }
    }
    if (true === et_get_option('vertical_nav', false) && 'on' === et_get_option('divi_fixed_nav', 'on')) {
        $classes[] = 'et_vertical_fixed';
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    if (true === et_get_option('hide_nav', false) && (!is_singular() || is_singular() && 'no' !== get_post_meta(get_the_ID(), '_et_pb_post_hide_nav', true))) {
        $classes[] = 'et_hide_nav';
    } else {
        $classes[] = 'et_show_nav';
    }
    if (true === et_get_option('hide_primary_logo', false)) {
        $classes[] = 'et_hide_primary_logo';
    }
    if (true === et_get_option('hide_fixed_logo', false)) {
        $classes[] = 'et_hide_fixed_logo';
    }
    if (true === et_get_option('hide_mobile_logo', false)) {
        $classes[] = 'et_hide_mobile_logo';
    }
    if (false !== et_get_option('cover_background', true)) {
        $classes[] = 'et_cover_background';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons) && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('on' === get_post_meta(get_the_ID(), '_et_pb_side_nav', true) && et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_side_nav_page';
    }
    if (true === et_get_option('et_pb_sidebar-remove_border', false)) {
        $classes[] = 'et_pb_no_sidebar_vertical_divider';
    }
    if (is_singular(array('post', 'page', 'project', 'product')) && 'on' == get_post_meta(get_the_ID(), '_et_pb_post_hide_nav', true)) {
        $classes[] = 'et_hide_nav';
    }
    if (!et_get_option('use_sidebar_width', false)) {
        $classes[] = 'et_pb_gutter';
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    $gutter_width = '' !== ($page_custom_gutter = get_post_meta(get_the_ID(), '_et_pb_gutter_width', true)) ? $page_custom_gutter : et_get_option('gutter_width', '3');
    $classes[] = esc_attr("et_pb_gutters{$gutter_width}");
    $primary_dropdown_animation = et_get_option('primary_nav_dropdown_animation', 'fade');
    $classes[] = esc_attr("et_primary_nav_dropdown_animation_{$primary_dropdown_animation}");
    $secondary_dropdown_animation = et_get_option('secondary_nav_dropdown_animation', 'fade');
    $classes[] = esc_attr("et_secondary_nav_dropdown_animation_{$secondary_dropdown_animation}");
    $footer_columns = et_get_option('footer_columns', '4');
    $classes[] = esc_attr("et_pb_footer_columns{$footer_columns}");
    $header_style = et_get_option('header_style', 'left');
    $classes[] = esc_attr("et_header_style_{$header_style}");
    if ('slide' === $header_style || 'fullscreen' === $header_style) {
        $classes[] = esc_attr("et_header_style_left");
        if ('fullscreen' === $header_style && !et_get_option('slide_nav_show_top_bar', true)) {
            // additional class if top bar disabled in Fullscreen menu
            $classes[] = esc_attr("et_pb_no_top_bar_fullscreen");
        }
    }
    $logo = et_get_option('divi_logo', '');
    if ('.svg' === substr($logo, -4, 4)) {
        $classes[] = 'et_pb_svg_logo';
    }
    // Add the page builder class.
    if (et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_pagebuilder_layout';
    }
    return $classes;
}
Esempio n. 3
0
	</script>

	<?php 
wp_head();
?>
</head>
<body <?php 
body_class();
?>
>
	<div id="page-container">
<?php 
if (is_page_template('page-template-blank.php')) {
    return;
}
$et_secondary_nav_items = et_divi_get_top_nav_items();
$et_phone_number = $et_secondary_nav_items->phone_number;
$et_email = $et_secondary_nav_items->email;
$et_contact_info_defined = $et_secondary_nav_items->contact_info_defined;
$show_header_social_icons = $et_secondary_nav_items->show_header_social_icons;
$et_secondary_nav = $et_secondary_nav_items->secondary_nav;
$et_top_info_defined = $et_secondary_nav_items->top_info_defined;
?>

	<?php 
if ($et_top_info_defined) {
    ?>
		<div id="top-header">
			<div class="container clearfix">

			<?php 
Esempio n. 4
0
function et_layout_body_class($classes)
{
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        }
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons)) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('left' !== ($header_style = et_get_option('header_style', 'left'))) {
        $classes[] = esc_attr("et_header_style_{$header_style}");
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    return $classes;
}