Guest User

Untitled

a guest
Jul 16th, 2020
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.23 KB | None | 0 0
  1. <?php
  2. if (get_page_template_slug() == 'template/template-service.php') {
  3. $spicepress_service_layout = 1;
  4. } elseif (get_page_template_slug() == 'template/template-service-2.php') {
  5. $spicepress_service_layout = 2;
  6. } elseif (get_page_template_slug() == 'template/template-service-3.php') {
  7. $spicepress_service_layout = 3;
  8. } elseif (get_page_template_slug() == 'template/template-service-4.php') {
  9. $spicepress_service_layout = 4;
  10. } else {
  11. $spicepress_service_layout = get_theme_mod('home_serive_design_layout', 1);
  12. }
  13.  
  14. switch ($spicepress_service_layout) {
  15. case 1:
  16. $service_section_layout_wrapper = '<section class="service-section">';
  17. $service_post_div_wrap_start = '<div class="post text-center wow flipInX animated" data-wow-delay=".5s">';
  18. $service_post_div_wrap_end = '</div>';
  19. break;
  20.  
  21. case 2:
  22. $service_section_layout_wrapper = '<section class="section-module services2 service_wrapper">';
  23. $service_post_div_wrap_start = '<article class="post">';
  24. $service_post_div_wrap_end = '</article>';
  25. break;
  26.  
  27. case 3:
  28. $service_section_layout_wrapper = '<section class="section-module services3 service_wrapper">';
  29. $service_post_div_wrap_start = '<article class="post text-center">';
  30. $service_post_div_wrap_end = '</article>';
  31. break;
  32.  
  33. case 4:
  34. $service_section_layout_wrapper = '<section class="section-module services4 service_wrapper">';
  35. $service_post_div_wrap_start = '<article class="post">';
  36. $service_post_div_wrap_end = '</article>';
  37. break;
  38. }
  39. echo $service_section_layout_wrapper;
  40. ?>
  41. <div class="container">
  42. <?php
  43. $spicepress_service_content = get_theme_mod('spicepress_service_content');
  44. $home_service_section_title = get_theme_mod('home_service_section_title', __('What we offer', 'spicepress'));
  45. $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.');
  46. if (($home_service_section_title) || ($home_service_section_discription) != '') {
  47. ?>
  48. <!-- Section Title -->
  49. <div class="row">
  50. <div class="col-md-12">
  51. <div class="section-header">
  52. <?php if (!empty($home_service_section_title) || is_customize_preview()) : ?>
  53. <h1 class="widget-title">
  54. <?php echo $home_service_section_title; ?>
  55. </h1>
  56. <?php endif; ?>
  57. <div class="widget-separator"><span></span></div>
  58. <?php if ($home_service_section_discription) { ?>
  59. <p class="wow fadeInDown animated">
  60. <?php echo $home_service_section_discription; ?>
  61. </p>
  62. <?php } ?>
  63. </div>
  64. </div>
  65. </div>
  66. <!-- /Section Title -->
  67. <?php } ?>
  68. <div class="row">
  69. <?php
  70. if (empty($spicepress_service_content)) {
  71. $spicepress_service_content = json_encode(array(
  72. array(
  73. 'icon_value' => 'fa-laptop',
  74. 'title' => esc_html__('Easy to use', 'spicepress'),
  75. 'text' => '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.',
  76. 'link' => '#',
  77. 'open_new_tab' => 'no',
  78. 'choice' => 'customizer_repeater_icon',
  79. 'id' => 'customizer_repeater_56d7ea7f40b56',
  80. ),
  81. array(
  82. 'icon_value' => 'fa fa-cogs',
  83. 'title' => esc_html__('Multi-purpose', 'spicepress'),
  84. 'text' => '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.',
  85. 'link' => '#',
  86. 'open_new_tab' => 'no',
  87. 'choice' => 'customizer_repeater_icon',
  88. 'id' => 'customizer_repeater_56d7ea7f40b66',
  89. ),
  90. array(
  91. 'icon_value' => 'fa fa-mobile',
  92. 'title' => esc_html__('Responsive Design', 'spicepress'),
  93. 'text' => '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.',
  94. 'link' => '#',
  95. 'open_new_tab' => 'no',
  96. 'choice' => 'customizer_repeater_icon',
  97. 'id' => 'customizer_repeater_56d7ea7f40b86',
  98. ),
  99. array(
  100. 'icon_value' => 'fa fa-cogs',
  101. 'title' => esc_html__('Powerful Options', 'spicepress'),
  102. 'text' => '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.',
  103. 'link' => '#',
  104. 'open_new_tab' => 'no',
  105. 'choice' => 'customizer_repeater_icon',
  106. 'id' => 'customizer_repeater_56d7ea1f40b87',
  107. ),
  108. array(
  109. 'icon_value' => 'fa fa-code',
  110. 'title' => esc_html__('Unique and Clean', 'spicepress'),
  111. 'text' => '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.',
  112. 'link' => '#',
  113. 'open_new_tab' => 'no',
  114. 'choice' => 'customizer_repeater_icon',
  115. 'id' => 'customizer_repeater_56d7ea2f40b88',
  116. ),
  117. array(
  118. 'icon_value' => 'fa fa-users',
  119. 'title' => esc_html__('Satisfied Clients', 'spicepress'),
  120. 'text' => '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.',
  121. 'link' => '#',
  122. 'open_new_tab' => 'no',
  123. 'choice' => 'customizer_repeater_icon',
  124. 'id' => 'customizer_repeater_56d3ea7f40b89',
  125. )
  126. ));
  127. }
  128.  
  129. if (!empty($spicepress_service_content)) {
  130. $allowed_html = array(
  131. 'br' => array(),
  132. 'em' => array(),
  133. 'strong' => array(),
  134. 'b' => array(),
  135. 'i' => array(),
  136. );
  137. $spicepress_service_content = json_decode($spicepress_service_content);
  138. foreach ($spicepress_service_content as $features_item) {
  139. $icon = !empty($features_item->icon_value) ? apply_filters('spicepress_translate_single_string', $features_item->icon_value, 'Features section') : '';
  140. $title = !empty($features_item->title) ? apply_filters('spicepress_translate_single_string', $features_item->title, 'Features section') : '';
  141. $text = !empty($features_item->text) ? apply_filters('spicepress_translate_single_string', $features_item->text, 'Features section') : '';
  142. $link = !empty($features_item->link) ? apply_filters('spicepress_translate_single_string', $features_item->link, 'Features section') : '';
  143. $image = !empty($features_item->image_url) ? apply_filters('spicepress_translate_single_string', $features_item->image_url, 'Features section') : '';
  144. $choice = !empty($features_item->choice) ? $features_item->choice : 'customizer_repeater_icon';
  145.  
  146. $open_new_tab = $features_item->open_new_tab;
  147. ?>
  148. <div class="col-md-4 col-sm-6 col-xs-12">
  149. <?php
  150. echo $service_post_div_wrap_start;
  151. if ($choice == 'customizer_repeater_image') {
  152. if (!empty($image)) :
  153. ?>
  154. <figure class="post-thumbnail">
  155.  
  156. <?php if (!empty($link)) : ?>
  157. <a href="<?php echo esc_url($link); ?>" <?php
  158. if ($open_new_tab == 'yes') {
  159. echo 'target="_blank"';
  160. }
  161. ?>>
  162. <?php endif; ?>
  163. <img class="services_cols_mn_icon"
  164. src="<?php echo esc_url($image); ?>" <?php if (!empty($title)) : ?> alt="<?php echo esc_attr($title); ?>" title="<?php echo esc_attr($title); ?>" <?php endif; ?> />
  165.  
  166. <?php if (!empty($link)) : ?>
  167. </a>
  168. <?php endif; ?>
  169.  
  170. </figure>
  171. <?php endif; ?>
  172. <?php } ?>
  173.  
  174. <?php if ($choice == 'customizer_repeater_icon') { ?>
  175.  
  176. <?php if (!empty($icon)) : ?>
  177.  
  178. <figure class="post-thumbnail">
  179. <?php if (!empty($link)) : ?>
  180. <a href="<?php echo esc_url($link); ?>" <?php
  181. if ($open_new_tab == 'yes') {
  182. echo 'target="_blank"';
  183. }
  184. ?> >
  185. <?php endif; ?>
  186. <i class="fa <?php echo esc_html($icon); ?> txt-pink"></i>
  187.  
  188. <?php if (!empty($link)) : ?>
  189. </a>
  190. <?php endif; ?>
  191.  
  192. </figure>
  193. <?php endif; ?>
  194. <?php } ?>
  195.  
  196.  
  197.  
  198. <?php if (!empty($title)) { ?>
  199. <div class="entry-header">
  200. <h4 class="entry-title">
  201. <?php if (!empty($link)) { ?>
  202. <a href="<?php echo esc_url($link); ?>" <?php
  203. if ($open_new_tab == 'yes') {
  204. echo 'target="_blank"';
  205. }
  206. ?> >
  207. <?php echo esc_html($title); ?>
  208. </a>
  209.  
  210. <?php
  211. } else {
  212. echo esc_html($title);
  213. }
  214. ?>
  215. </h4></div>
  216. <?php } ?>
  217.  
  218.  
  219. <?php if (!empty($text)) : ?>
  220. <div class="entry-content">
  221. <p><?php echo wp_kses(html_entity_decode($text), $allowed_html); ?></p>
  222. </div>
  223. <?php
  224. endif;
  225.  
  226. echo do_shortcode('[mr_rating_result post_id="237"]') ;
  227. echo $service_post_div_wrap_end;
  228. ?>
  229.  
  230. </div>
  231. <?php
  232. }
  233. }
  234. ?>
  235. </div>
  236. </div>
  237. </section>
Add Comment
Please, Sign In to add comment