section_slides(); $this->section_options(); $this->section_responsive(); $this->section_style_slide(); $this->section_style_content(); $this->section_style_nav(); } // ========================================================================= // Content — Slides // ========================================================================= private function section_slides(): void { $this->start_controls_section( 'section_slides', [ 'label' => __( 'Slides', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $templates = $this->get_elementor_templates(); $repeater = new Repeater(); // ── Slide type ────────────────────────────────────────────────── $repeater->add_control( 'slide_type', [ 'label' => __( 'Slide Type', 'admore-widgets-suite' ), 'type' => Controls_Manager::SELECT, 'default' => 'custom', 'options' => [ 'custom' => __( 'Custom Content', 'admore-widgets-suite' ), 'template' => __( 'Elementor Template', 'admore-widgets-suite' ), ], ] ); // ── Template ──────────────────────────────────────────────────── $repeater->add_control( 'template_id', [ 'label' => __( 'Select Template', 'admore-widgets-suite' ), 'type' => Controls_Manager::SELECT, 'options' => $templates, 'condition' => [ 'slide_type' => 'template' ], ] ); // ── Custom: Background ────────────────────────────────────────── $repeater->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'slide_bg', 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}.eppro-slide', 'condition' => [ 'slide_type' => 'custom' ], ] ); $repeater->add_control( 'bg_overlay', [ 'label' => __( 'Overlay Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => 'rgba(0,0,0,0)', 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}}.eppro-slide .eppro-slide-overlay' => 'background-color: {{VALUE}};', ], 'condition' => [ 'slide_type' => 'custom' ], ] ); // ── Custom: Content ───────────────────────────────────────────── $repeater->add_control( 'content_align', [ 'label' => __( 'Content Alignment', 'admore-widgets-suite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'admore-widgets-suite' ), 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => __( 'Center', 'admore-widgets-suite' ), 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => __( 'Right', 'admore-widgets-suite' ), 'icon' => 'eicon-text-align-right' ], ], 'default' => 'center', 'condition' => [ 'slide_type' => 'custom' ], ] ); $repeater->add_control( 'heading', [ 'label' => __( 'Heading', 'admore-widgets-suite' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Slide Heading', 'admore-widgets-suite' ), 'dynamic' => [ 'active' => true ], 'condition' => [ 'slide_type' => 'custom' ], ] ); $repeater->add_control( 'heading_tag', [ 'label' => __( 'HTML Tag', 'admore-widgets-suite' ), 'type' => Controls_Manager::SELECT, 'default' => 'h2', 'options' => [ 'h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'div' => 'div' ], 'condition' => [ 'slide_type' => 'custom' ], ] ); $repeater->add_control( 'subtitle', [ 'label' => __( 'Subtitle / Description', 'admore-widgets-suite' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 3, 'dynamic' => [ 'active' => true ], 'condition' => [ 'slide_type' => 'custom' ], ] ); $repeater->add_control( 'btn_text', [ 'label' => __( 'Button Text', 'admore-widgets-suite' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'slide_type' => 'custom' ], ] ); $repeater->add_control( 'btn_url', [ 'label' => __( 'Button URL', 'admore-widgets-suite' ), 'type' => Controls_Manager::URL, 'dynamic' => [ 'active' => true ], 'condition' => [ 'slide_type' => 'custom', 'btn_text!' => '' ], ] ); $repeater->add_control( 'btn_style', [ 'label' => __( 'Button Style', 'admore-widgets-suite' ), 'type' => Controls_Manager::SELECT, 'default' => 'filled', 'options' => [ 'filled' => __( 'Filled', 'admore-widgets-suite' ), 'outline' => __( 'Outline', 'admore-widgets-suite' ), 'ghost' => __( 'Ghost (text only)', 'admore-widgets-suite' ), ], 'condition' => [ 'slide_type' => 'custom', 'btn_text!' => '' ], ] ); $this->add_control( 'slides', [ 'label' => __( 'Slides', 'admore-widgets-suite' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'slide_type' => 'custom', 'heading' => __( 'Powerful Features', 'admore-widgets-suite' ), 'subtitle' => __( 'Build stunning pages faster with advanced widgets designed for real-world projects.', 'admore-widgets-suite' ), 'btn_text' => __( 'Get Started', 'admore-widgets-suite' ), ], [ 'slide_type' => 'custom', 'heading' => __( 'Flexible Layouts', 'admore-widgets-suite' ), 'subtitle' => __( 'Every widget is fully responsive and customizable — no coding required.', 'admore-widgets-suite' ), 'btn_text' => __( 'Learn More', 'admore-widgets-suite' ), ], [ 'slide_type' => 'custom', 'heading' => __( 'Grow Your Business', 'admore-widgets-suite' ), 'subtitle' => __( 'Convert visitors into customers with high-impact sections built to perform.', 'admore-widgets-suite' ), 'btn_text' => __( 'See Examples', 'admore-widgets-suite' ), ], ], 'title_field' => '{{{ "template" === slide_type ? "Template Slide" : heading }}}', ] ); $this->end_controls_section(); } // ========================================================================= // Content — Slider Options // ========================================================================= private function section_options(): void { $this->start_controls_section( 'section_options', [ 'label' => __( 'Slider Options', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'effect', [ 'label' => __( 'Effect', 'admore-widgets-suite' ), 'type' => Controls_Manager::SELECT, 'default' => 'slide', 'options' => [ 'slide' => __( 'Slide', 'admore-widgets-suite' ), 'fade' => __( 'Fade', 'admore-widgets-suite' ), 'coverflow' => __( 'Coverflow', 'admore-widgets-suite' ), ], ] ); $this->add_control( 'speed', [ 'label' => __( 'Transition Speed (ms)', 'admore-widgets-suite' ), 'type' => Controls_Manager::NUMBER, 'default' => 600, 'min' => 100, 'max' => 3000, ] ); $this->add_control( 'loop', [ 'label' => __( 'Infinite Loop', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', ] ); $this->add_control( 'autoplay', [ 'label' => __( 'Autoplay', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', ] ); $this->add_control( 'autoplay_speed', [ 'label' => __( 'Autoplay Delay (ms)', 'admore-widgets-suite' ), 'type' => Controls_Manager::NUMBER, 'default' => 4000, 'min' => 500, 'max' => 20000, 'condition' => [ 'autoplay' => 'yes' ], ] ); $this->add_control( 'pause_on_hover', [ 'label' => __( 'Pause on Hover', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'autoplay' => 'yes' ], ] ); $this->add_control( 'show_arrows', [ 'label' => __( 'Navigation Arrows', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'separator' => 'before', ] ); $this->add_control( 'show_dots', [ 'label' => __( 'Pagination Dots', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', ] ); $this->add_control( 'show_progress', [ 'label' => __( 'Progress Bar', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', ] ); $this->add_control( 'keyboard_nav', [ 'label' => __( 'Keyboard Navigation', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', ] ); $this->add_control( 'centered', [ 'label' => __( 'Centered Slides', 'admore-widgets-suite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', ] ); $this->add_control( 'space_between', [ 'label' => __( 'Space Between Slides (px)', 'admore-widgets-suite' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'min' => 0, 'max' => 200, ] ); $this->end_controls_section(); } // ========================================================================= // Content — Responsive // ========================================================================= private function section_responsive(): void { $this->start_controls_section( 'section_responsive', [ 'label' => __( 'Responsive', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'slides_per_view', [ 'label' => __( 'Slides Per View — Desktop', 'admore-widgets-suite' ), 'type' => Controls_Manager::NUMBER, 'default' => 1, 'min' => 1, 'max' => 6, ] ); $this->add_control( 'slides_per_view_tablet', [ 'label' => __( 'Slides Per View — Tablet', 'admore-widgets-suite' ), 'type' => Controls_Manager::NUMBER, 'default' => 1, 'min' => 1, 'max' => 4, ] ); $this->add_control( 'slides_per_view_mobile', [ 'label' => __( 'Slides Per View — Mobile', 'admore-widgets-suite' ), 'type' => Controls_Manager::NUMBER, 'default' => 1, 'min' => 1, 'max' => 2, ] ); $this->add_control( 'slide_height', [ 'label' => __( 'Slide Height', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'vh' ], 'range' => [ 'px' => [ 'min' => 150, 'max' => 1200 ], 'vh' => [ 'min' => 10, 'max' => 100 ], ], 'default' => [ 'size' => 540, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .eppro-slide' => 'height: {{SIZE}}{{UNIT}};' ], ] ); $this->end_controls_section(); } // ========================================================================= // Style — Slide // ========================================================================= private function section_style_slide(): void { $this->start_controls_section( 'style_slide', [ 'label' => __( 'Slide', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'slide_bg_default', [ 'label' => __( 'Default Background', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => '#1e1e2e', 'selectors' => [ '{{WRAPPER}} .eppro-slide' => 'background-color: {{VALUE}};' ], ] ); $this->add_control( 'slide_radius', [ 'label' => __( 'Border Radius', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .swiper' => 'border-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eppro-slide' => 'border-radius: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'slide_shadow', 'selector' => '{{WRAPPER}} .swiper', ] ); $this->add_control( 'overlay_heading', [ 'label' => __( 'Overlay', 'admore-widgets-suite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'overlay_color', [ 'label' => __( 'Overlay Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eppro-slide-overlay' => 'background-color: {{VALUE}};' ], ] ); $this->add_control( 'overlay_opacity', [ 'label' => __( 'Overlay Opacity', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => 0.05 ] ], 'selectors' => [ '{{WRAPPER}} .eppro-slide-overlay' => 'opacity: {{SIZE}};' ], 'condition' => [ 'overlay_color!' => '' ], ] ); $this->end_controls_section(); } // ========================================================================= // Style — Custom Slide Content // ========================================================================= private function section_style_content(): void { $this->start_controls_section( 'style_content', [ 'label' => __( 'Custom Slide Content', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'content_padding', [ 'label' => __( 'Content Padding', 'admore-widgets-suite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => '60', 'right' => '60', 'bottom' => '60', 'left' => '60', 'unit' => 'px', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .eppro-slide-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_control( 'content_max_width', [ 'label' => __( 'Content Max Width', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 200, 'max' => 1400 ] ], 'default' => [ 'size' => 720, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .eppro-slide-content' => 'max-width: {{SIZE}}{{UNIT}};' ], ] ); $this->add_control( 'content_valign', [ 'label' => __( 'Vertical Alignment', 'admore-widgets-suite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ 'title' => __( 'Top', 'admore-widgets-suite' ), 'icon' => 'eicon-v-align-top' ], 'center' => [ 'title' => __( 'Middle', 'admore-widgets-suite' ), 'icon' => 'eicon-v-align-middle' ], 'flex-end' => [ 'title' => __( 'Bottom', 'admore-widgets-suite' ), 'icon' => 'eicon-v-align-bottom' ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .eppro-slide' => 'align-items: {{VALUE}};' ], ] ); $this->add_control( 'content_halign', [ 'label' => __( 'Horizontal Alignment', 'admore-widgets-suite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ 'title' => __( 'Left', 'admore-widgets-suite' ), 'icon' => 'eicon-h-align-left' ], 'center' => [ 'title' => __( 'Center', 'admore-widgets-suite' ), 'icon' => 'eicon-h-align-center' ], 'flex-end' => [ 'title' => __( 'Right', 'admore-widgets-suite' ), 'icon' => 'eicon-h-align-right' ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .eppro-slide' => 'justify-content: {{VALUE}};' ], ] ); $this->add_control( 'heading_color', [ 'label' => __( 'Heading Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .eppro-slide-heading' => 'color: {{VALUE}};' ], 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'heading_typography', 'selector' => '{{WRAPPER}} .eppro-slide-heading', ] ); $this->add_control( 'heading_text_shadow', [ 'label' => __( 'Text Shadow', 'admore-widgets-suite' ), 'type' => Controls_Manager::TEXT_SHADOW, 'selectors' => [ '{{WRAPPER}} .eppro-slide-heading' => 'text-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{COLOR}};' ], ] ); $this->add_control( 'subtitle_color', [ 'label' => __( 'Subtitle Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => 'rgba(255,255,255,0.85)', 'selectors' => [ '{{WRAPPER}} .eppro-slide-subtitle' => 'color: {{VALUE}};' ], 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'subtitle_typography', 'selector' => '{{WRAPPER}} .eppro-slide-subtitle', ] ); $this->add_control( 'subtitle_text_shadow', [ 'label' => __( 'Text Shadow', 'admore-widgets-suite' ), 'type' => Controls_Manager::TEXT_SHADOW, 'selectors' => [ '{{WRAPPER}} .eppro-slide-subtitle' => 'text-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{COLOR}};' ], ] ); $this->add_control( 'btn_bg', [ 'label' => __( 'Button Background', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => EPPRO_Elementor_Helper::brand_color(), 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn.style-filled' => 'background-color: {{VALUE}};' ], 'separator' => 'before', ] ); $this->add_control( 'btn_color', [ 'label' => __( 'Button Text Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'btn_border_color', [ 'label' => __( 'Button Border Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn.style-outline' => 'border-color: {{VALUE}};' ], ] ); $this->add_control( 'btn_bg_hover', [ 'label' => __( 'Button Hover Background', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn.style-filled:hover' => 'background-color: {{VALUE}};' ], ] ); $this->add_control( 'btn_color_hover', [ 'label' => __( 'Button Hover Text Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn:hover' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'btn_typography', 'selector' => '{{WRAPPER}} .eppro-slide-btn', 'separator' => 'before', ] ); $this->add_control( 'btn_radius', [ 'label' => __( 'Button Radius', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'default' => [ 'size' => 6 ], 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn' => 'border-radius: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'btn_padding', [ 'label' => __( 'Button Padding', 'admore-widgets-suite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'default' => [ 'top' => '12', 'right' => '28', 'bottom' => '12', 'left' => '28', 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .eppro-slide-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); // No shadow by default; set one here if wanted. $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn_box_shadow', 'label' => __( 'Button Shadow', 'admore-widgets-suite' ), 'selector' => '{{WRAPPER}} .eppro-slide-btn', 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn_box_shadow_hover', 'label' => __( 'Button Hover Shadow', 'admore-widgets-suite' ), 'selector' => '{{WRAPPER}} .eppro-slide-btn:hover', ] ); $this->end_controls_section(); } // ========================================================================= // Style — Navigation // ========================================================================= private function section_style_nav(): void { $this->start_controls_section( 'style_nav', [ 'label' => __( 'Navigation', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'prev_icon', [ 'label' => __( 'Prev Arrow Icon', 'admore-widgets-suite' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'library' => 'eicons', 'value' => 'eicon-chevron-left' ], 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'next_icon', [ 'label' => __( 'Next Arrow Icon', 'admore-widgets-suite' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'library' => 'eicons', 'value' => 'eicon-chevron-right' ], 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'arrow_icon_size', [ 'label' => __( 'Arrow Icon Size (px)', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 60 ] ], 'default' => [ 'size' => 18 ], 'selectors' => [ '{{WRAPPER}} .eppro-slider-arrow i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eppro-slider-arrow svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'arrow_bg_hover', [ 'label' => __( 'Arrow Background Hover', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-next:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}} .swiper-button-prev:hover' => 'background-color: {{VALUE}};', ], 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'arrow_radius', [ 'label' => __( 'Arrow Border Radius', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'default' => [ 'size' => 50, 'unit' => '%' ], 'selectors' => [ '{{WRAPPER}} .swiper-button-next' => 'border-radius: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .swiper-button-prev' => 'border-radius: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'arrow_hover_color', [ 'label' => __( 'Arrow Icon Hover Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-prev:hover .eppro-slider-arrow i' => 'color: {{VALUE}};', '{{WRAPPER}} .swiper-button-prev:hover .eppro-slider-arrow svg' => 'fill: {{VALUE}};', '{{WRAPPER}} .swiper-button-next:hover .eppro-slider-arrow i' => 'color: {{VALUE}};', '{{WRAPPER}} .swiper-button-next:hover .eppro-slider-arrow svg' => 'fill: {{VALUE}};', ], 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'arrow_color', [ 'label' => __( 'Arrow Icon Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .swiper-button-next::after' => 'color: {{VALUE}};', '{{WRAPPER}} .swiper-button-prev::after' => 'color: {{VALUE}};', '{{WRAPPER}} .eppro-slider-arrow i' => 'color: {{VALUE}};', '{{WRAPPER}} .eppro-slider-arrow svg' => 'fill: {{VALUE}};', ], ] ); $this->add_control( 'arrow_bg', [ 'label' => __( 'Arrow Background', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => 'rgba(0,0,0,0.35)', 'selectors' => [ '{{WRAPPER}} .swiper-button-next' => 'background-color: {{VALUE}};', '{{WRAPPER}} .swiper-button-prev' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'arrow_size', [ 'label' => __( 'Arrow Size (px)', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 20, 'max' => 80 ] ], 'default' => [ 'size' => 44 ], 'selectors' => [ // margin-top keeps the arrow vertically centred at any size. '{{WRAPPER}} .swiper-button-next' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};margin-top: calc({{SIZE}}{{UNIT}} / -2);', '{{WRAPPER}} .swiper-button-prev' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};margin-top: calc({{SIZE}}{{UNIT}} / -2);', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'arrow_box_shadow', 'label' => __( 'Arrow Shadow', 'admore-widgets-suite' ), 'selector' => '{{WRAPPER}} .swiper-button-prev, {{WRAPPER}} .swiper-button-next', 'condition' => [ 'show_arrows' => 'yes' ], ] ); $this->add_control( 'dot_color', [ 'label' => __( 'Dot Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => 'rgba(255,255,255,0.5)', 'selectors' => [ '{{WRAPPER}} .swiper-pagination-bullet' => 'background: {{VALUE}};' ], 'separator' => 'before', ] ); $this->add_control( 'dot_active_color', [ 'label' => __( 'Active Dot Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .swiper-pagination-bullet-active' => 'background: {{VALUE}};' ], ] ); $this->add_control( 'dot_size', [ 'label' => __( 'Dot Size (px)', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 4, 'max' => 20 ] ], 'default' => [ 'size' => 8 ], 'selectors' => [ '{{WRAPPER}} .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'progress_color', [ 'label' => __( 'Progress Bar Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'default' => EPPRO_Elementor_Helper::brand_color(), 'selectors' => [ '{{WRAPPER}} .eppro-slider-progress-bar' => 'background: {{VALUE}};' ], 'separator' => 'before', 'condition' => [ 'show_progress' => 'yes' ], ] ); $this->add_control( 'progress_height', [ 'label' => __( 'Progress Bar Height (px)', 'admore-widgets-suite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 10 ] ], 'default' => [ 'size' => 3 ], 'selectors' => [ '{{WRAPPER}} .eppro-slider-progress' => 'height: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'show_progress' => 'yes' ], ] ); $this->end_controls_section(); } // ========================================================================= // Render // ========================================================================= protected function render(): void { $s = $this->get_settings_for_display(); $slides = $s['slides'] ?? []; if ( empty( $slides ) ) { if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) { echo '

' . esc_html__( 'Advanced Slider', 'admore-widgets-suite' ) . '

' . esc_html__( 'Add at least one slide in the Content tab.', 'admore-widgets-suite' ) . '

'; } return; } $show_arrows = ( $s['show_arrows'] ?? '' ) === 'yes'; $show_dots = ( $s['show_dots'] ?? '' ) === 'yes'; $show_progress = ( $s['show_progress'] ?? '' ) === 'yes'; $config = [ 'effect' => sanitize_key( $s['effect'] ?? 'slide' ), 'speed' => absint( $s['speed'] ?? 600 ), 'loop' => ( $s['loop'] ?? '' ) === 'yes', 'autoplay' => ( $s['autoplay'] ?? '' ) === 'yes', 'autoplayDelay' => absint( $s['autoplay_speed'] ?? 4000 ), 'pauseOnHover' => ( $s['pause_on_hover'] ?? '' ) === 'yes', 'centeredSlides' => ( $s['centered'] ?? '' ) === 'yes', 'spaceBetween' => absint( $s['space_between'] ?? 0 ), 'slidesPerView' => absint( $s['slides_per_view'] ?? 1 ), 'slidesPerViewTablet' => absint( $s['slides_per_view_tablet'] ?? 1 ), 'slidesPerViewMobile' => absint( $s['slides_per_view_mobile'] ?? 1 ), 'showArrows' => $show_arrows, 'showDots' => $show_dots, 'showProgress' => $show_progress, 'keyboard' => ( $s['keyboard_nav'] ?? 'yes' ) === 'yes', ]; ?>

' . esc_html__( 'Select an Elementor template for this slide.', 'admore-widgets-suite' ) . '

'; } ?>
< class="eppro-slide-heading"> >

target="_blank" rel="">
__( '— Select Template —', 'admore-widgets-suite' ) ]; $posts = get_posts( [ 'post_type' => 'elementor_library', 'post_status' => 'publish', 'posts_per_page' => 200, 'orderby' => 'title', 'order' => 'ASC', 'fields' => 'ids', ] ); foreach ( $posts as $id ) { $options[ $id ] = get_the_title( $id ); } return $options; } }