Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use \Elementor\Widget_Base;
- use \Elementor\Controls_Manager;
- use \Elementor\Group_Control_Typography;
- use \Elementor\Utils;
- use \Elementor\Repeater;
- use \Elementor\Group_Control_Border;
- /**
- *
- * Testimonials Widget .
- *
- */
- class Travil_Testimonials extends Widget_Base {
- public function get_name() {
- return 'traviltestimonials';
- }
- public function get_title() {
- return __( 'Travil Testimonials', 'travil' );
- }
- public function get_icon() {
- return 'vt-icon';
- }
- public function get_categories() {
- return [ 'travil' ];
- }
- protected function register_controls() {
- $this->start_controls_section(
- 'features_section',
- [
- 'label' => __( 'Testimonials', 'travil' ),
- 'tab' => Controls_Manager::TAB_CONTENT,
- ]
- );
- $this->add_control(
- 'testimonials_style',
- [
- 'label' => __( 'Testimonial Style', 'travil' ),
- 'type' => Controls_Manager::SELECT,
- 'default' => '1',
- 'options' => [
- '1' => __( 'Style One', 'travil' ),
- '2' => __( 'Style Two', 'travil' ),
- '3' => __( 'Style Three', 'travil' ),
- ],
- ]
- );
- $this->add_control(
- 'enable_heading',
- [
- 'label' => __( 'Show SSection Header?', 'travil' ),
- 'type' => Controls_Manager::SWITCHER,
- 'label_on' => __( 'Show', 'travil' ),
- 'label_off' => __( 'Hide', 'travil' ),
- 'return_value' => 'yes',
- 'default' => 'yes',
- ]
- );
- $this->add_control(
- 'subtitle',
- [
- 'label' => __( 'Subtitle', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'rows' => 2,
- 'default' => __( 'Grow business by', 'travil' ),
- 'condition' => [ 'enable_heading' => 'yes' ],
- ]
- );
- $this->add_control(
- 'title',
- [
- 'label' => __( 'Title', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'rows' => 2,
- 'default' => __( 'Award winning digital marketing agency ', 'travil' ),
- 'condition' => [ 'enable_heading' => 'yes' ],
- ]
- );
- $this->add_control(
- 'desc',
- [
- 'label' => __( 'Description', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'rows' => 3,
- 'default' => __( 'Award winning digital marketing agency ', 'travil' ),
- 'condition' => [ 'enable_heading' => 'yes' ],
- ]
- );
- $this->add_control(
- 'shape',
- [
- 'label' => __( 'Ratting Image', 'travil' ),
- 'type' => Controls_Manager::MEDIA,
- 'dynamic' => [
- 'active' => true,
- ],
- 'default' => [
- 'url' => Utils::get_placeholder_image_src(),
- ],
- 'condition' => [ 'testimonials_style' => ['2'],'enable_heading' => 'yes' ],
- ]
- );
- $this->add_control(
- 'ratting_text',
- [
- 'label' => __( 'Ratting Text', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'rows' => 4,
- 'default' => __( 'Award winning digital marketing agency ', 'travil' ),
- 'condition' => [ 'testimonials_style' => ['2'],'enable_heading' => 'yes' ],
- ]
- );
- //----------------------------feddback repeter start--------------------------------//
- $repeater = new Repeater();
- $repeater->add_control(
- 'name', [
- 'label' => __( 'Name', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'rows' => 2,
- 'default' => __( 'Rubaida Kanom' , 'travil' ),
- 'label_block' => true,
- ]
- );
- $repeater->add_control(
- 'from', [
- 'label' => __( 'From', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'rows' => 2,
- 'default' => __( 'from New York, USA' , 'travil' ),
- 'label_block' => true,
- ]
- );
- $repeater->add_control(
- 'feedback', [
- 'label' => __( 'Feedback', 'travil' ),
- 'type' => Controls_Manager::TEXTAREA,
- 'default' => __( 'Rubaida Kanom' , 'travil' ),
- 'label_block' => true,
- ]
- );
- $repeater->add_control(
- 'client_rating',
- [
- 'label' => __( 'Client Rating', 'travil' ),
- 'type' => Controls_Manager::SELECT,
- 'default' => '5',
- 'options' => [
- 'one' => __( 'One Star', 'travil' ),
- 'two' => __( 'Two Star', 'travil' ),
- 'three' => __( 'Three Star', 'travil' ),
- 'four' => __( 'Four Star', 'travil' ),
- 'five' => __( 'Five Star', 'travil' ),
- ],
- ]
- );
- $repeater->add_control(
- 'img',
- [
- 'label' => __( 'Image', 'travil' ),
- 'type' => Controls_Manager::MEDIA,
- 'dynamic' => [
- 'active' => true,
- ],
- 'default' => [
- 'url' => Utils::get_placeholder_image_src(),
- ],
- ]
- );
- $this->add_control(
- 'slides',
- [
- 'label' => __( 'Slides', 'travil' ),
- 'type' => Controls_Manager::REPEATER,
- 'fields' => $repeater->get_controls(),
- 'default' => [
- [
- 'name' => __( 'Rubaida Kanom', 'travil' ),
- ],
- ],
- 'title_field' => '{{{ name }}}',
- ]
- );
- $this->add_control(
- 'quote',
- [
- 'label' => __( 'Quote Image', 'travil' ),
- 'type' => Controls_Manager::MEDIA,
- 'dynamic' => [
- 'active' => true,
- ],
- 'default' => [
- 'url' => Utils::get_placeholder_image_src(),
- ],
- ]
- );
- $this->add_control(
- 'thumb',
- [
- 'label' => __( 'Thumb Image', 'travil' ),
- 'type' => Controls_Manager::MEDIA,
- 'dynamic' => [
- 'active' => true,
- ],
- 'default' => [
- 'url' => Utils::get_placeholder_image_src(),
- ],
- 'condition' => [ 'testimonials_style' => ['2'] ],
- ]
- );
- $this->end_controls_section();
- //---------------------------headingggg---------------------------///
- //---------------------------------------Title Style---------------------------------------//
- $this->start_controls_section(
- 'title_style',
- [
- 'label' => __( 'Section Title Style', 'travil' ),
- 'tab' => Controls_Manager::TAB_STYLE,
- ]
- );
- $this->add_control(
- 'title_color',
- [
- 'label' => __( 'Title Color', 'travil' ),
- 'type' => Controls_Manager::COLOR,
- 'selectors' => [
- '{{WRAPPER}} .section-title h2' => 'color: {{VALUE}}',
- ],
- ]
- );
- $this->add_group_control(
- Group_Control_Typography::get_type(),
- [
- 'name' => 'title_typography',
- 'label' => __( 'Title Typography', 'travil' ),
- 'selector' => '{{WRAPPER}} .section-title h2',
- ]
- );
- $this->add_responsive_control(
- 'title_margin',
- [
- 'label' => __( 'Title Margin', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .section-title h2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ]
- ]
- );
- $this->add_responsive_control(
- 'title_padding',
- [
- 'label' => __( 'Title Padding', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .section-title h2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ]
- ]
- );
- $this->end_controls_section();
- //---------------------------------------Title Style---------------------------------------//
- $this->start_controls_section(
- 'subtitle_style',
- [
- 'label' => __( 'Section Subtitle Style', 'travil' ),
- 'tab' => Controls_Manager::TAB_STYLE,
- ]
- );
- $this->add_control(
- 'subtitle_color',
- [
- 'label' => __( 'Color', 'travil' ),
- 'type' => Controls_Manager::COLOR,
- 'selectors' => [
- '{{WRAPPER}} .section-title span' => 'color: {{VALUE}}',
- ],
- ]
- );
- $this->add_group_control(
- Group_Control_Typography::get_type(),
- [
- 'name' => 'subtitle_typography',
- 'label' => __( 'Typography', 'travil' ),
- 'selector' => '{{WRAPPER}} .section-title span',
- ]
- );
- $this->add_responsive_control(
- 'subtitle_margin',
- [
- 'label' => __( 'Margin', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .section-title span' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ]
- ]
- );
- $this->add_responsive_control(
- 'subtitle_padding',
- [
- 'label' => __( 'Padding', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .section-title span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ]
- ]
- );
- $this->end_controls_section();
- //---------------------------------------Desc Style---------------------------------------//
- $this->start_controls_section(
- 'desc_style',
- [
- 'label' => __( 'Section Description Style', 'travil' ),
- 'tab' => Controls_Manager::TAB_STYLE,
- ]
- );
- $this->add_control(
- 'desc_color',
- [
- 'label' => __( 'Color', 'travil' ),
- 'type' => Controls_Manager::COLOR,
- 'selectors' => [
- '{{WRAPPER}} .section-title p' => 'color: {{VALUE}}',
- ],
- ]
- );
- $this->add_group_control(
- Group_Control_Typography::get_type(),
- [
- 'name' => 'desc_typography',
- 'label' => __( 'Typography', 'travil' ),
- 'selector' => '{{WRAPPER}} .section-title p',
- ]
- );
- $this->add_responsive_control(
- 'desc_margin',
- [
- 'label' => __( 'Margin', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .section-title p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ]
- ]
- );
- $this->add_responsive_control(
- 'desc_padding',
- [
- 'label' => __( 'Padding', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .section-title p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ]
- ]
- );
- $this->end_controls_section();
- /*-----------------------------------------Feedback styling------------------------------------*/
- $this->start_controls_section(
- 'overview_con_styling',
- [
- 'label' => __( 'Testimonials Styling', 'travil' ),
- 'tab' => Controls_Manager::TAB_STYLE,
- ]
- );
- $this->start_controls_tabs(
- 'style_tabs2'
- );
- $this->start_controls_tab(
- 'style_normal_tab2',
- [
- 'label' => esc_html__( 'Name', 'travil' ),
- ]
- );
- $this->add_control(
- 'overview_title_color',
- [
- 'label' => __( 'Color', 'travil' ),
- 'type' => Controls_Manager::COLOR,
- 'selectors' => [
- '{{WRAPPER}} h4' => 'color: {{VALUE}}!important;',
- ],
- ]
- );
- $this->add_group_control(
- Group_Control_Typography::get_type(),
- [
- 'name' => 'overview_title_typography',
- 'label' => __( 'Typography', 'travil' ),
- 'selector' => '{{WRAPPER}} h4',
- ]
- );
- $this->add_responsive_control(
- 'overview_title_margin',
- [
- 'label' => __( 'Margin', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} h4' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ],
- ]
- );
- $this->add_responsive_control(
- 'overview_title_padding',
- [
- 'label' => __( 'Padding', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} h4' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ],
- ]
- );
- $this->end_controls_tab();
- //--------------------secound--------------------//
- $this->start_controls_tab(
- 'style_hover_tab2',
- [
- 'label' => esc_html__( 'From', 'travil' ),
- ]
- );
- $this->add_control(
- 'overview_content_color',
- [
- 'label' => __( 'Color', 'travil' ),
- 'type' => Controls_Manager::COLOR,
- 'selectors' => [
- '{{WRAPPER}} .from__class' => 'color: {{VALUE}}!important;',
- ],
- ]
- );
- $this->add_group_control(
- Group_Control_Typography::get_type(),
- [
- 'name' => 'overview_content_typography',
- 'label' => __( 'Typography', 'travil' ),
- 'selector' => '{{WRAPPER}} .from__class',
- ]
- );
- $this->add_responsive_control(
- 'overview_content_margin',
- [
- 'label' => __( 'Margin', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .from__class' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ],
- ]
- );
- $this->add_responsive_control(
- 'overview_content_padding',
- [
- 'label' => __( 'Padding', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} .from__class' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ],
- ]
- );
- $this->end_controls_tab();
- //--------------------three--------------------//
- $this->start_controls_tab(
- 'style_hover_tab3',
- [
- 'label' => esc_html__( 'Feedback', 'travil' ),
- ]
- );
- $this->add_control(
- 'counter_color',
- [
- 'label' => __( 'Color', 'travil' ),
- 'type' => Controls_Manager::COLOR,
- 'selectors' => [
- '{{WRAPPER}} h3' => 'color: {{VALUE}}!important;',
- ],
- ]
- );
- $this->add_group_control(
- Group_Control_Typography::get_type(),
- [
- 'name' => 'counter_typography',
- 'label' => __( 'Typography', 'travil' ),
- 'selector' => '{{WRAPPER}} h3',
- ]
- );
- $this->add_responsive_control(
- 'counter_margin',
- [
- 'label' => __( 'Margin', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ],
- ]
- );
- $this->add_responsive_control(
- 'counter_padding',
- [
- 'label' => __( 'Padding', 'travil' ),
- 'type' => Controls_Manager::DIMENSIONS,
- 'size_units' => [ 'px', '%', 'em' ],
- 'selectors' => [
- '{{WRAPPER}} h3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
- ],
- ]
- );
- $this->end_controls_tab();
- $this->end_controls_tabs();
- $this->end_controls_section();
- }
- protected function render() {
- $settings = $this->get_settings_for_display();
- echo '<!------------------------------- Testimonials Area start ------------------------------->';
- if($settings['testimonials_style'] == 1) {
- echo '<section class="testimonial-section-4">';
- echo '<div class="container">';
- if ( $settings['enable_heading'] == 'yes' ){
- echo '<div class="section-title-area lg-center">';
- echo '<div class="section-title">';
- echo '<span class="wow fadeInUp">' . esc_html( $settings['subtitle'] ) . '</span>';
- echo '<h2 class="wow fadeInUp" data-wow-delay=".3s">' . wp_kses_post( $settings['title'] ) . '</h2>';
- echo '</div>';
- echo '<p class="wow fadeInUp" data-wow-delay=".5">' . wp_kses_post( $settings['desc'] ) . '</p>';
- echo '</div>';
- }
- echo '<div class="swiper testimonial-slider-4">';
- echo '<div class="swiper-wrapper">';
- foreach( $settings['slides'] as $single_data ){
- echo ' <div class="swiper-slide">';
- echo '<div class="testimonial-box-items-4">';
- if( ! empty( $single_data['img']['url'] ) ){
- echo '<div class="testi-img">';
- echo travil_img_tag( array(
- 'url' => esc_url( $single_data['img']['url'] ),
- ) );
- echo '</div>';
- }
- echo '<div class="star">';
- if( $single_data['client_rating'] == 'one' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'two' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'three' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'four' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }else{
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- }
- echo '</div>';
- if( ! empty( $settings['quote']['url'] ) ){
- echo '<div class="icon">';
- echo travil_img_tag( array(
- 'url' => esc_url( $settings['quote']['url'] ),
- ) );
- echo '</div>';
- }
- if(!empty($single_data['feedback'])){
- echo '<h3>'.wp_kses_post( $single_data['feedback'] ).'</h3>';
- }
- echo '<div class="client-info">';
- if(!empty($single_data['name'])){
- echo '<h4>'.wp_kses_post( $single_data['name'] ).'</h4>';
- }
- if(!empty($single_data['from'])){
- echo ' <span class="from__class">'.esc_html( $single_data['from'] ).'</span>';
- }
- echo '</div>';
- echo '</div>';
- echo '</div>';
- }
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '</section>';
- }elseif($settings['testimonials_style'] == 2 ) {
- echo '<section class="testimonial-section-5 fix">';
- echo '<div class="container">';
- echo '<div class="section-title-area">';
- echo '<div class="section-title style-2">';
- echo '<span class="wow fadeInUp">' . esc_html( $settings['subtitle'] ) . '</span>';
- echo '<h2 class="wow fadeInUp" data-wow-delay=".3s">' . wp_kses_post( $settings['title'] ) . '</h2>';
- echo '</div>';
- echo '<div class="test-left-top">';
- if( ! empty( $settings['shape']['url'] ) ){
- echo travil_img_tag( array(
- 'url' => esc_url( $settings['shape']['url'] ),
- ) );
- }
- if(!empty($settings['ratting_text'])){
- echo '<div class="content">';
- echo wp_kses_post( $settings['ratting_text'] );
- echo '</div>';
- }
- echo '</div>';
- echo '</div>';
- echo '<div class="row align-items-center">';
- echo '<div class="col-lg-6">';
- echo '<div class="testimonail-image-5">';
- if( ! empty( $settings['thumb']['url'] ) ){
- echo travil_img_tag( array(
- 'url' => esc_url( $settings['thumb']['url'] ),
- ) );
- }
- echo '</div>';
- echo ' </div>';
- echo '<div class="col-lg-6">';
- echo '<div class="swiper testimonial-slider-5">';
- echo '<div class="swiper-wrapper">';
- foreach( $settings['slides'] as $single_data ){
- echo ' <div class="swiper-slide">';
- echo '<div class="testimonial-box-items-4 box-shadow-none">';
- if( ! empty( $single_data['img']['url'] ) ){
- echo '<div class="testi-img">';
- echo travil_img_tag( array(
- 'url' => esc_url( $single_data['img']['url'] ),
- ) );
- echo '</div>';
- }
- echo '<div class="star">';
- if( $single_data['client_rating'] == 'one' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'two' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'three' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'four' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }else{
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- }
- echo '</div>';
- if( ! empty( $settings['quote']['url'] ) ){
- echo '<div class="icon">';
- echo travil_img_tag( array(
- 'url' => esc_url( $settings['quote']['url'] ),
- ) );
- echo '</div>';
- }
- if(!empty($single_data['feedback'])){
- echo '<h3>'.wp_kses_post( $single_data['feedback'] ).'</h3>';
- }
- echo '<div class="client-info">';
- if(!empty($single_data['name'])){
- echo '<h4>'.wp_kses_post( $single_data['name'] ).'</h4>';
- }
- if(!empty($single_data['from'])){
- echo ' <span class="from__class">'.esc_html( $single_data['from'] ).'</span>';
- }
- echo '</div>';
- echo '</div>';
- echo '</div>';
- }
- echo '</div>';
- echo '<div class="swiper-dot4 mt-4 text-center">';
- echo '<div class="dot11"></div>';
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '</section>';
- }else{
- echo '<section class="testimonial-section-3 section-padding pt-0">';
- echo '<div class="array-button style-2">';
- echo '<button class="array-prev"><i class="far fa-long-arrow-left"></i></button>';
- echo '<button class="array-next"><i class="far fa-long-arrow-right"></i></button>';
- echo '</div>';
- echo '<div class="container">';
- echo '<div class="section-title text-center">';
- echo '<span class="wow fadeInUp">' . esc_html( $settings['subtitle'] ) . '</span>';
- echo '<h2 class="wow fadeInUp" data-wow-delay=".3s">' . wp_kses_post( $settings['title'] ) . '</h2>';
- echo '</div>';
- echo '<div class="swiper testimonial-slider-3">';
- echo '<div class="swiper-wrapper">';
- foreach( $settings['slides'] as $single_data ){
- echo '<div class="swiper-slide">';
- echo '<div class="testimonial-box-items2">';
- echo '<div class="star">';
- if( $single_data['client_rating'] == 'one' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'two' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'three' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }elseif( $single_data['client_rating'] == 'four' ){
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="far fa-star"></i>';
- }else{
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- echo '<i class="fas fa-star"></i>';
- }
- echo '</div>';
- if(!empty($single_data['feedback'])){
- echo '<h3>'.wp_kses_post( $single_data['feedback'] ).'</h3>';
- }
- echo '<div class="client-info-items">';
- echo '<div class="client-info">';
- if( ! empty( $single_data['img']['url'] ) ){
- echo '<div class="client-img">';
- echo travil_img_tag( array(
- 'url' => esc_url( $single_data['img']['url'] ),
- ) );
- echo '</div>';
- }
- echo '<div class="client-content">';
- if(!empty($single_data['name'])){
- echo '<h4>'.wp_kses_post( $single_data['name'] ).'</h4>';
- }
- if(!empty($single_data['from'])){
- echo ' <span class="from__class">'.esc_html( $single_data['from'] ).'</span>';
- }
- echo '</div>';
- echo ' </div>';
- if( ! empty( $settings['quote']['url'] ) ){
- echo '<div class="icon">';
- echo travil_img_tag( array(
- 'url' => esc_url( $settings['quote']['url'] ),
- ) );
- echo '</div>';
- }
- echo '</div>';
- echo '</div>';
- echo '</div>';
- }
- echo '</div> ';
- echo '</div>';
- echo '</div>';
- echo '</section>';
- }
- echo '<!--------------------------------- Testimonials Area end --------------------------------->';
- }
- }
Add Comment
Please, Sign In to add comment