EduardET

Untitled

May 25th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.78 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html <?php language_attributes(); ?>>
  3. <head>
  4.     <meta charset="<?php bloginfo( 'charset' ); ?>" />
  5. <?php
  6.     elegant_description();
  7.     elegant_keywords();
  8.     elegant_canonical();
  9.  
  10.     /**
  11.      * Fires in the head, before {@see wp_head()} is called. This action can be used to
  12.      * insert elements into the beginning of the head before any styles or scripts.
  13.      *
  14.      * @since 1.0
  15.      */
  16.     do_action( 'et_head_meta' );
  17.  
  18.     $template_directory_uri = get_template_directory_uri();
  19. ?>
  20.  
  21.     <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  22.  
  23.     <script type="text/javascript">
  24.         document.documentElement.className = 'js';
  25.     </script>
  26.  
  27.     <?php wp_head(); ?>
  28. </head>
  29. <body <?php body_class(); ?>>
  30. <?php
  31.     $product_tour_enabled = et_builder_is_product_tour_enabled();
  32.     $page_container_style = $product_tour_enabled ? ' style="padding-top: 0px;"' : ''; ?>
  33.     <div id="page-container"<?php echo $page_container_style; ?>>
  34. <?php
  35.     if ( $product_tour_enabled || is_page_template( 'page-template-blank.php' ) ) {
  36.         return;
  37.     }
  38.  
  39.     $et_secondary_nav_items = et_divi_get_top_nav_items();
  40.  
  41.     $et_phone_number = $et_secondary_nav_items->phone_number;
  42.  
  43.     $et_email = $et_secondary_nav_items->email;
  44.  
  45.     $et_contact_info_defined = $et_secondary_nav_items->contact_info_defined;
  46.  
  47.     $show_header_social_icons = $et_secondary_nav_items->show_header_social_icons;
  48.  
  49.     $et_secondary_nav = $et_secondary_nav_items->secondary_nav;
  50.  
  51.     $et_top_info_defined = $et_secondary_nav_items->top_info_defined;
  52.  
  53.     $et_slide_header = 'slide' === et_get_option( 'header_style', 'left' ) || 'fullscreen' === et_get_option( 'header_style', 'left' ) ? true : false;
  54. ?>
  55.  
  56.     <?php if ( $et_top_info_defined && ! $et_slide_header || is_customize_preview() ) : ?>
  57.         <?php ob_start(); ?>
  58.         <div id="top-header"<?php echo $et_top_info_defined ? '' : 'style="display: none;"'; ?>>
  59.             <div class="container clearfix">
  60.  
  61.             <?php if ( $et_contact_info_defined ) : ?>
  62.  
  63.                 <div id="et-info">
  64.                 <?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
  65.                     <span id="et-info-phone"><?php echo et_sanitize_html_input_text( $et_phone_number ); ?></span>
  66.                 <?php endif; ?>
  67.  
  68.                 <?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
  69.                     <a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
  70.                 <?php endif; ?>
  71.  
  72.                 <?php
  73.                 if ( true === $show_header_social_icons ) {
  74.                     get_template_part( 'includes/social_icons', 'header' );
  75.                 } ?>
  76.                 </div> <!-- #et-info -->
  77.  
  78.             <?php endif; // true === $et_contact_info_defined ?>
  79.  
  80.                 <div id="et-secondary-menu">
  81.                 <?php
  82.                     if ( ! $et_contact_info_defined && true === $show_header_social_icons ) {
  83.                         get_template_part( 'includes/social_icons', 'header' );
  84.                     } else if ( $et_contact_info_defined && true === $show_header_social_icons ) {
  85.                         ob_start();
  86.  
  87.                         get_template_part( 'includes/social_icons', 'header' );
  88.  
  89.                         $duplicate_social_icons = ob_get_contents();
  90.  
  91.                         ob_end_clean();
  92.  
  93.                         printf(
  94.                             '<div class="et_duplicate_social_icons">
  95.                                 %1$s
  96.                             </div>',
  97.                             $duplicate_social_icons
  98.                         );
  99.                     }
  100.  
  101.                     if ( '' !== $et_secondary_nav ) {
  102.                         echo $et_secondary_nav;
  103.                     }
  104.  
  105.                     et_show_cart_total();
  106.                 ?>
  107.                 </div> <!-- #et-secondary-menu -->
  108.  
  109.             </div> <!-- .container -->
  110.         </div> <!-- #top-header -->
  111.     <?php
  112.         $top_header = ob_get_clean();
  113.  
  114.         /**
  115.          * Filters the HTML output for the top header.
  116.          *
  117.          * @since ??
  118.          *
  119.          * @param string $top_header
  120.          */
  121.         echo apply_filters( 'et_html_top_header', $top_header );
  122.     ?>
  123.     <?php endif; // true ==== $et_top_info_defined ?>
  124.  
  125.     <?php if ( $et_slide_header || is_customize_preview() ) : ?>
  126.         <?php ob_start(); ?>
  127.         <div class="et_slide_in_menu_container">
  128.             <?php if ( 'fullscreen' === et_get_option( 'header_style', 'left' ) || is_customize_preview() ) { ?>
  129.                 <span class="mobile_menu_bar et_toggle_fullscreen_menu"></span>
  130.             <?php } ?>
  131.  
  132.             <?php
  133.                 if ( $et_contact_info_defined || true === $show_header_social_icons || false !== et_get_option( 'show_search_icon', true ) || class_exists( 'woocommerce' ) || is_customize_preview() ) { ?>
  134.                     <div class="et_slide_menu_top">
  135.  
  136.                     <?php if ( 'fullscreen' === et_get_option( 'header_style', 'left' ) ) { ?>
  137.                         <div class="et_pb_top_menu_inner">
  138.                     <?php } ?>
  139.             <?php }
  140.  
  141.                 if ( true === $show_header_social_icons ) {
  142.                     get_template_part( 'includes/social_icons', 'header' );
  143.                 }
  144.  
  145.                 et_show_cart_total();
  146.             ?>
  147.             <?php if ( false !== et_get_option( 'show_search_icon', true ) || is_customize_preview() ) : ?>
  148.                 <?php if ( 'fullscreen' !== et_get_option( 'header_style', 'left' ) ) { ?>
  149.                     <div class="clear"></div>
  150.                 <?php } ?>
  151.                 <form role="search" method="get" class="et-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
  152.                     <?php
  153.                         printf( '<input type="search" class="et-search-field" placeholder="%1$s" value="%2$s" name="s" title="%3$s" />',
  154.                             esc_attr__( 'Search &hellip;', 'Divi' ),
  155.                             get_search_query(),
  156.                             esc_attr__( 'Search for:', 'Divi' )
  157.                         );
  158.                     ?>
  159.                     <button type="submit" id="searchsubmit_header"></button>
  160.                 </form>
  161.             <?php endif; // true === et_get_option( 'show_search_icon', false ) ?>
  162.  
  163.             <?php if ( $et_contact_info_defined ) : ?>
  164.  
  165.                 <div id="et-info">
  166.                 <?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
  167.                     <span id="et-info-phone"><?php echo et_sanitize_html_input_text( $et_phone_number ); ?></span>
  168.                 <?php endif; ?>
  169.  
  170.                 <?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
  171.                     <a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
  172.                 <?php endif; ?>
  173.                 </div> <!-- #et-info -->
  174.  
  175.             <?php endif; // true === $et_contact_info_defined ?>
  176.             <?php if ( $et_contact_info_defined || true === $show_header_social_icons || false !== et_get_option( 'show_search_icon', true ) || class_exists( 'woocommerce' ) || is_customize_preview() ) { ?>
  177.                 <?php if ( 'fullscreen' === et_get_option( 'header_style', 'left' ) ) { ?>
  178.                     </div> <!-- .et_pb_top_menu_inner -->
  179.                 <?php } ?>
  180.  
  181.                 </div> <!-- .et_slide_menu_top -->
  182.             <?php } ?>
  183.  
  184.             <div class="et_pb_fullscreen_nav_container">
  185.                 <?php
  186.                     $slide_nav = '';
  187.                     $slide_menu_class = 'et_mobile_menu';
  188.  
  189.                     $slide_nav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'echo' => false, 'items_wrap' => '%3$s' ) );
  190.                     $slide_nav .= wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'container' => '', 'fallback_cb' => '', 'echo' => false, 'items_wrap' => '%3$s' ) );
  191.                 ?>
  192.  
  193.                 <ul id="mobile_menu_slide" class="<?php echo esc_attr( $slide_menu_class ); ?>">
  194.  
  195.                 <?php
  196.                     if ( '' == $slide_nav ) :
  197.                 ?>
  198.                         <?php if ( 'on' == et_get_option( 'divi_home_link' ) ) { ?>
  199.                             <li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Home', 'Divi' ); ?></a></li>
  200.                         <?php }; ?>
  201.  
  202.                         <?php show_page_menu( $slide_menu_class, false, false ); ?>
  203.                         <?php show_categories_menu( $slide_menu_class, false ); ?>
  204.                 <?php
  205.                     else :
  206.                         echo( $slide_nav );
  207.                     endif;
  208.                 ?>
  209.  
  210.                 </ul>
  211.             </div>
  212.         </div>
  213.     <?php
  214.         $slide_header = ob_get_clean();
  215.  
  216.         /**
  217.          * Filters the HTML output for the slide header.
  218.          *
  219.          * @since ??
  220.          *
  221.          * @param string $top_header
  222.          */
  223.         echo apply_filters( 'et_html_slide_header', $slide_header );
  224.     ?>
  225.     <?php endif; // true ==== $et_slide_header ?>
  226.  
  227.     <?php ob_start(); ?>
  228.         <header id="main-header" data-height-onload="<?php echo esc_attr( et_get_option( 'menu_height', '66' ) ); ?>">
  229.             <div class="container clearfix et_menu_container">
  230.             <?php
  231.                 $logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && '' != $user_logo
  232.                     ? $user_logo
  233.                     : $template_directory_uri . '/images/logo.png';
  234.  
  235.                 ob_start();
  236.             ?>
  237.                 <div class="logo_container">
  238.                     <span class="logo_helper"></span>
  239.                     <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
  240.                         <img src="<?php echo esc_attr( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" id="logo" data-height-percentage="<?php echo esc_attr( et_get_option( 'logo_height', '54' ) ); ?>" />
  241.                     </a>
  242.                 </div>
  243.             <?php
  244.                 $logo_container = ob_get_clean();
  245.  
  246.                 /**
  247.                  * Filters the HTML output for the logo container.
  248.                  *
  249.                  * @since ??
  250.                  *
  251.                  * @param string $logo_container
  252.                  */
  253.                 echo apply_filters( 'et_html_logo_container', $logo_container );
  254.             ?>
  255.                 <div id="et-top-navigation" data-height="<?php echo esc_attr( et_get_option( 'menu_height', '66' ) ); ?>" data-fixed-height="<?php echo esc_attr( et_get_option( 'minimized_menu_height', '40' ) ); ?>">
  256.                     <?php if ( ! $et_slide_header || is_customize_preview() ) : ?>
  257.                         <nav id="top-menu-nav">
  258.                         <?php
  259.                             $menuClass = 'nav';
  260.                             if ( 'on' == et_get_option( 'divi_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
  261.                             $primaryNav = '';
  262.  
  263.                             $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'menu_id' => 'top-menu', 'echo' => false ) );
  264.  
  265.                             if ( '' == $primaryNav ) :
  266.                         ?>
  267.                             <ul id="top-menu" class="<?php echo esc_attr( $menuClass ); ?>">
  268.                                 <?php if ( 'on' == et_get_option( 'divi_home_link' ) ) { ?>
  269.                                     <li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Home', 'Divi' ); ?></a></li>
  270.                                 <?php }; ?>
  271.  
  272.                                 <?php show_page_menu( $menuClass, false, false ); ?>
  273.                                 <?php show_categories_menu( $menuClass, false ); ?>
  274.                             </ul>
  275.                         <?php
  276.                             else :
  277.                                 echo( $primaryNav );
  278.                             endif;
  279.                         ?>
  280.                         </nav>
  281.                     <?php endif; ?>
  282.  
  283.                     <?php
  284.                     if ( ! $et_top_info_defined && ( ! $et_slide_header || is_customize_preview() ) ) {
  285.                         et_show_cart_total( array(
  286.                             'no_text' => true,
  287.                         ) );
  288.                     }
  289.                     ?>
  290.  
  291.                     <?php if ( $et_slide_header || is_customize_preview() ) : ?>
  292.                         <span class="mobile_menu_bar et_pb_header_toggle et_toggle_<?php echo esc_attr( et_get_option( 'header_style', 'left' ) ); ?>_menu"></span>
  293.                     <?php endif; ?>
  294.                    
  295.                     <div class="wpc-cart-icon">
  296.                         <?php
  297.                             et_show_cart_total( array(
  298.                                 'no_text' => false,
  299.                             ) );
  300.                         ?>
  301.                     </div>
  302.                    
  303.                    
  304.                     <?php if ( ( false !== et_get_option( 'show_search_icon', true ) && ! $et_slide_header ) || is_customize_preview() ) : ?>
  305.                     <div id="et_top_search">
  306.                         <span id="et_search_icon"></span>
  307.                     </div>
  308.                     <?php endif; // true === et_get_option( 'show_search_icon', false ) ?>
  309.  
  310.                     <?php
  311.  
  312.                     /**
  313.                      * Fires at the end of the 'et-top-navigation' element, just before its closing tag.
  314.                      *
  315.                      * @since 1.0
  316.                      */
  317.                     do_action( 'et_header_top' );
  318.  
  319.                     ?>
  320.                 </div> <!-- #et-top-navigation -->
  321.             </div> <!-- .container -->
  322.             <div class="et_search_outer">
  323.                 <div class="container et_search_form_container">
  324.                     <form role="search" method="get" class="et-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
  325.                     <?php
  326.                         printf( '<input type="search" class="et-search-field" placeholder="%1$s" value="%2$s" name="s" title="%3$s" />',
  327.                             esc_attr__( 'Search &hellip;', 'Divi' ),
  328.                             get_search_query(),
  329.                             esc_attr__( 'Search for:', 'Divi' )
  330.                         );
  331.                     ?>
  332.                     </form>
  333.                     <span class="et_close_search_field"></span>
  334.                 </div>
  335.             </div>
  336.         </header> <!-- #main-header -->
  337.     <?php
  338.         $main_header = ob_get_clean();
  339.  
  340.         /**
  341.          * Filters the HTML output for the main header.
  342.          *
  343.          * @since ??
  344.          *
  345.          * @param string $main_header
  346.          */
  347.         echo apply_filters( 'et_html_main_header', $main_header );
  348.     ?>
  349.         <div id="et-main-area">
  350.     <?php
  351.         /**
  352.          * Fires after the header, before the main content is output.
  353.          *
  354.          * @since ??
  355.          */
  356.         do_action( 'et_before_main_content' );
Advertisement
Add Comment
Please, Sign In to add comment