Guest User

Untitled

a guest
Nov 28th, 2018
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.77 KB | None | 0 0
  1. <?php spicepress_before_testimonial_section_trigger(); ?>
  2. <!-- Testimonial Section -->
  3. <?php
  4. $testimonial_options = get_theme_mod('spicepress_testimonial_content');
  5.  
  6. if(empty($testimonial_options))
  7. {
  8.  
  9. if( get_theme_mod('home_testimonial_title') != '' || get_theme_mod('home_testimonial_designation') != '' || get_theme_mod('home_testimonial_thumb') != '' || get_theme_mod('home_testimonial_desc') != ''){
  10.  
  11. $home_testimonial_title = get_theme_mod('home_testimonial_title');
  12. $home_testimonial_desc = get_theme_mod('home_testimonial_desc');
  13. $designation = get_theme_mod('designation');
  14. $home_testimonial_thumb = get_theme_mod('home_testimonial_thumb');
  15.  
  16. $testimonial_options = json_encode( array(
  17. array(
  18. 'title' => !empty($home_testimonial_title)? $home_testimonial_title:'Alice Culan',
  19. 'text' => !empty($home_testimonial_desc)? $home_testimonial_desc :'Sed ut Perspiciatis Unde Omnis Iste Sed ut perspiciatis unde omnis iste natu error sit voluptatem accu tium neque fermentum veposu miten a tempor nise. Duis autem vel eum iriure dolor in hendrerit in vulputate velit consequat reprehender in voluptate velit esse cillum duis dolor fugiat nulla pariatur.',
  20. 'designation' => !empty($designation)? $designation : 'UI Developer',
  21. 'link' => '#',
  22. 'image_url' => !empty($home_testimonial_thumb)? $home_testimonial_thumb : get_template_directory_uri().'/images/item7.jpg',
  23. 'open_new_tab' => 'no',
  24. 'id' => 'customizer_repeater_56d7ea7f40b51',
  25. ),
  26. ) );
  27.  
  28. }
  29.  
  30. }
  31.  
  32. $testimonial_section_enable = get_theme_mod('testimonial_section_enable','on');
  33. if($testimonial_section_enable !='off')
  34. {
  35. $testimonial_animation = get_theme_mod('testimonial_animation', '');
  36. $testimonial_animation_speed = get_theme_mod('testimonial_animation_speed', 3000);
  37.  
  38. $testimonialsettings=array('animation'=>$testimonial_animation,'animationSpeed'=>$testimonial_animation_speed);
  39.  
  40.  
  41. wp_register_script('spicepress-testimonial',get_template_directory_uri().'/js/front-page/testimonial.js',array('jquery'));
  42. wp_localize_script('spicepress-testimonial','testimonial_settings',$testimonialsettings);
  43. wp_enqueue_script('spicepress-testimonial');
  44.  
  45.  
  46.  
  47.  
  48. $testimonial_callout_background = get_theme_mod('testimonial_callout_background','');
  49. if($testimonial_callout_background != '') { ?>
  50. <section id="testimonial" class="testimonial-section" style="background-image:url('<?php echo esc_url($testimonial_callout_background);?>'); background-repeat: no-repeat; background-position: top left;">
  51. <?php } else { ?>
  52. <section id="testimonial" class="testimonial-section">
  53. <?php }
  54. $testimonial_overlay_section_color = get_theme_mod('testimonial_overlay_section_color','rgba(0,0,0,0.85)');
  55. $testimonial_image_overlay = get_theme_mod('testimonial_image_overlay',true);
  56. ?>
  57. <div class="overlay"<?php if($testimonial_image_overlay != false) { ?>style="background-color:<?php echo $testimonial_overlay_section_color; } ?>">
  58. <div class="container">
  59. <?php
  60. $home_testimonial_section_title = get_theme_mod('home_testimonial_section_title',__('What our clients say','spicepress'));
  61. $home_testimonial_section_discription = get_theme_mod('home_testimonial_section_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
  62.  
  63. ?>
  64.  
  65. <?php if( $home_testimonial_section_title != '' || $home_testimonial_section_discription != '') { ?>
  66. <!-- Section Title -->
  67. <div class="row">
  68. <div class="col-md-12">
  69. <div class="section-header">
  70. <h1 class="white wow fadeInUp animated" data-wow-delay="0ms" data-wow-duration="500ms">
  71. <?php echo esc_attr($home_testimonial_section_title); ?>
  72. </h1>
  73. <div class="widget-separator"><span></span></div>
  74. <p class="white wow fadeInDown animated">
  75. <?php echo esc_attr($home_testimonial_section_discription); ?>
  76. </p>
  77. </div>
  78. </div>
  79. </div>
  80. <?php }?>
  81. <!-- /Section Title -->
  82. <!-- Testimonial -->
  83. <div class="row">
  84. <div id="testimonial-carousel" class="owl-carousel owl-theme col-md-12">
  85. <?php
  86. $testimonial_options = json_decode($testimonial_options);
  87. if( $testimonial_options!='' )
  88. {
  89. $allowed_html = array(
  90. 'br' => array(),
  91. 'em' => array(),
  92. 'strong' => array(),
  93. 'b' => array(),
  94. 'i' => array(),
  95. );
  96.  
  97. foreach($testimonial_options as $testimonial_iteam){
  98.  
  99. $title = ! empty( $testimonial_iteam->title ) ? apply_filters( 'spicepress_translate_single_string', $testimonial_iteam->title, 'Testimonial section' ) : '';
  100. $test_desc = ! empty( $testimonial_iteam->text ) ? apply_filters( 'spicepress_translate_single_string', $testimonial_iteam->text, 'Testimonial section' ) : '';
  101. $test_link = ! empty( $testimonial_iteam->link ) ? apply_filters( 'spicepress_translate_single_string', $testimonial_iteam->link, 'Testimonial section' ) : '';
  102. $open_new_tab = $testimonial_iteam->open_new_tab;
  103.  
  104. $designation = ! empty( $testimonial_iteam->designation ) ? apply_filters( 'spicepress_translate_single_string', $testimonial_iteam->designation, 'Testimonial section' ) : '';
  105.  
  106. $testimonial_image = ! empty( $testimonial_iteam->image_url ) ? apply_filters( 'spicepress_translate_single_string', $testimonial_iteam->image_url, 'Testimonial section' ) : '';
  107.  
  108.  
  109. ?>
  110. <div class="item">
  111. <div class="media testmonial-area">
  112. <?php $default_arg =array('class' => "img-circle"); ?>
  113. <div class="author-box">
  114. <a href="<?php echo $test_link; ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>>
  115. <img alt="img" class="img-responsive img-circle" src="<?php echo $testimonial_image; ?>" draggable="false">
  116. </a>
  117. </div>
  118. <div class="media-body">
  119. <div class="description-box">
  120. <div class="author-description">
  121. <p><?php echo wp_kses( html_entity_decode( $test_desc ), $allowed_html ); ?></p>
  122. </div>
  123. </div>
  124. <h4 class="name"> <a href="<?php echo $test_link; ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>><?php echo $title; ?> </a> -<span class="designation"><?php echo $designation; ?></span></h4>
  125. </div>
  126. </div>
  127. </div>
  128. <?php } } else
  129. {
  130. $image = array('item7','item8','item9');
  131. $name = array('Alice Culan','Bella Swan','Jenifer Doe');
  132. $desc =array(__('UI Developer','spicepress'), __('Manager','spicepress'), __(
  133. 'Designer','spicepress'));
  134. for($i=0; $i<=2; $i++) { ?>
  135. <div class="item">
  136. <div class="media testmonial-area">
  137. <div class="author-box">
  138. <img src="<?php echo get_template_directory_uri(); ?>/images/<?php echo $image[$i]; ?>.jpg" class="img-circle" alt="img">
  139. </div>
  140. <div class="media-body">
  141. <div class="description-box">
  142. <div class="author-description">
  143. <p><?php echo 'Sed ut Perspiciatis Unde Omnis Iste Sed ut perspiciatis unde omnis iste natu error sit voluptatem accu tium neque fermentum veposu miten a tempor nise. Duis autem vel eum iriure dolor in hendrerit in vulputate velit consequat reprehender in voluptate velit esse cillum duis dolor fugiat nulla pariatur.'; ?>
  144. </p>
  145. </div>
  146. </div>
  147. <h4 class="name"><?php echo $name[$i]; ?> -<span class="designation"><?php echo $desc[$i]; ?></span></h4>
  148. </div>
  149. </div>
  150. </div>
  151.  
  152. <?php } } ?>
  153. </div>
  154. </div>
  155. <!-- /Testimonial -->
  156.  
  157. </div>
  158. </div>
  159. </section>
  160. <!-- /Testimonial Section -->
  161. <div class="clearfix"></div>
  162. <?php } ?>
  163. <?php spicepress_after_testimonial_section_trigger(); ?>
Add Comment
Please, Sign In to add comment