Facebook
From mexis, 8 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 318
  1. <?php if ( ! isset( $_SESSION ) ) session_start(); ?>
  2. <!DOCTYPE html>
  3. <!--[if IE 6]>
  4. <html id="ie6" <?php language_attributes(); ?>>
  5. <![endif]-->
  6. <!--[if IE 7]>
  7. <html id="ie7" <?php language_attributes(); ?>>
  8. <![endif]-->
  9. <!--[if IE 8]>
  10. <html id="ie8" <?php language_attributes(); ?>>
  11. <![endif]-->
  12. <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
  13. <html <?php language_attributes(); ?>>
  14. <!--<![endif]-->
  15. <head>
  16.         <meta charset="<?php bloginfo( 'charset' ); ?>" />
  17.         <title><?php wp_title(); ?></title>
  18.         <?php elegant_description(); ?>
  19.         <?php elegant_keywords(); ?>
  20.         <?php elegant_canonical(); ?>
  21.  
  22.         <?php do_action( 'et_head_meta' ); ?>
  23.  
  24.         <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  25.  
  26.         <?php $template_directory_uri = get_template_directory_uri(); ?>
  27.         <!--[if lt IE 9]>
  28.         <script src="<?php echo esc_url( $template_directory_uri . '/js/html5.js"' ); ?>" type="text/javascript"></script>
  29.         <![endif]-->
  30.  
  31.         <script type="text/javascript">
  32.                 document.documentElement.className = 'js';
  33.         </script>
  34.  
  35.         <?php wp_head(); ?>
  36. </head>
  37. <body <?php body_class(); ?>>
  38.         <div id="page-container">
  39. <?php
  40.         if ( is_page_template( 'page-template-blank.php' ) ) {
  41.                 return;
  42.         }
  43.  
  44.         $et_secondary_nav_items = et_divi_get_top_nav_items();
  45.  
  46.         $et_phone_number = $et_secondary_nav_items->phone_number;
  47.  
  48.         $et_email = $et_secondary_nav_items->email;
  49.  
  50.         $et_contact_info_defined = $et_secondary_nav_items->contact_info_defined;
  51.  
  52.         $show_header_social_icons = $et_secondary_nav_items->show_header_social_icons;
  53.  
  54.         $et_secondary_nav = $et_secondary_nav_items->secondary_nav;
  55.  
  56.         $primary_nav_class = 'et_nav_text_color_' . et_get_option( 'primary_nav_text_color', 'dark' );
  57.  
  58.         $secondary_nav_class = 'et_nav_text_color_' . et_get_option( 'secondary_nav_text_color', 'light' );
  59.  
  60.         $et_top_info_defined = $et_secondary_nav_items->top_info_defined;
  61. ?>
  62.  
  63.         <?php if ( $et_top_info_defined ) : ?>
  64.                 <div id="top-header" class="<?php echo esc_attr( $secondary_nav_class ); ?>">
  65.                         <div class="container clearfix">
  66.  
  67.                         <?php if ( $et_contact_info_defined ) : ?>
  68.  
  69.                                 <div id="et-info">
  70.                                 <?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
  71.                                         <span id="et-info-phone"><?php echo esc_html( $et_phone_number ); ?></span>
  72.                                 <?php endif; ?>
  73.  
  74.                                 <?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
  75.                                         <a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
  76.                                 <?php endif; ?>
  77.  
  78.                                 <?php
  79.                                 if ( true === $show_header_social_icons ) {
  80.                                         get_template_part( 'includes/social_icons', 'header' );
  81.                                 } ?>
  82.                                 </div> <!-- #et-info -->
  83.  
  84.                         <?php endif; // true === $et_contact_info_defined ?>
  85.  
  86.                                 <div id="et-secondary-menu">
  87.                                 <?php
  88.                                         if ( ! $et_contact_info_defined && true === $show_header_social_icons ) {
  89.                                                 get_template_part( 'includes/social_icons', 'header' );
  90.                                         } else if ( $et_contact_info_defined && true === $show_header_social_icons ) {
  91.                                                 ob_start();
  92.  
  93.                                                 get_template_part( 'includes/social_icons', 'header' );
  94.  
  95.                                                 $duplicate_social_icons = ob_get_contents();
  96.  
  97.                                                 ob_end_clean();
  98.  
  99.                                                 printf(
  100.                                                         '<div class="et_duplicate_social_icons">
  101.                                                                 %1$s
  102.                                                         </div>',
  103.                                                         $duplicate_social_icons
  104.                                                 );
  105.                                         }
  106.  
  107.                                         if ( '' !== $et_secondary_nav ) {
  108.                                                 echo $et_secondary_nav;
  109.                                         }
  110.  
  111.                                         et_show_cart_total();
  112.                                 ?>
  113.                                 </div> <!-- #et-secondary-menu -->
  114.  
  115.                         </div> <!-- .container -->
  116.                 </div> <!-- #top-header -->
  117.         <?php endif; // true ==== $et_top_info_defined ?>
  118.  
  119.                 <header id="main-header" class="<?php echo esc_attr( $primary_nav_class ); ?>">
  120.                         <div class="container clearfix">
  121.                         <?php
  122.                                 $logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && '' != $user_logo
  123.                                         ? $user_logo
  124.                                         : $template_directory_uri . '/images/logo.png';
  125.                         ?>
  126.                                 <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
  127.                                         <img src="<?php echo esc_attr( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" id="logo" />
  128.                                 </a>
  129.  
  130.                                 <div id="et-top-navigation">
  131.                                         <nav id="top-menu-nav">
  132.                                         <?php
  133.                                                 $menuClass = 'nav';
  134.                                                 if ( 'on' == et_get_option( 'divi_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
  135.                                                 $primaryNav = '';
  136.  
  137.                                                 $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'menu_id' => 'top-menu', 'echo' => false ) );
  138.  
  139.                                                 if ( '' == $primaryNav ) :
  140.                                         ?>
  141.                                                 <ul id="top-menu" class="<?php echo esc_attr( $menuClass ); ?>">
  142.                                                         <?php if ( 'on' == et_get_option( 'divi_home_link' ) ) { ?>
  143.                                                                 <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>
  144.                                                         <?php }; ?>
  145.  
  146.                                                         <?php show_page_menu( $menuClass, false, false ); ?>
  147.                                                         <?php show_categories_menu( $menuClass, false ); ?>
  148.                                                 </ul>
  149.                                         <?php
  150.                                                 else :
  151.                                                         echo( $primaryNav );
  152.                                                 endif;
  153.                                         ?>
  154.                                         </nav>
  155.  
  156.                                         <?php
  157.                                         if ( ! $et_top_info_defined ) {
  158.                                                 et_show_cart_total( array(
  159.                                                         'no_text' => true,
  160.                                                 ) );
  161.                                         }
  162.                                         ?>
  163.  
  164.                                         <?php if ( false !== et_get_option( 'show_search_icon', true ) ) : ?>
  165.                                         <div id="et_top_search">
  166.                                                 <span id="et_search_icon"></span>
  167.                                                 <form role="search" method="get" class="et-search-form et-hidden" action="<?php echo esc_url( home_url( '/' ) ); ?>">
  168.                                                 <?php
  169.                                                         printf( '<input type="search" class="et-search-field" placeholder="%1$s" value="%2$s" name="s" title="%3$s" />',
  170.                                                                 esc_attr__( 'Search &hellip;', 'Divi' ),
  171.                                                                 get_search_query(),
  172.                                                                 esc_attr__( 'Search for:', 'Divi' )
  173.                                                         );
  174.                                                 ?>
  175.                                                 </form>
  176.                                         </div>
  177.                                         <?php endif; // true === et_get_option( 'show_search_icon', false ) ?>
  178.  
  179.                                         <?php do_action( 'et_header_top' ); ?>
  180.                                 </div> <!-- #et-top-navigation -->
  181.                         </div> <!-- .container -->
  182.                 </header> <!-- #main-header -->
  183.  
  184.                 <div id="et-main-area">