Advertisement
Guest User

Untitled

a guest
May 11th, 2021
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. <?php
  2. $consultstreet_top_header_info_content = get_theme_mod( 'consultstreet_top_header_info_content');
  3. $consultstreet_top_header_social_content = get_theme_mod( 'consultstreet_top_header_social_content');
  4. $consultstreet_site_top_header_disabled = get_theme_mod( 'consultstreet_site_top_header_disabled', true );
  5. $consultstreet_site_top_header_info_disabled = get_theme_mod( 'consultstreet_site_top_header_info_disabled', true );
  6. $consultstreet_site_top_header_social_disabled = get_theme_mod( 'consultstreet_site_top_header_social_disabled', true );
  7. $consultstreet_top_header_bac_color = get_theme_mod( 'consultstreet_top_header_bac_color', '#01012f' );
  8. $consultstreet_top_header_container_size = get_theme_mod( 'consultstreet_top_header_container_size', 'container-full' );
  9. ?>
  10. <?php if($consultstreet_site_top_header_disabled == true): ?>
  11. <!--Header Sidebar-->
  12. <header id="site-header" class="site-header">
  13. <div class="<?php echo $consultstreet_top_header_container_size; ?>">
  14. <div class="row">
  15. <?php if($consultstreet_site_top_header_info_disabled == true): ?>
  16. <div class="col-lg-9 col-md-9 col-sm-12">
  17. <aside class="widget">
  18. <ul class="theme-contact-block">
  19. <?php
  20. if ( ! empty( $consultstreet_top_header_info_content ) ) {
  21. $allowed_html = array(
  22. 'br' => array(),
  23. 'em' => array(),
  24. 'strong' => array(),
  25. 'b' => array(),
  26. 'i' => array(),
  27. );
  28. $consultstreet_top_header_info_content = json_decode( $consultstreet_top_header_info_content );
  29. foreach ( $consultstreet_top_header_info_content as $header_info ) {
  30. $icon = ! empty( $header_info->icon_value ) ? apply_filters( 'consultstreet_translate_single_string',$header_info->icon_value, 'Theme Header Info' ) : '';
  31. $text = ! empty( $header_info->text ) ? apply_filters( 'consultstreet_translate_single_string',
  32. $header_info->text, 'Theme Header Info' ) : '';
  33. $link = ! empty( $header_info->link ) ? apply_filters( 'consultstreet_translate_single_string', $header_info->link, 'Theme Header Info' ) : '';
  34. $open_new_tab = $header_info->open_new_tab; ?>
  35.  
  36. <li><?php if ( ! empty( $icon ) ) :?>
  37. <i class="fa <?php echo esc_html( $icon ); ?>">
  38. <?php endif; ?></i>
  39. <?php if ( ! empty( $text ) ) : ?>
  40. <?php if(!empty($link)){ ?>
  41. <a href="<?php echo $link; ?>" <?php if($open_new_tab =='yes'){?>target="_blank" <?php }?> > <?php echo wp_kses( html_entity_decode( $text ), $allowed_html ); ?> </a>
  42. <?php }else{ ?>
  43. <?php echo wp_kses( html_entity_decode( $text ), $allowed_html ); ?>
  44. <?php } ?>
  45. <?php endif; ?>
  46. </li>
  47. <?php } } else { ?>
  48. <li><i class="fa fa-clock-o"></i><?php esc_html_e('Mon - Sat 8.00 - 18.00. Sunday CLOSED','consultstreet'); ?></li>
  49. <li><i class="fa fa-phone"></i><?php esc_html_e('+14 1-800-1234-567','consultstreet'); ?></li>
  50. <li><i class="fa fa-envelope-o"></i><a href="mailto:info@consultstreet.com"><?php _e('info@consultstreet.com','consultstreet'); ?></a></li>
  51. <?php } ?>
  52. </ul>
  53. </aside>
  54. </div>
  55. <?php endif ?>
  56. <?php if($consultstreet_site_top_header_social_disabled == true): ?>
  57. <div class="col-lg-3 col-md-3 col-sm-12">
  58. <aside class="widget">
  59. <ul class="custom-social-icons">
  60. <?php
  61. if ( ! empty( $consultstreet_top_header_social_content ) ) {
  62.  
  63. $consultstreet_top_header_social_content = json_decode( $consultstreet_top_header_social_content );
  64. foreach ( $consultstreet_top_header_social_content as $header_social ) {
  65. $icon = ! empty( $header_social->icon_value ) ? apply_filters( 'consultstreet_translate_single_string',$header_social->icon_value, 'Theme Header Social' ) : '';
  66. $link = ! empty( $header_social->link ) ? apply_filters( 'consultstreet_translate_single_string', $header_social->link, 'Theme Header Social' ) : '';
  67. $open_new_tab = $header_social->open_new_tab; ?>
  68.  
  69. <?php if ( ! empty( $icon ) ) :?>
  70. <?php if(!empty($link)){ ?>
  71. <li><a class="social-hover" href="<?php echo $link; ?>" <?php if($open_new_tab =='yes'){?>target="_blank" <?php }?>><i class="fa <?php echo esc_html( $icon ); ?>"></i></a></li>
  72. <?php }else{ ?>
  73. <li><i class="fa <?php echo esc_html( $icon ); ?>"></i></li>
  74. <?php } ?>
  75. <?php endif; ?>
  76.  
  77. <?php } } else { ?>
  78. <li><a class="social-hover" href="#"><i class="fa fa-facebook"></i></a></li>
  79. <li><a class="social-hover" href="#"><i class="fa fa-twitter"></i></a></li>
  80. <li><a class="social-hover" href="#"><i class="fa fa-google-plus"></i></a></li>
  81. <li><a class="social-hover" href="#"><i class="fa fa-linkedin"></i></a></li>
  82. <li><a class="social-hover" href="#"><i class="fa fa-instagram"></i></a></li>
  83. <li><a class="social-hover" href="#"><i class="fa fa-youtube"></i></a></li>
  84. <li><a class="social-hover" href="#"><i class="fa fa-skype"></i></a></li>
  85. <?php } ?>
  86. </ul>
  87. </aside>
  88. </div>
  89. <?php endif ?>
  90. </div>
  91. </div>
  92. </header>
  93. <?php endif; ?>
  94.  
  95. <?php if ( function_exists( 'groovy_menu' ) ) { groovy_menu(); } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement