Guest User

Untitled

a guest
Sep 18th, 2018
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1. <?php spicepress_before_service_section_trigger(); ?>
  2. <?php $spicepress_service_content = get_theme_mod( 'spicepress_service_content');
  3. $home_service_section_enabled = get_theme_mod('home_service_section_enabled','on');
  4. if($home_service_section_enabled !='off')
  5. {
  6. ?>
  7. <!-- Service Section -->
  8. <section class="service-section">
  9. <div class="container">
  10. <?php
  11.  
  12. $home_service_section_title = get_theme_mod('home_service_section_title',__('What we offer','spicepress'));
  13. $home_service_section_discription = get_theme_mod('home_service_section_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
  14. if( ($home_service_section_title) || ($home_service_section_discription)!='' ) { ?>
  15. <!-- Section Title -->
  16. <div class="row">
  17. <div class="col-md-12">
  18. <div class="section-header">
  19. <?php if ( ! empty( $home_service_section_title ) || is_customize_preview() ) : ?>
  20. <h1 class="widget-title">
  21. <?php echo $home_service_section_title; ?>
  22. </h1>
  23. <?php endif; ?>
  24. <div class="widget-separator"><span></span></div>
  25. <?php if($home_service_section_discription) {?>
  26. <div class="separator"><span></span></div>
  27. <p class="wow fadeInDown animated">
  28. <?php echo $home_service_section_discription; ?>
  29. </p>
  30. <?php } ?>
  31. </div>
  32. </div>
  33. </div>
  34. <!-- /Section Title -->
  35. <?php } ?>
  36. <div class="row">
  37. <?php
  38.  
  39. if ( ! empty( $spicepress_service_content ) ) {
  40. $allowed_html = array(
  41. 'br' => array(),
  42. 'em' => array(),
  43. 'strong' => array(),
  44. 'b' => array(),
  45. 'i' => array(),
  46. );
  47. $spicepress_service_content = json_decode( $spicepress_service_content );
  48. foreach ( $spicepress_service_content as $features_item ) {
  49. $icon = ! empty( $features_item->icon_value ) ? apply_filters( 'spicepress_translate_single_string', $features_item->icon_value, 'Features section' ) : '';
  50. $title = ! empty( $features_item->title ) ? apply_filters( 'spicepress_translate_single_string', $features_item->title, 'Features section' ) : '';
  51. $text = ! empty( $features_item->text ) ? apply_filters( 'spicepress_translate_single_string', $features_item->text, 'Features section' ) : '';
  52. $link = ! empty( $features_item->link ) ? apply_filters( 'spicepress_translate_single_string', $features_item->link, 'Features section' ) : '';
  53. $image = ! empty( $features_item->image_url ) ? apply_filters( 'spicepress_translate_single_string', $features_item->image_url, 'Features section' ) : '';
  54.  
  55. $open_new_tab = $features_item->open_new_tab;
  56.  
  57. ?>
  58. <div class="col-md-4 col-sm-6 col-xs-12">
  59. <div class="post text-center wow flipInX animated" data-wow-delay=".5s">
  60.  
  61. <figure class="post-thumbnail">
  62. <?php if ( ! empty( $image ) ) : ?>
  63.  
  64. <?php if ( ! empty( $link ) ) : ?>
  65. <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>>
  66. <?php endif; ?>
  67. <img class="services_cols_mn_icon"
  68. src="<?php echo esc_url( $image ); ?>" <?php if ( ! empty( $title ) ) : ?> alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
  69. <?php if ( ! empty( $link ) ) : ?>
  70. </a>
  71. <?php endif; ?>
  72. <?php endif; ?>
  73.  
  74. <?php if ( ! empty( $link ) ) : ?>
  75. <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?> >
  76. <?php endif; ?>
  77. <?php if ( ! empty( $icon ) ) :?>
  78.  
  79. <i class="fa <?php echo esc_html( $icon ); ?> txt-pink"></i>
  80.  
  81. <?php endif; ?>
  82. </figure>
  83. <?php if ( ! empty( $title ) ) : ?>
  84.  
  85. <div class="entry-header">
  86. <h4 class="entry-title"><?php echo esc_html( $title ); ?></h4>
  87. </div>
  88. <?php endif; ?>
  89. <?php if ( ! empty( $link ) ) : ?>
  90. </a>
  91. <?php endif; ?>
  92. <?php if ( ! empty( $text ) ) : ?>
  93.  
  94. <div class="entry-content">
  95. <p><?php echo html_entity_decode( do_shortcode($text) ); ?></p>
  96. </div>
  97.  
  98.  
  99.  
  100.  
  101.  
  102. <?php endif; ?>
  103. </div>
  104. </div>
  105. <?php
  106. } }
  107. else
  108. {
  109.  
  110. $icon = array('fa fa-laptop','fa fa-cogs','fa fa-mobile');
  111. $title = array (__('Easy to use','spicepress'), __('Multi-purpose','spicepress'), __('Responsive Design','spicepress'));
  112. for($i=0; $i<=2; $i++) {
  113. ?>
  114. <div class="col-md-4 col-sm-6 col-xs-12">
  115. <div class="post text-center wow flipInX animated" data-wow-delay=".5s">
  116. <figure class="post-thumbnail">
  117. <i class="<?php echo $icon[$i]; ?> txt-pink"></i></figure>
  118. <div class="entry-header">
  119. <h4 class="entry-title"><a href="#"><?php echo $title[$i]; ?></a></h4>
  120. </div>
  121. <div class="entry-content">
  122. <p><?php echo 'Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.'; ?></p>
  123. </div>
  124. </div>
  125. </div>
  126. <?php
  127. } }
  128. ?>
  129. </div>
  130. </div>
  131. </section>
  132. <!-- /Service Section -->
  133. <?php } ?>
  134. <?php spicepress_after_service_section_trigger(); ?>
Add Comment
Please, Sign In to add comment