🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-14 12:32:52 | PHP 8.1.34
📂
/ (Root)
/
home
/
therahul
/
ramailobhela.com
/
wp-content
/
themes
/
nighty
/
elementor
/
widgets
📍 /home/therahul/ramailobhela.com/wp-content/themes/nighty/elementor/widgets
🔄 Refresh
✏️
Editing: testimonial.php
Writable
<?php use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Utils; use Elementor\Group_Control_Border; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class Nighty_Elementor_Testimonial extends Widget_Base { public function get_name() { return 'nighty_elementor_testimonial'; } public function get_title() { return esc_html__( 'Ova Testimonial', 'nighty' ); } public function get_icon() { return 'eicon-testimonial-carousel'; } public function get_categories() { return [ 'nighty' ]; } public function get_script_depends() { return [ 'nighty-elementor-testimonial' ]; } // Add Your Controll In This Function protected function register_controls() { $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Content', 'nighty' ), ] ); $this->add_control( 'quote', [ 'label' => esc_html__( 'Quote', 'nighty' ), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'ovaicon ovaicon-right-quote', 'library' => 'ovaicon', ], ] ); $repeater = new \Elementor\Repeater(); $repeater->add_control( 'image_author', [ 'label' => esc_html__( 'Author Image', 'nighty' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $repeater->add_control( 'name_author', [ 'label' => esc_html__( 'Author Name', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $repeater->add_control( 'job', [ 'label' => esc_html__( 'Job', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $repeater->add_control( 'company', [ 'label' => esc_html__( 'Company', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, ] ); $repeater->add_control( 'testimonial', [ 'label' => esc_html__( 'Testimonial ', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => esc_html__( 'The most advanced revenue than thi. I like Level more and more each da easier. It really saves me time and ef business has been lacking.', 'nighty' ), ] ); $this->add_control( 'tab_item', [ 'label' => esc_html__( 'Items Testimonial', 'nighty' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'name_author' => esc_html__('Cameron Williamson', 'nighty'), 'job' => esc_html__('Ceo At', 'nighty'), 'company' => esc_html__('Google', 'nighty'), ], [ 'name_author' => esc_html__('Henry K. Melendez', 'nighty'), 'job' => esc_html__('Ceo At', 'nighty'), 'company' => esc_html__('Google', 'nighty'), ], [ 'name_author' => esc_html__('Somalia D. Silva', 'nighty'), 'job' => esc_html__('Ceo At', 'nighty'), 'company' => esc_html__('Google', 'nighty'), ], [ 'name_author' => esc_html__('Pacific D. Lee', 'nighty'), 'job' => esc_html__('Ceo At', 'nighty'), 'company' => esc_html__('Google', 'nighty'), ], ], 'title_field' => '{{{ name_author }}}', ] ); $this->end_controls_section(); /***************** END SECTION CONTENT ******************/ /****************** START SECTION ADDITIONAL*************/ $this->start_controls_section( 'section_additional_options', [ 'label' => esc_html__( 'Additional Options', 'nighty' ), ] ); $this->add_control( 'margin_items', [ 'label' => esc_html__( 'Margin Right Items', 'nighty' ), 'type' => Controls_Manager::NUMBER, 'default' => 60, ] ); $this->add_control( 'item_number', [ 'label' => esc_html__( 'Item Number', 'nighty' ), 'type' => Controls_Manager::NUMBER, 'description' => esc_html__( 'Number Item', 'nighty' ), 'default' => 3, ] ); $this->add_control( 'slides_to_scroll', [ 'label' => esc_html__( 'Slides to Scroll', 'nighty' ), 'type' => Controls_Manager::NUMBER, 'description' => esc_html__( 'Set how many slides are scrolled per swipe.', 'nighty' ), 'default' => 1, ] ); $this->add_control( 'center_mode', [ 'label' => esc_html__( 'Center Mode', 'nighty' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'nighty' ), 'no' => esc_html__( 'No', 'nighty' ), ], 'frontend_available' => true, ] ); $this->add_control( 'pause_on_hover', [ 'label' => esc_html__( 'Pause on Hover', 'nighty' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'nighty' ), 'no' => esc_html__( 'No', 'nighty' ), ], 'frontend_available' => true, ] ); $this->add_control( 'infinite', [ 'label' => esc_html__( 'Infinite Loop', 'nighty' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'nighty' ), 'no' => esc_html__( 'No', 'nighty' ), ], 'frontend_available' => true, ] ); $this->add_control( 'autoplay', [ 'label' => esc_html__( 'Autoplay', 'nighty' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'nighty' ), 'no' => esc_html__( 'No', 'nighty' ), ], 'frontend_available' => true, ] ); $this->add_control( 'autoplay_speed', [ 'label' => esc_html__( 'Autoplay Speed', 'nighty' ), 'type' => Controls_Manager::NUMBER, 'default' => 3000, 'step' => 500, 'condition' => [ 'autoplay' => 'yes', ], 'frontend_available' => true, ] ); $this->add_control( 'smartspeed', [ 'label' => esc_html__( 'Smart Speed', 'nighty' ), 'type' => Controls_Manager::NUMBER, 'default' => 500, ] ); $this->add_control( 'dot_control', [ 'label' => esc_html__( 'Show Dots', 'nighty' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'nighty' ), 'no' => esc_html__( 'No', 'nighty' ), ], 'frontend_available' => true, ] ); $this->add_control( 'nav_control', [ 'label' => esc_html__( 'Show Nav', 'nighty' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'options' => [ 'yes' => esc_html__( 'Yes', 'nighty' ), 'no' => esc_html__( 'No', 'nighty' ), ], 'frontend_available' => true, ] ); $this->end_controls_section(); /**************************** END SECTION ADDITIONAL *********************/ $this->start_controls_section( 'section_item_style', [ 'label' => esc_html__( 'Item', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'item_background_color', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item' => 'background-color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'item_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'item_border', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .item', ] ); $this->add_control( 'item_border_radius', [ 'label' => esc_html__( 'Border Radius', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_author_style', [ 'label' => esc_html__( 'Image', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'author_image_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 500, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .author-image img' => 'width: {{SIZE}}{{UNIT}};min-width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'author_image_border_radius', [ 'label' => esc_html__( 'Border Radius', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .author-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'author_image_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .author-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_quote_style', [ 'label' => esc_html__( 'Quote', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'quote_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 500, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .quote .quote i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .quote svg' => 'width: {{SIZE}}{{UNIT}};height:auto', ], ] ); $this->add_control( 'quote_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .quote i' => 'color: {{VALUE}}', '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .quote svg path' => 'fill: {{VALUE}}', ], ] ); $this->add_control( 'quote_color_center', [ 'label' => esc_html__( 'Center Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item.center .item .wrap-quote .quote .quote i' => 'color: {{VALUE}}', '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item.center .item .wrap-quote .quote svg path' => 'fill: {{VALUE}}', ], ] ); $this->add_responsive_control( 'quote_position_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .wrap-quote .quote' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /************* SECTION content testimonial *******************/ $this->start_controls_section( 'section_content_testimonial', [ 'label' => esc_html__( 'Content', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_testimonial_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .item .content', ] ); $this->add_control( 'content_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .item .content' => 'color : {{VALUE}};', ], ] ); $this->add_responsive_control( 'content_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .item .content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); ############### end section content testimonial ############### $this->start_controls_section( 'section_line_decoration', [ 'label' => esc_html__( 'Line Decoration', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'line_decoration_width', [ 'label' => esc_html__( 'Width', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .info .line-decoration' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'line_decoration_height', [ 'label' => esc_html__( 'Height', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 10, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .info .line-decoration' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'line_decoration_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .info .line-decoration' => 'background-color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'line_decoration_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-stage-outer .owl-item .item .info .line-decoration' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_name', [ 'label' => esc_html__( 'Name', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'name_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .name', ] ); $this->add_control( 'name_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .name' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'name_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .name' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_job', [ 'label' => esc_html__( 'Job', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'job_typography', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .job', ] ); $this->add_control( 'job_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .job' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'company_color', [ 'label' => esc_html__( 'Company Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .job .company' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'job_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .item .info .name-job .job' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* Begin Dots Style */ $this->start_controls_section( 'dots_style', [ 'label' => esc_html__( 'Dots', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'dot_control' => 'yes', ] ] ); $this->add_responsive_control( 'dots_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .owl-carousel .owl-dots .owl-dot' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'dots_spacing', [ 'label' => esc_html__( 'Spacing', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .owl-carousel .owl-dots .owl-dot' => 'margin-right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'dots_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .owl-carousel .owl-dots .owl-dot' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'dots_color_active', [ 'label' => esc_html__( 'Active Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .owl-carousel .owl-dots .owl-dot.active' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'dots_border_radius', [ 'label' => esc_html__( 'Border Radius', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .owl-carousel .owl-dots .owl-dot' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'dots_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .owl-carousel .owl-dots' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* Begin Nav Style */ $this->start_controls_section( 'nav_style', [ 'label' => esc_html__( 'Nav Control', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'nav_control' => 'yes', ] ] ); $this->add_responsive_control( 'nav_button_size', [ 'label' => esc_html__( 'Nav Size', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 20, 'max' => 100, ], ], 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav' => 'height: {{SIZE}}{{UNIT}}; width:{{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'size_nav_icon', [ 'label' => esc_html__( 'Icon Size', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'selectors' => [ ' {{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav button i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_spacing', [ 'label' => esc_html__( 'Icon Spacing', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'selectors' => [ ' {{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav' => 'gap: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'color_nav_icon', [ 'label' => esc_html__( 'Icon Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav button i' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'color_nav_icon_hover', [ 'label' => esc_html__( 'Icon Color Hover', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav button:hover i' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'color_nav_background', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav' => 'background-color : {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'nav_border', 'selector' => '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav button', ] ); $this->add_control( 'nav_border_radius', [ 'label' => esc_html__( 'Border Radius', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ ' {{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'nav_position_heading', [ 'label' => esc_html__( 'Position', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'nav_left', [ 'label' => esc_html__( 'Left', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav' => 'left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'nav_bottom', [ 'label' => esc_html__( 'Bottom', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .ova-testimonial .slide-testimonials .owl-nav ' => 'bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* End Nav Style */ } // Render Template Here protected function render() { $settings = $this->get_settings(); $quote = $settings['quote']; $tab_item = $settings['tab_item']; $data_options['items'] = $settings['item_number']; $data_options['margin'] = $settings['margin_items']; $data_options['slideBy'] = $settings['slides_to_scroll']; $data_options['center'] = $settings['center_mode'] === 'yes' ? true : false; $data_options['autoplayHoverPause'] = $settings['pause_on_hover'] === 'yes' ? true : false; $data_options['loop'] = $settings['infinite'] === 'yes' ? true : false; $data_options['autoplay'] = $settings['autoplay'] === 'yes' ? true : false; $data_options['autoplayTimeout'] = $settings['autoplay_speed']; $data_options['smartSpeed'] = $settings['smartspeed']; $data_options['rtl'] = is_rtl() ? true: false; $data_options['dots'] = $settings['dot_control'] === 'yes' ? true : false; $data_options['nav'] = $settings['nav_control'] === 'yes' ? true : false; ?> <div class="ova-testimonial "> <div class="slide-testimonials owl-carousel owl-theme " 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="wrap-quote"> <div class="author-image"> <?php if( $item['image_author'] != '' ) { ?> <?php $alt = isset($item['name_author']) && $item['name_author'] ? $item['name_author'] : esc_html__( 'testimonial','nighty' ); ?> <img src="<?php echo esc_attr($item['image_author']['url']); ?>" alt="<?php echo esc_attr( $alt ); ?>" > <?php } ?> </div> <?php if( $quote != '' ) : ?> <span class="quote"> <?php \Elementor\Icons_Manager::render_icon( $quote, [ 'aria-hidden' => 'true' ] ); ?> </span> <?php endif; ?> </div> <?php if( $item['testimonial'] != '' ) : ?> <p class="content"> <?php echo esc_html($item['testimonial']); ?> </p> <?php endif; ?> <div class="info"> <div class="line-decoration"></div> <div class="name-job"> <?php if( $item['name_author'] != '' ) { ?> <p class="name"> <?php echo esc_html($item['name_author']) ; ?> </p> <?php } ?> <?php if( $item['job'] != '' ) { ?> <p class="job"> <?php echo esc_html($item['job']) ; ?> <span class="company"><?php echo esc_html($item['company']) ; ?></span> </p> <?php } ?> </div> </div> </div> <?php endforeach; endif; ?> </div> </div> <?php } } $widgets_manager->register( new Nighty_Elementor_Testimonial() );
💾 Save Changes
❌ Cancel