Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 elegant_titles(); ?></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. <?php text_slider(); ?>
  83. </div> <!-- #et-info -->
  84.  
  85. <?php endif; // true === $et_contact_info_defined ?>
  86.  
  87. <div id="et-secondary-menu">
  88. <?php
  89. if ( ! $et_contact_info_defined && true === $show_header_social_icons ) {
  90. get_template_part( 'includes/social_icons', 'header' );
  91. } else if ( $et_contact_info_defined && true === $show_header_social_icons ) {
  92. ob_start();
  93.  
  94. get_template_part( 'includes/social_icons', 'header' );
  95.  
  96. $duplicate_social_icons = ob_get_contents();
  97.  
  98. ob_end_clean();
  99.  
  100. printf(
  101. '<div class="et_duplicate_social_icons">
  102. %1$s
  103. </div>',
  104. $duplicate_social_icons
  105. );
  106. }
  107.  
  108. if ( '' !== $et_secondary_nav ) {
  109. echo $et_secondary_nav;
  110. }
  111.  
  112. et_show_cart_total();
  113. ?>
  114. </div> <!-- #et-secondary-menu -->
  115.  
  116. </div> <!-- .container -->
  117. </div> <!-- #top-header -->
  118. <?php endif; // true ==== $et_top_info_defined ?>
  119.  
  120. <header id="main-header" class="<?php echo esc_attr( $primary_nav_class ); ?>">
  121. <div class="container clearfix">
  122. <?php
  123. $logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && '' != $user_logo
  124. ? $user_logo
  125. : $template_directory_uri . '/images/logo.png';
  126. ?>
  127. <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
  128. <img src="<?php echo esc_attr( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" id="logo" />
  129. </a>
  130.  
  131. <div id="et-top-navigation">
  132. <nav id="top-menu-nav">
  133. <?php
  134. $menuClass = 'nav';
  135. if ( 'on' == et_get_option( 'divi_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
  136. $primaryNav = '';
  137.  
  138. $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'menu_id' => 'top-menu', 'echo' => false ) );
  139.  
  140. if ( '' == $primaryNav ) :
  141. ?>
  142. <ul id="top-menu" class="<?php echo esc_attr( $menuClass ); ?>">
  143. <?php if ( 'on' == et_get_option( 'divi_home_link' ) ) { ?>
  144. <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>
  145. <?php }; ?>
  146.  
  147. <?php show_page_menu( $menuClass, false, false ); ?>
  148. <?php show_categories_menu( $menuClass, false ); ?>
  149. </ul>
  150. <?php
  151. else :
  152. echo( $primaryNav );
  153. endif;
  154. ?>
  155. </nav>
  156.  
  157. <?php
  158. if ( ! $et_top_info_defined ) {
  159. et_show_cart_total( array(
  160. 'no_text' => true,
  161. ) );
  162. }
  163. ?>
  164.  
  165. <?php if ( false !== et_get_option( 'show_search_icon', true ) ) : ?>
  166. <div id="et_top_search">
  167. <span id="et_search_icon"></span>
  168. <form role="search" method="get" class="et-search-form et-hidden" action="<?php echo esc_url( home_url( '/' ) ); ?>">
  169. <?php
  170. printf( '<input type="search" class="et-search-field" placeholder="%1$s" value="%2$s" name="s" title="%3$s" />',
  171. esc_attr_x( 'Search &hellip;', 'placeholder', 'Divi' ),
  172. get_search_query(),
  173. esc_attr_x( 'Search for:', 'label', 'Divi' )
  174. );
  175. ?>
  176. </form>
  177. </div>
  178. <?php endif; // true === et_get_option( 'show_search_icon', false ) ?>
  179.  
  180. <?php do_action( 'et_header_top' ); ?>
  181. </div> <!-- #et-top-navigation -->
  182. </div> <!-- .container -->
  183. </header> <!-- #main-header -->
  184.  
  185. <div id="et-main-area">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement