get_name(); } public function get_icon() { return 'eicon-testimonial-carousel'; } public function get_categories() { return [ 'addronix-addons-for-elementor' ]; } public function get_keywords() { return [ 'testimonial', 'stagger', 'cards', 'carousel', 'slider' ]; } public function get_style_depends() { return [ 'aafe-stagger-testimonials-style' ]; } public function get_script_depends() { return [ 'aafe-stagger-testimonials-script' ]; } protected function register_controls() { /* ══════════════════════════════════════════════════ * CONTENT TAB * ══════════════════════════════════════════════════ */ $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Testimonials', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->add_control( 'testimonial_text', [ 'label' => esc_html__( 'Testimonial', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => esc_html__( 'My favorite solution in the market. We work 5x faster with COMPANY.', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true ], ] ); $repeater->add_control( 'author_name', [ 'label' => esc_html__( 'Author', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Alex, CEO at TechCorp', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true ], ] ); $repeater->add_control( 'author_image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], 'dynamic' => [ 'active' => true ], ] ); $this->add_control( 'testimonials_list', [ 'label' => esc_html__( 'Testimonials List', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'testimonial_text' => esc_html__( "My favorite solution in the market. We work 5x faster with COMPANY.", 'addronix-addons-for-elementor' ), 'author_name' => esc_html__( 'Alex, CEO at TechCorp', 'addronix-addons-for-elementor' ), ], [ 'testimonial_text' => esc_html__( "I'm confident my data is safe with COMPANY. I can't say that about other providers.", 'addronix-addons-for-elementor' ), 'author_name' => esc_html__( 'Dan, CTO at SecureNet', 'addronix-addons-for-elementor' ), ], [ 'testimonial_text' => esc_html__( "I know it's cliche, but we were lost before we found COMPANY. Can't thank you guys enough!", 'addronix-addons-for-elementor' ), 'author_name' => esc_html__( 'Stephanie, COO at InnovateCo', 'addronix-addons-for-elementor' ), ], [ 'testimonial_text' => esc_html__( "COMPANY's products make planning for the future seamless. Can't recommend them enough!", 'addronix-addons-for-elementor' ), 'author_name' => esc_html__( 'Marie, CFO at FuturePlanning', 'addronix-addons-for-elementor' ), ], [ 'testimonial_text' => esc_html__( "If I could give 11 stars, I'd give 12.", 'addronix-addons-for-elementor' ), 'author_name' => esc_html__( 'Andre, Head of Design', 'addronix-addons-for-elementor' ), ], ], 'title_field' => '{{{ author_name }}}', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_nav_content', [ 'label' => esc_html__( 'Navigation Icons', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'icon_prev', [ 'label' => esc_html__( 'Previous Icon', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'value' => 'fas fa-chevron-left', 'library' => 'fa-solid', ], ] ); $this->add_control( 'icon_next', [ 'label' => esc_html__( 'Next Icon', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'value' => 'fas fa-chevron-right', 'library' => 'fa-solid', ], ] ); $this->end_controls_section(); // AAFE IMPROVEMENT: Autoplay + Pause on Hover $this->start_controls_section( 'section_carousel_settings', [ 'label' => esc_html__( 'Carousel Settings', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'enable_autoplay', [ 'label' => esc_html__( 'Enable Autoplay', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Yes', 'addronix-addons-for-elementor' ), 'label_off' => esc_html__( 'No', 'addronix-addons-for-elementor' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'autoplay_speed', [ 'label' => esc_html__( 'Autoplay Speed (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'min' => 500, 'max' => 10000, 'default' => 3000, 'condition' => [ 'enable_autoplay' => 'yes', ], ] ); $this->end_controls_section(); /* ══════════════════════════════════════════════════ * STYLE TAB * ══════════════════════════════════════════════════ */ $this->start_controls_section( 'style_layout', [ 'label' => esc_html__( 'Layout & Hover', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'card_size', [ 'label' => esc_html__( 'Card Size', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 200, 'max' => 600 ] ], 'desktop_default' => [ 'unit' => 'px', 'size' => 365 ], 'tablet_default' => [ 'unit' => 'px', 'size' => 290 ], 'mobile_default' => [ 'unit' => 'px', 'size' => 290 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials-wrapper' => '--aafe-card-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'stagger_overlap', [ 'label' => esc_html__( 'Card Overlap', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.0, 'max' => 3.0, 'step' => 0.1 ] ], 'default' => [ 'size' => 1.5 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials-wrapper' => '--aafe-overlap: {{SIZE}};', ], ] ); $this->add_responsive_control( 'stagger_center_y', [ 'label' => esc_html__( 'Center Card Y Offset', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, 'step' => 1 ] ], 'default' => [ 'size' => -65 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials-wrapper' => '--aafe-center-y: {{SIZE}};', ], ] ); $this->add_responsive_control( 'stagger_side_y', [ 'label' => esc_html__( 'Side Cards Y Offset (Zig-Zag)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -100, 'max' => 100, 'step' => 1 ] ], 'default' => [ 'size' => 15 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials-wrapper' => '--aafe-side-y: {{SIZE}};', ], ] ); $this->add_responsive_control( 'stagger_side_rotate', [ 'label' => esc_html__( 'Side Cards Rotation', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 45, 'step' => 0.1 ] ], 'default' => [ 'size' => 2.5 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials-wrapper' => '--aafe-side-rotate: {{SIZE}};', ], ] ); $this->add_control( 'container_bg', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#f1f5f9', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials-wrapper' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'hover_effect_type', [ 'label' => esc_html__( 'Wrapper Hover Effect', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'addronix-addons-for-elementor' ), 'lift' => esc_html__( 'Lift', 'addronix-addons-for-elementor' ), 'glow' => esc_html__( 'Glow', 'addronix-addons-for-elementor' ), 'scale' => esc_html__( 'Scale', 'addronix-addons-for-elementor' ), 'border-pop' => esc_html__( 'Border Pop', 'addronix-addons-for-elementor' ), 'shine' => esc_html__( 'Shine', 'addronix-addons-for-elementor' ), ], 'default' => 'none', ] ); $this->add_control( 'hover_scale', [ 'label' => esc_html__( 'Hover Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.0, 'max' => 1.2, 'step' => 0.01 ] ], 'default' => [ 'size' => 1.03 ], 'condition' => [ 'hover_effect_type' => [ 'scale', 'lift' ] ], ] ); $this->add_control( 'hover_duration', [ 'label' => esc_html__( 'Hover Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 100, 'max' => 1000, 'step' => 50 ] ], 'default' => [ 'size' => 300 ], ] ); $this->end_controls_section(); /* ── STYLE: Cards ───────────────────────────── */ $this->start_controls_section( 'style_cards', [ 'label' => esc_html__( 'Cards', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'card_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'card_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'heading_colors', [ 'label' => esc_html__( 'Colors & Hover Effects', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->start_controls_tabs( 'tabs_card_colors' ); // Normal Card $this->start_controls_tab( 'tab_card_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_card_bg', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'card_border', 'label' => esc_html__( 'Border', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__card', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'card_box_shadow', 'label' => esc_html__( 'Box Shadow', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__card', ] ); $this->end_controls_tab(); // Hover Card $this->start_controls_tab( 'tab_card_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_card_bg_hover', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'card_border_hover', 'label' => esc_html__( 'Border', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__card:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'card_box_shadow_hover', 'label' => esc_html__( 'Box Shadow', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__card:hover', ] ); $this->end_controls_tab(); // Center Card $this->start_controls_tab( 'tab_card_center', [ 'label' => esc_html__( 'Center', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_primary', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#0f172a', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center, {{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'card_border_center', 'label' => esc_html__( 'Border', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center, {{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'card_box_shadow_center', 'label' => esc_html__( 'Box Shadow', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center, {{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /* ── STYLE: Image ───────────────────────────── */ $this->start_controls_section( 'style_image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'image_width', [ 'label' => esc_html__( 'Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__img' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'image_height', [ 'label' => esc_html__( 'Height', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vh', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__img' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'image_object_fit', [ 'label' => esc_html__( 'Object Fit', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ '' => esc_html__( 'Default', 'addronix-addons-for-elementor' ), 'fill' => esc_html__( 'Fill', 'addronix-addons-for-elementor' ), 'cover' => esc_html__( 'Cover', 'addronix-addons-for-elementor' ), 'contain' => esc_html__( 'Contain', 'addronix-addons-for-elementor' ), ], 'default' => 'cover', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__img' => 'object-fit: {{VALUE}};', ], ] ); $this->add_responsive_control( 'image_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'image_border', 'label' => esc_html__( 'Border', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__img', ] ); $this->add_responsive_control( 'image_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'image_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* ── STYLE: Typography ───────────────────────────── */ $this->start_controls_section( 'style_content', [ 'label' => esc_html__( 'Content', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'text_align', [ 'label' => esc_html__( 'Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'addronix-addons-for-elementor' ), 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => esc_html__( 'Center', 'addronix-addons-for-elementor' ), 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => esc_html__( 'Right', 'addronix-addons-for-elementor' ), 'icon' => 'eicon-text-align-right' ], ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card' => 'text-align: {{VALUE}};', ], ] ); $this->add_control( 'heading_style_testimonial', [ 'label' => esc_html__( 'Testimonial', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->start_controls_tabs( 'tabs_testimonial_color' ); // Normal $this->start_controls_tab( 'tab_testi_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_testimonial', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#0f172a', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card .aafe-stagger-testimonials__text' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); // Hover $this->start_controls_tab( 'tab_testi_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_testimonial_hover', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card:hover .aafe-stagger-testimonials__text' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); // Center $this->start_controls_tab( 'tab_testi_center', [ 'label' => esc_html__( 'Center', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_testimonial_center', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center .aafe-stagger-testimonials__text, {{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center:hover .aafe-stagger-testimonials__text' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'testimonial_typography', 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__text', 'fields_options' => [ 'font_family' => [ 'default' => 'Inter' ], 'font_weight' => [ 'default' => '500' ], ], ] ); $this->add_responsive_control( 'testimonial_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'testimonial_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'heading_style_author', [ 'label' => esc_html__( 'Author', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->start_controls_tabs( 'tabs_author_color' ); // Normal $this->start_controls_tab( 'tab_author_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_author', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#0f172a', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card .aafe-stagger-testimonials__author' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); // Hover $this->start_controls_tab( 'tab_author_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_author_hover', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card:hover .aafe-stagger-testimonials__author' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); // Center $this->start_controls_tab( 'tab_author_center', [ 'label' => esc_html__( 'Center', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'color_author_center', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center .aafe-stagger-testimonials__author, {{WRAPPER}} .aafe-stagger-testimonials__card.aafe-stagger-testimonials__card--center:hover .aafe-stagger-testimonials__author' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'author_typography', 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__author', 'fields_options' => [ 'font_family' => [ 'default' => 'Inter' ], 'font_weight' => [ 'default' => '400' ], 'font_size' => [ 'default' => [ 'unit' => 'rem', 'size' => 0.875 ] ], ], ] ); $this->add_responsive_control( 'author_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__author' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'author_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__author' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); /* ── STYLE: Navigation ───────────────────────────── */ $this->start_controls_section( 'style_navigation', [ 'label' => esc_html__( 'Navigation Buttons', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'nav_heading_position', [ 'label' => esc_html__( 'Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_responsive_control( 'nav_margin_top', [ 'label' => esc_html__( 'Vertical Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vh' ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200 ] ], 'default' => [ 'unit' => 'px', 'size' => 16 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__nav' => 'margin-top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'nav_horizontal_offset', [ 'label' => esc_html__( 'Horizontal Offset', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => -500, 'max' => 500 ] ], 'default' => [ 'unit' => 'px', 'size' => 0 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__nav' => 'transform: translateX({{SIZE}}{{UNIT}});', ], ] ); $this->add_control( 'nav_heading_size', [ 'label' => esc_html__( 'Size', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'nav_gap', [ 'label' => esc_html__( 'Space Between Buttons', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'rem' ], 'default' => [ 'unit' => 'px', 'size' => 8 ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__nav' => 'gap: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'nav_btn_size', [ 'label' => esc_html__( 'Button Size', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'nav_icon_size', [ 'label' => esc_html__( 'Icon Size', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'rem', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .aafe-stagger-testimonials__btn svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'nav_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], ] ); $this->start_controls_tabs( 'tabs_nav_colors' ); $this->start_controls_tab( 'tab_nav_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'nav_bg', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'nav_color', [ 'label' => esc_html__( 'Icon Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn' => 'color: {{VALUE}};', '{{WRAPPER}} .aafe-stagger-testimonials__btn svg' => 'fill: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'nav_border', 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__btn', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'nav_box_shadow', 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__btn', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_nav_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'nav_bg_hover', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'nav_color_hover', [ 'label' => esc_html__( 'Icon Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-stagger-testimonials__btn:hover' => 'color: {{VALUE}};', '{{WRAPPER}} .aafe-stagger-testimonials__btn:hover svg' => 'fill: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'nav_border_hover', 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__btn:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'nav_box_shadow_hover', 'selector' => '{{WRAPPER}} .aafe-stagger-testimonials__btn:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); // AAFE IMPROVEMENT: Entrance Animation section $this->start_controls_section( 'section_entrance_animation', [ 'label' => esc_html__( 'Entrance Animation', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'animation_type', [ 'label' => esc_html__( 'Animation Type', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'addronix-addons-for-elementor' ), 'fadeIn' => esc_html__( 'Fade In', 'addronix-addons-for-elementor' ), 'fadeInUp' => esc_html__( 'Fade In Up', 'addronix-addons-for-elementor' ), 'fadeInDown' => esc_html__( 'Fade In Down', 'addronix-addons-for-elementor' ), 'fadeInLeft' => esc_html__( 'Fade In Left', 'addronix-addons-for-elementor' ), 'fadeInRight' => esc_html__( 'Fade In Right', 'addronix-addons-for-elementor' ), 'zoomIn' => esc_html__( 'Zoom In', 'addronix-addons-for-elementor' ), ], 'default' => 'none', ] ); $this->add_control( 'animation_duration', [ 'label' => esc_html__( 'Animation Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'default' => 600, 'condition' => [ 'animation_type!' => 'none', ], ] ); $this->add_control( 'animation_delay', [ 'label' => esc_html__( 'Animation Delay (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'condition' => [ 'animation_type!' => 'none', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $testimonials = $settings['testimonials_list'] ?? []; if ( empty( $testimonials ) ) { return; } $this->add_render_attribute( 'wrapper', [ 'class' => 'aafe-stagger-testimonials-wrapper', ] ); // AAFE IMPROVEMENT: Autoplay + Pause on Hover $this->add_render_attribute( 'wrapper', [ 'data-autoplay' => $settings['enable_autoplay'] ?? 'yes', 'data-autoplay-speed' => $settings['autoplay_speed'] ?? 3000, ] ); // AAFE IMPROVEMENT: Keyboard Navigation + Basic ARIA $this->add_render_attribute( 'wrapper', [ 'tabindex' => '0', 'role' => 'region', 'aria-label' => esc_attr__( 'Stagger Testimonials slider', 'addronix-addons-for-elementor' ), ] ); // AAFE IMPROVEMENT: Entrance Animation section if ( ! empty( $settings['animation_type'] ) && 'none' !== $settings['animation_type'] ) { $this->add_render_attribute( 'wrapper', [ 'data-aafe-animation' => $settings['animation_type'], 'data-aafe-duration' => $settings['animation_duration'] ?? 600, 'data-aafe-delay' => $settings['animation_delay'] ?? 0, ] ); } $hover_type = $settings['hover_effect_type'] ?? 'none'; if ( 'none' !== $hover_type ) { $this->add_render_attribute( 'wrapper', 'data-hover', $hover_type ); $hover_scale = isset($settings['hover_scale']['size']) ? $settings['hover_scale']['size'] : 1.03; $hover_duration = isset($settings['hover_duration']['size']) ? $settings['hover_duration']['size'] : 300; $this->add_render_attribute( 'wrapper', 'style', "--aafe-hover-scale: {$hover_scale}; --aafe-transition: {$hover_duration}ms;" ); } ?>
print_render_attribute_string( 'wrapper' ); ?>>
$item ) : $img_url = ! empty( $item['author_image']['url'] ) ? $item['author_image']['url'] : ''; ?>
<?php echo esc_attr( $item['author_name'] ); ?>

""

-

<# var testimonials = settings.testimonials_list || []; if ( ! testimonials.length ) return; var wrapperClasses = 'aafe-stagger-testimonials-wrapper'; var hoverType = settings.hover_effect_type || 'none'; var hoverAttrs = ''; if ( hoverType !== 'none' ) { hoverAttrs += ' data-hover="' + hoverType + '"'; var hoverScale = settings.hover_scale && settings.hover_scale.size ? settings.hover_scale.size : 1.03; var hoverDur = settings.hover_duration && settings.hover_duration.size ? settings.hover_duration.size : 300; hoverAttrs += ' style="--aafe-hover-scale:' + hoverScale + '; --aafe-transition:' + hoverDur + 'ms;"'; } // AAFE IMPROVEMENT: Autoplay + Pause on Hover var autoplayAttrs = ' data-autoplay="' + (settings.enable_autoplay || 'yes') + '" data-autoplay-speed="' + (settings.autoplay_speed || 3000) + '"'; // AAFE IMPROVEMENT: Keyboard Navigation + Basic ARIA var ariaAttrs = ' tabindex="0" role="region" aria-label="Stagger Testimonials slider"'; // AAFE IMPROVEMENT: Entrance Animation section var animAttrs = ''; if ( settings.animation_type && settings.animation_type !== 'none' ) { animAttrs += ' data-aafe-animation="' + settings.animation_type + '"'; animAttrs += ' data-aafe-duration="' + (settings.animation_duration || 600) + '"'; animAttrs += ' data-aafe-delay="' + (settings.animation_delay || 0) + '"'; } #>
<# _.each( testimonials, function( item, index ) { var img_url = item.author_image && item.author_image.url ? item.author_image.url : ''; #>
<# if ( img_url ) { #> {{ item.author_name }} <# } #>

"{{{ item.testimonial_text }}}"

- {{{ item.author_name }}}

<# } ); #>