Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Header for our theme.
  4. */
  5. ?><!DOCTYPE html>
  6. <html <?php language_attributes(); ?> class="<?php
  7. // Add class 'scheme_xxx' into <html> because it used as context for the body classes!
  8. $body_scheme = language_center_get_custom_option('body_scheme');
  9. if (empty($body_scheme) || language_center_is_inherit_option($body_scheme)) $body_scheme = 'original';
  10. echo 'scheme_' . esc_attr($body_scheme);
  11. ?>">
  12.  
  13. <head>
  14. <?php wp_head(); ?>
  15. </head>
  16.  
  17. <body <?php body_class();?>>
  18.  
  19. <?php do_action( 'before' ); ?>
  20.  
  21. <?php if ( !language_center_param_is_off(language_center_get_custom_option('show_sidebar_outer')) ) { ?>
  22. <div class="outer_wrap">
  23. <?php } ?>
  24.  
  25. <?php get_template_part(language_center_get_file_slug('sidebar_outer.php')); ?>
  26.  
  27. <?php
  28. $body_style = language_center_get_custom_option('body_style');
  29. $class = $style = '';
  30. if (language_center_get_custom_option('bg_custom')=='yes' && ($body_style=='boxed' || language_center_get_custom_option('bg_image_load')=='always')) {
  31. if (($img = language_center_get_custom_option('bg_image_custom')) != '')
  32. $style = 'background: url('.esc_url($img).') ' . str_replace('_', ' ', language_center_get_custom_option('bg_image_custom_position')) . ' no-repeat fixed;';
  33. else if (($img = language_center_get_custom_option('bg_pattern_custom')) != '')
  34. $style = 'background: url('.esc_url($img).') 0 0 repeat fixed;';
  35. else if (($img = language_center_get_custom_option('bg_image')) > 0)
  36. $class = 'bg_image_'.($img);
  37. else if (($img = language_center_get_custom_option('bg_pattern')) > 0)
  38. $class = 'bg_pattern_'.($img);
  39. if (($img = language_center_get_custom_option('bg_color')) != '')
  40. $style .= 'background-color: '.($img).';';
  41. }
  42. ?>
  43.  
  44. <div class="body_wrap<?php echo !empty($class) ? ' '.esc_attr($class) : ''; ?>"<?php echo !empty($style) ? ' style="'.esc_attr($style).'"' : ''; ?>>
  45.  
  46. <?php
  47. $video_bg_show = language_center_get_custom_option('show_video_bg')=='yes';
  48. $youtube = language_center_get_custom_option('video_bg_youtube_code');
  49. $video = language_center_get_custom_option('video_bg_url');
  50. $overlay = language_center_get_custom_option('video_bg_overlay')=='yes';
  51. if ($video_bg_show && (!empty($youtube) || !empty($video))) {
  52. if (!empty($youtube)) {
  53. ?>
  54. <div class="video_bg<?php echo !empty($overlay) ? ' video_bg_overlay' : ''; ?>" data-youtube-code="<?php echo esc_attr($youtube); ?>"></div>
  55. <?php
  56. } else if (!empty($video)) {
  57. $info = pathinfo($video);
  58. $ext = !empty($info['extension']) ? $info['extension'] : 'src';
  59. ?>
  60. <div class="video_bg<?php echo !empty($overlay) ? ' video_bg_overlay' : ''; ?>"><video class="video_bg_tag" width="1280" height="720" data-width="1280" data-height="720" data-ratio="16:9" preload="metadata" autoplay loop src="<?php echo esc_url($video); ?>"><source src="<?php echo esc_url($video); ?>" type="video/<?php echo esc_attr($ext); ?>"></source></video></div>
  61. <?php
  62. }
  63. }
  64. ?>
  65.  
  66. <div class="page_wrap">
  67.  
  68. <?php
  69. $top_panel_style = language_center_get_custom_option('top_panel_style');
  70. $top_panel_position = language_center_get_custom_option('top_panel_position');
  71. $top_panel_scheme = language_center_get_custom_option('top_panel_scheme');
  72. // Top panel 'Above' or 'Over'
  73. if (in_array($top_panel_position, array('above', 'over'))) {
  74. language_center_show_post_layout(array(
  75. 'layout' => $top_panel_style,
  76. 'position' => $top_panel_position,
  77. 'scheme' => $top_panel_scheme
  78. ), false);
  79. // Mobile Menu
  80. get_template_part(language_center_get_file_slug('templates/headers/_parts/header-mobile.php'));
  81. }
  82.  
  83. // Slider
  84. get_template_part(language_center_get_file_slug('templates/headers/_parts/slider.php'));
  85.  
  86. // Top panel 'Below'
  87. if ($top_panel_position == 'below') {
  88. language_center_show_post_layout(array(
  89. 'layout' => $top_panel_style,
  90. 'position' => $top_panel_position,
  91. 'scheme' => $top_panel_scheme
  92. ), false);
  93. // Mobile Menu
  94. get_template_part(language_center_get_file_slug('templates/headers/_parts/header-mobile.php'));
  95. }
  96.  
  97. // Top of page section: page title and breadcrumbs
  98. $show_title = language_center_get_custom_option('show_page_title')=='yes';
  99. $show_navi = apply_filters('language_center_filter_show_post_navi', false);
  100. $show_breadcrumbs = language_center_get_custom_option('show_breadcrumbs')=='yes';
  101.  
  102. //$show_title_bg = language_center_get_custom_option('show_title_bg')=='yes';
  103.  
  104. $title_bg = language_center_get_custom_option('title_bg');
  105.  
  106. if (!is_front_page() & ($show_title || $show_breadcrumbs)) {
  107. ?>
  108. <div class="top_panel_title top_panel_style_<?php echo esc_attr(str_replace('header_', '', $top_panel_style)); ?> <?php echo (!empty($show_title) ? ' title_present'. ($show_navi ? ' navi_present' : '') : '') . (!empty($show_breadcrumbs) ? ' breadcrumbs_present' : ''); ?> scheme_<?php echo esc_attr($top_panel_scheme); ?>">
  109. <div style="<?php echo language_center_get_custom_option('show_title_bg')=='yes' ? 'background-image: url(' . esc_url($title_bg) . ');' : ''; ?>" class="top_panel_title_inner top_panel_inner_style_<?php echo esc_attr(str_replace('header_', '', $top_panel_style)); ?> <?php echo (!empty($show_title) ? ' title_present_inner' : '') . (!empty($show_breadcrumbs) ? ' breadcrumbs_present_inner' : ''); ?>">
  110. <div class="content_wrap">
  111. <?php
  112. if ($show_title) {
  113. if ($show_navi) {
  114. ?><div class="post_navi"><?php
  115. previous_post_link( '<span class="post_navi_item post_navi_prev">%link</span>', '%title', true, '', 'product_cat' );
  116. next_post_link( '<span class="post_navi_item post_navi_next">%link</span>', '%title', true, '', 'product_cat' );
  117. ?></div><?php
  118. } else {
  119. ?><h1 class="page_title"><?php echo strip_tags(language_center_get_blog_title()); ?></h1><?php
  120. }
  121. }
  122. if ($show_breadcrumbs) {
  123. ?><div class="breadcrumbs"><?php if (!is_404()) language_center_show_breadcrumbs(); ?></div><?php
  124. }
  125. ?>
  126. </div>
  127. </div>
  128. </div>
  129. <?php
  130. }
  131. ?>
  132.  
  133. <div class="page_content_wrap page_paddings_<?php echo esc_attr(language_center_get_custom_option('body_paddings')); ?>">
  134.  
  135. <?php
  136. // Content and sidebar wrapper
  137. if ($body_style!='fullscreen') language_center_open_wrapper('<div class="content_wrap">');
  138.  
  139. // Main content wrapper
  140. language_center_open_wrapper('<div class="content">');
  141. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement