Advertisement
rdusnr

Untitled

Aug 16th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.14 KB | None | 0 0
  1. <?php
  2. if ( sq_option( 'header_status', true, true ) == false ) {
  3. return false;
  4. }
  5. ?>
  6.  
  7. <!-- Header
  8. ============================================= -->
  9.  
  10. <?php
  11. //white or dark logo
  12. $logo_mobile = Kleo::get_config( 'logo_mobile' );
  13. $logo_attr = '';
  14. if ( sq_option( $logo_mobile . '_retina', '' ) ) {
  15. $logo_attr = 'data-retina="' . esc_attr( sq_option( $logo_mobile . '_retina' ) ) . '"';
  16. }
  17.  
  18. $logo_link = home_url();
  19. $logo_image = sq_option( $logo_mobile, Kleo::get_config($logo_mobile . '_default') );
  20.  
  21. if (is_ssl()) {
  22. $logo_image = str_replace( 'http://', 'https://', $logo_image );
  23. $logo_attr = str_replace( 'http://', 'https://', $logo_attr );
  24. }
  25.  
  26. $current_header_classes = 'header-colors header-layout-01';
  27.  
  28. /* Check if search is active */
  29. if ( sq_option( 'header_search', true, true ) ) {
  30. $current_header_classes .= ' has-search';
  31. }
  32.  
  33. /* Check how dropdown triggers */
  34. if ( sq_option( 'menu_dropdown', 'hover', true ) == 'hover' ) {
  35. $current_header_classes .= ' hover-menu';
  36. } else {
  37. $current_header_classes .= ' click-menu';
  38. }
  39.  
  40.  
  41. ?>
  42.  
  43. <header id="header" <?php kleo_header_class( $current_header_classes ); ?>>
  44.  
  45. <div id="header-wrap">
  46.  
  47. <div class="logo">
  48. <!-- top-header and mobile logo only-->
  49. <?php if ( sq_option( $logo_mobile, Kleo::get_config($logo_mobile . '_default') ) ) : ?>
  50.  
  51. <a href="<?php echo esc_url( $logo_link ); ?>" class="mobile-logo standard-logo" <?php echo $logo_attr;?>>
  52. <img src="<?php echo $logo_image; ?>" alt="<?php bloginfo('name'); ?>">
  53. </a>
  54.  
  55. <?php endif; ?>
  56.  
  57. </div>
  58.  
  59. <div class="header-left">
  60. <a href="#" class="sidemenu-trigger sidemenu-icon-wrapper">
  61. <span class="sidemenu-icon">
  62. <span><i></i><b></b></span>
  63. <span><i></i><b></b></span>
  64. <span><i></i><b></b></span>
  65. </span>
  66. </a>
  67.  
  68.  
  69.  
  70.  
  71. </div>
  72. <div class="header-right">
  73. <a href="#" class="second-menu-trigger second-menu-icon-wrapper">
  74. <span class="second-menu-icon">
  75. <span></span>
  76. <span></span>
  77. <span></span>
  78. </span>
  79.  
  80. <!--<i class="icon-storage"></i>-->
  81. </a>
  82. </div>
  83.  
  84. <div class="second-menu">
  85. <div class="second-menu-main">
  86. <div class="second-menu-inner">
  87. <div class="scroll-container-wrapper">
  88. <div class="scroll-container">
  89. <div class="second-menu-section">
  90.  
  91. <?php
  92. // Top left navigation menu.
  93. wp_nav_menu( array(
  94. 'theme_location' => 'top-left',
  95. 'menu_class' => 'basic-menu header-icons kleo-nav-menu',
  96. 'container' => false,
  97. 'link_before' => '<span>',
  98. 'link_after' => '</span>',
  99. 'depth' => 4,
  100. 'max_elements' => 10,
  101. 'walker' => new kleo_walker_nav_menu(),
  102. 'fallback_cb' => 'kleo_header_icons_menu'
  103. ) );
  104. ?>
  105.  
  106.  
  107. <?php
  108. /* Check if search is active */
  109. if ( sq_option( 'header_search', true, true ) ) : ?>
  110.  
  111. <!-- The search form -->
  112. <div class="search-form-wrapper">
  113. <?php
  114. $context = sq_option( 'search_context', '' );
  115. echo kleo_search_form(array('context' => $context)); ?>
  116. </div>
  117.  
  118. <?php endif; ?>
  119.  
  120.  
  121. <?php
  122. /* Show my menu under the profile image just for logged in members */
  123. if ( sq_option('header_right_logic', 'default', true ) == 'default' ): ?>
  124.  
  125. <?php if (is_user_logged_in()) : ?>
  126.  
  127. <ul class="basic-menu header-menu">
  128. <li class="has-submenu kleo-user_avatar-nav my-profile-default">
  129. <?php
  130. echo '<a href="#" class="open-submenu">' . kleo_get_avatar();
  131. echo '<span>';
  132. $current_user = wp_get_current_user();
  133. echo esc_html( $current_user->display_name );
  134. echo '</span>';
  135. echo '</a><span class="menu-arrow"></span>';
  136. ?>
  137.  
  138. <?php
  139. // Top right navigation menu.
  140. wp_nav_menu( array(
  141. 'theme_location' => 'top-right',
  142. 'menu_class' => 'submenu',
  143. 'container' => false,
  144. 'link_before' => '',
  145. 'link_after' => '',
  146. 'depth' => 4,
  147. 'walker' => new kleo_walker_nav_menu(),
  148. 'fallback_cb' => 'kleo_bp_menu',
  149. ) );
  150. ?>
  151. </li>
  152. </ul>
  153.  
  154. <?php else : ?>
  155.  
  156. <div class="show-login">
  157. <a href="">
  158. <i class="icon-lock"></i>
  159. <?php esc_html_e( "Login", 'buddyapp' ); ?>
  160. </a>
  161. </div>
  162.  
  163. <?php endif; ?>
  164.  
  165. <?php
  166. /* Show my menu horizontally */
  167. else: ?>
  168.  
  169. <?php
  170. // Top right navigation menu.
  171. wp_nav_menu( array(
  172. 'theme_location' => 'top-right',
  173. 'menu_class' => 'basic-menu header-menu',
  174. 'container' => false,
  175. 'link_before' => '',
  176. 'link_after' => '',
  177. 'depth' => 4,
  178. 'walker' => new kleo_walker_nav_menu(),
  179. 'fallback_cb' => 'kleo_bp_menu'
  180. ) );
  181. ?>
  182.  
  183. <?php endif; ?>
  184.  
  185.  
  186. <?php
  187. /**
  188. * If WPML plugin is active, the language sub-menu will show here
  189. */
  190.  
  191. do_action( 'kleo_header_language' );
  192. ?>
  193.  
  194. </div>
  195.  
  196.  
  197.  
  198. </div>
  199. </div>
  200.  
  201.  
  202. </div>
  203. </div>
  204.  
  205.  
  206. </div>
  207.  
  208.  
  209.  
  210. </div>
  211.  
  212. </header><!-- #header end -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement