Server IP : 172.67.157.199 / Your IP : 3.138.113.248 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/themes/sammy/elementor/widgets/ |
Upload File : |
<?php use Elementor\Widget_Base; use Elementor\Controls_Manager; use \Elementor\Group_Control_Typography; use Elementor\Utils; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class Podover_Elementor_Testimonial extends Widget_Base { public function get_name() { return 'podover_elementor_testimonial'; } public function get_title() { return esc_html__( 'Ova Testimonial', 'podover' ); } public function get_icon() { return 'eicon-testimonial'; } public function get_categories() { return [ 'podover' ]; } public function get_script_depends() { // Carousel wp_enqueue_style( 'slick-carousel', get_template_directory_uri().'/assets/libs/slick/slick.css' ); wp_enqueue_style( 'slick-carousel-theme', get_template_directory_uri().'/assets/libs/slick/slick-theme.css' ); wp_enqueue_script( 'slick-carousel', get_template_directory_uri().'/assets/libs/slick/slick.min.js', array('jquery'), false, true ); return ['podover-elementor-testimonial']; } // Add Your Controll In This Function protected function register_controls() { $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Content', 'podover' ), ] ); $this->add_control( 'sub_title', [ 'label' => esc_html__( 'Sub Title', 'podover' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Our Testimonials', 'podover' ), ] ); $this->add_control( 'title', [ 'label' => esc_html__( 'Title', 'podover' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( "Reviews from users", 'podover' ), ] ); $this->add_control( 'class_icon', [ 'label' => esc_html__( 'Icon Quote', 'podover' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'value' => 'flaticon flaticon-quotation-mark', 'library' => 'all', ], ] ); // Add Class control $repeater = new \Elementor\Repeater(); $repeater->add_control( 'name_author', [ 'label' => esc_html__( 'Author Name', 'podover' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $repeater->add_control( 'job', [ 'label' => esc_html__( 'Job', 'podover' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $repeater->add_control( 'image_author', [ 'label' => esc_html__( 'Author Image', 'podover' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $repeater->add_control( 'testimonial', [ 'label' => esc_html__( 'Testimonial ', 'podover' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => esc_html__( '"Sed ullamcorper morbi tincidunt or massa eget egestas purus. Non nisi est sit amet facilisis magna etiam."', 'podover' ), ] ); $repeater->add_control( 'hr_rate_start', [ 'type' => \Elementor\Controls_Manager::DIVIDER, 'separator' => 'before', ] ); $repeater->add_control( 'rating', [ 'label' => esc_html__( 'Rating', 'podover' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'max' => 10, 'step' => 0.1, 'default' => 5, 'dynamic' => [ 'active' => true, ], ] ); $repeater->add_control( 'star_style', [ 'label' => esc_html__( 'Icon', 'podover' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'star_fontawesome' => 'Font Awesome', 'star_unicode' => 'Unicode', ], 'default' => 'star_fontawesome', 'render_type' => 'template', 'prefix_class' => 'elementor--star-style-', 'separator' => 'before', ] ); $repeater->add_control( 'unmarked_star_style', [ 'label' => esc_html__( 'Unmarked Style', 'podover' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'solid' => [ 'title' => esc_html__( 'Solid', 'podover' ), 'icon' => 'eicon-star', ], 'outline' => [ 'title' => esc_html__( 'Outline', 'podover' ), 'icon' => 'eicon-star-o', ], ], 'default' => 'solid', ] ); $this->add_control( 'tab_item', [ 'label' => esc_html__( 'Items Testimonial', 'podover' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'name_author' => esc_html__('Shirley Smith', 'podover'), 'job' => esc_html__('Marketing head', 'podover'), 'testimonial' => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus et magnis dis parturient montes.', 'podover'), ], [ 'name_author' => esc_html__('Aleesha Smith', 'podover'), 'job' => esc_html__('Marketing head', 'podover'), 'testimonial' => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus et magnis dis parturient montes.', 'podover'), ], [ 'name_author' => esc_html__('Mike Hardson', 'podover'), 'job' => esc_html__('Developer', 'podover'), 'testimonial' => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Cum sociis natoque penatibus et magnis dis parturient montes.', 'podover'), ], ], 'title_field' => '{{{ name_author }}}', ] ); $this->end_controls_section(); /***************************************************************** START SECTION ADDITIONAL ******************************************************************/ /***************************************************************** START SECTION ADDITIONAL ******************************************************************/ $this->start_controls_section( 'section_additional_options', [ 'label' => esc_html__( 'Additional Options', 'podover' ), ] ); $this->add_control( 'infinite', [ 'label' => esc_html__( 'Infinite Loop', 'podover' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'podover' ), 'no' => esc_html__( 'No', 'podover' ), ], 'frontend_available' => true, ] ); $this->add_control( 'autoplay', [ 'label' => esc_html__( 'Autoplay', 'podover' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'options' => [ 'yes' => esc_html__( 'Yes', 'podover' ), 'no' => esc_html__( 'No', 'podover' ), ], 'frontend_available' => true, ] ); $this->add_control( 'autoplay_speed', [ 'label' => esc_html__( 'Autoplay Speed', 'podover' ), 'type' => Controls_Manager::NUMBER, 'default' => 3000, 'step' => 500, 'condition' => [ 'autoplay' => 'yes', ], 'frontend_available' => true, ] ); $this->add_control( 'smartspeed', [ 'label' => esc_html__( 'Smart Speed', 'podover' ), 'type' => Controls_Manager::NUMBER, 'default' => 300, ] ); $this->end_controls_section(); /**************************** END SECTION ADDITIONAL *********************/ /* Begin Sub Title Style */ $this->start_controls_section( 'section_sub_title_style', [ 'label' => esc_html__( 'Sub Title', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'sub_title_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .info .sub-title', ] ); $this->add_control( 'sub_title_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .info .sub-title' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'sub_title_before_color', [ 'label' => esc_html__( 'Before Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .info .sub-title .underlined' => 'background-color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'sub_title_padding', [ 'label' => esc_html__( 'Padding', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .info .sub-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* End Sub Title Style */ /* Begin Title Style */ $this->start_controls_section( 'section_title_style', [ 'label' => esc_html__( 'Title', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .info .title', ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .info .title' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'title_padding', [ 'label' => esc_html__( 'Padding', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .info .title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* End Title Style */ /* Begin icon quote Style */ $this->start_controls_section( 'icon_style', [ 'label' => esc_html__( 'Icon', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'size_icon', [ 'label' => esc_html__( 'Size', 'podover' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 60, 'step' => 1, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .icon i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'icon_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .icon i' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'background_template5_icon', 'label' => esc_html__( 'Background', 'podover' ), 'types' => [ 'classic', 'gradient',], 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .icon', ] ); $this->add_responsive_control( 'icon_border_radius', [ 'label' => esc_html__( 'Border Radius', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_padding', [ 'label' => esc_html__( 'Padding', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* End icon quote style */ /************* SECTION NAME JOB AUTHOR. *******************/ $this->start_controls_section( 'section_author_name_job', [ 'label' => esc_html__( 'Author Name - Job', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'name_job_padding', [ 'label' => esc_html__( 'Padding', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .info .name-job' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'author_name_heading', [ 'label' => esc_html__( 'Author Name', 'podover' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before' ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'author_name_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .info .name-job .name', ] ); $this->add_control( 'author_name_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ ' {{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .info .name-job .name' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'job_heading', [ 'label' => esc_html__( 'Job', 'podover' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before' ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'job_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .info .name-job .job', ] ); $this->add_control( 'job_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ ' {{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .info .name-job .job' => 'color : {{VALUE}};', ], ] ); $this->end_controls_section(); ############### end section name job author ############### /************* SECTION content testimonial *******************/ $this->start_controls_section( 'section_content_testimonial', [ 'label' => esc_html__( 'Content Testimonial', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_testimonial_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info p.ova-evaluate', ] ); $this->add_control( 'content_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info p.ova-evaluate' => 'color : {{VALUE}};', ], ] ); $this->add_responsive_control( 'content_padding', [ 'label' => esc_html__( 'Padding', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info p.ova-evaluate' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); ############### end section content testimonial ############### /* Begin Nav Arrow Style */ $this->start_controls_section( 'nav_style', [ 'label' => esc_html__( 'Arrows Control', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'size_nav_icon', [ 'label' => esc_html__( 'Icon Size', 'podover' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 30, 'step' => 1, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next:before, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev:before' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'arrow_padding', [ 'label' => esc_html__( 'Padding', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'arrow_border_radius', [ 'label' => esc_html__( 'Border Radius', 'podover' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->start_controls_tabs( 'tabs_nav_style' ); $this->start_controls_tab( 'tab_nav_normal', [ 'label' => esc_html__( 'Normal', 'podover' ), ] ); $this->add_control( 'color_nav_icon', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next:before, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev:before' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'color_nav_border', [ 'label' => esc_html__( 'Color Border', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev' => 'border-color : {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_icon_hover', [ 'label' => esc_html__( 'Hover', 'podover' ), ] ); $this->add_control( 'color_nav_icon_hover', [ 'label' => esc_html__( 'Color Hover', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next:hover:before, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev:hover:before' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'color_nav_border_hover', [ 'label' => esc_html__( 'Color Border Hover', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .slick-next:hover, {{WRAPPER}} .ova-testimonial .slide-testimonials .slick-prev:hover' => 'border-color : {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /* End Nav Arrow Style */ // Star rating tab style $this->start_controls_section( 'section_stars_style', [ 'label' => esc_html__( 'Rating Star', 'podover' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'icon_size', [ 'label' => esc_html__( 'Size', 'podover' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .elementor-star-rating' => 'font-size: {{SIZE}}{{UNIT}}', ], ] ); $this->add_responsive_control( 'icon_space', [ 'label' => esc_html__( 'Spacing', 'podover' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, ], ], 'selectors' => [ 'body:not(.rtl) {{WRAPPER}} .elementor-star-rating i:not(:last-of-type)' => 'margin-right: {{SIZE}}{{UNIT}}', 'body.rtl {{WRAPPER}} .elementor-star-rating i:not(:last-of-type)' => 'margin-left: {{SIZE}}{{UNIT}}', ], ] ); $this->add_control( 'stars_color', [ 'label' => esc_html__( 'Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .client-info .info .ova-rating .elementor-star-rating i::before' => 'color: {{VALUE}}', ], 'separator' => 'before', ] ); $this->add_control( 'stars_unmarked_color', [ 'label' => esc_html__( 'Unmarked Color', 'podover' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .elementor-star-rating i' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); // End Star rating tab style } //start rating // protected function get_rating($rating) { $settings = $this->get_settings(); $rating_scale = 5; return [ $rating, $rating_scale ]; } protected function render_stars( $icon, $rating ) { $rating_data = $this->get_rating($rating); $rating = (float) $rating_data[0]; $floored_rating = floor( $rating ); $stars_html = ''; for ( $stars = 1.0; $stars <= $rating_data[1]; $stars++ ) { if ( $stars <= $floored_rating ) { $stars_html .= '<i class="elementor-star-full">' . $icon . '</i>'; } elseif ( $floored_rating + 1 === $stars && $rating !== $floored_rating ) { $stars_html .= '<i class="elementor-star-' . ( $rating - $floored_rating ) * 10 . '">' . $icon . '</i>'; } else { $stars_html .= '<i class="elementor-star-empty">' . $icon . '</i>'; } } return $stars_html; } //end start rating// // Render Template Here protected function render() { $settings = $this->get_settings(); $tab_item = $settings['tab_item']; $title = $settings['title']; $sub_title = $settings['sub_title']; $class_icon = $settings['class_icon']['value']; // carousel data option $data_options['loop'] = $settings['infinite'] === 'yes' ? true : false; $data_options['autoplay'] = $settings['autoplay'] === 'yes' ? true : false; $data_options['autoplay_speed'] = $settings['autoplay_speed']; $data_options['smartSpeed'] = $settings['smartspeed']; $data_options['rtl'] = is_rtl() ? true: false; ?> <div class="ova-testimonial"> <div class="info"> <?php if ( $sub_title ): ?> <h2 class="sub-title"> <?php echo esc_html( $sub_title ); ?> </h2> <?php endif; ?> <?php if ( $title ): ?> <h3 class="title"> <?php echo esc_html( $title ); ?> </h3> <?php endif; ?> </div> <div class="slide-for"> <?php if(!empty($tab_item)) : foreach ($tab_item as $k => $item) : if ($k >= 3) break; ?> <?php $alt = isset($item['name_author']) && $item['name_author'] ? $item['name_author'] : esc_html__( 'testimonial','podover' ); ?> <div class="small-img"> <img src="<?php echo esc_attr($item['image_author']['url']); ?>" alt="<?php echo esc_attr( $alt ); ?>"> </div> <?php endforeach; endif; ?> </div> <div class="slide-testimonials" data-options="<?php echo esc_attr(json_encode($data_options)) ; ?>"> <?php if(!empty($tab_item)) : foreach ($tab_item as $item) : ?> <div class="item"> <div class="client-info"> <div class="client"> <?php if( $item['image_author'] != '' ) { ?> <?php $alt = isset($item['name_author']) && $item['name_author'] ? $item['name_author'] : esc_html__( 'testimonial','podover' ); ?> <img src="<?php echo esc_attr($item['image_author']['url']); ?>" alt="<?php echo esc_attr( $alt ); ?>" > <?php } ?> </div> <div class="info"> <?php if (!empty( $class_icon )): ?> <div class="icon"> <i class="<?php echo esc_attr( $class_icon ); ?>"></i> </div> <?php endif;?> <?php if( $item['testimonial'] != '' ) : ?> <p class="ova-evaluate"> <?php echo esc_html($item['testimonial']) ; ?> </p> <?php endif; ?> <?php $icon = ''; $rating_data = $this->get_rating($item['rating']); $textual_rating = $rating_data[0] . '/' . $rating_data[1]; $rating = (float) $item['rating']; $unmarked_star_style = $item['unmarked_star_style']; $star_style = $item['star_style']; if ( 'star_fontawesome' === $star_style ) { if ( 'outline' === $unmarked_star_style ) { $icon = ''; } } elseif ( 'star_unicode' === $star_style ) { $icon = '★'; if ( 'outline' === $unmarked_star_style ) { $icon = '☆'; } } $stars_element = '<div class="elementor-star-rating" title="'.$textual_rating.'">' . $this->render_stars( $icon, $item['rating'] ) . ' </div>'; ?> <?php if($rating != 0) : ?> <div class="ova-rating <?php echo esc_html( $star_style ); ?>"> <?php print_r ( $stars_element ); ?> </div> <?php endif ?> <?php ?> <div class="name-job"> <?php if( $item['name_author'] != '' ) { ?> <p class="name second_font"> <?php echo esc_html($item['name_author']) ; ?> </p> <?php } ?> <?php if( $item['job'] != '' ) { ?> <p class="job"> <?php echo esc_html($item['job']) ; ?> </p> <?php } ?> </div> </div><!-- end info --> </div> </div> <?php endforeach; endif; ?> </div> </div> <?php } } $widgets_manager->register( new Podover_Elementor_Testimonial() );