start_controls_section( 'section_layout', [ 'label' => esc_html__( 'Layout', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_responsive_control( 'layout_style', [ 'label' => esc_html__( 'Layout Orientation', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'left-right' => esc_html__( 'Content Left, Grid Right', 'addronix-addons-for-elementor' ), 'right-left' => esc_html__( 'Content Right, Grid Left', 'addronix-addons-for-elementor' ), 'top-bottom' => esc_html__( 'Content Top, Grid Bottom', 'addronix-addons-for-elementor' ), 'bottom-top' => esc_html__( 'Content Bottom, Grid Top', 'addronix-addons-for-elementor' ), 'grid-only' => esc_html__( 'Grid Only (Hide Content)', 'addronix-addons-for-elementor' ), ], 'default' => 'left-right', 'prefix_class' => 'aafe-layout%s-', ] ); $this->add_control( 'reverse_columns_mobile', [ 'label' => esc_html__( 'Reverse on Mobile', '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' => 'no', 'prefix_class' => 'aafe-reverse-mobile-', 'description' => esc_html__( 'Reverse the stacked column order on smaller mobile screens.', 'addronix-addons-for-elementor' ), 'condition' => [ 'layout_style!' => 'grid-only' ], ] ); $this->add_responsive_control( 'vertical_align', [ 'label' => esc_html__( 'Vertical Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ 'title' => esc_html__( 'Top', 'addronix-addons-for-elementor' ), 'icon' => 'eicon-v-align-top' ], 'center' => [ 'title' => esc_html__( 'Middle', 'addronix-addons-for-elementor' ), 'icon' => 'eicon-v-align-middle' ], 'flex-end' => [ 'title' => esc_html__( 'Bottom', 'addronix-addons-for-elementor' ), 'icon' => 'eicon-v-align-bottom' ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__inner' => 'align-items: {{VALUE}};' ], 'condition' => [ 'layout_style' => [ 'left-right', 'right-left' ] ], ] ); $this->add_responsive_control( 'content_alignment', [ 'label' => esc_html__( 'Content 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' ], ], 'default' => 'left', 'prefix_class' => 'aafe-content-align%s-', 'condition' => [ 'layout_style!' => 'grid-only' ], ] ); $this->end_controls_section(); /* ── Content: 2. Text Content ── */ $this->start_controls_section( 'section_content_text', [ 'label' => esc_html__( 'Text Content', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_style!' => 'grid-only' ], ] ); // Subtitle controls $this->add_control( 'heading_content_subtitle', [ 'label' => esc_html__( 'Subtitle', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'show_subtitle', [ 'label' => esc_html__( 'Show Subtitle', '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( 'subtitle_text', [ 'label' => esc_html__( 'Subtitle Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Better every day', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'condition' => [ 'show_subtitle' => 'yes' ], ] ); $this->add_control( 'subtitle_style', [ 'label' => esc_html__( 'Subtitle Style', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'normal' => esc_html__( 'Standard Text', 'addronix-addons-for-elementor' ), 'badge' => esc_html__( 'Pill Badge', 'addronix-addons-for-elementor' ), ], 'default' => 'badge', 'condition' => [ 'show_subtitle' => 'yes' ], ] ); $this->add_control( 'subtitle_badge_dot', [ 'label' => esc_html__( 'Pulsing Status Dot', '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', 'condition' => [ 'show_subtitle' => 'yes', 'subtitle_style' => 'badge' ], ] ); $this->add_control( 'subtitle_tag', [ 'label' => esc_html__( 'Subtitle HTML Tag', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1'=>'H1','h2'=>'H2','h3'=>'H3','h4'=>'H4','h5'=>'H5','h6'=>'H6','div'=>'div','span'=>'span','p'=>'p' ], 'default' => 'span', 'condition' => [ 'show_subtitle' => 'yes' ], ] ); // Title controls $this->add_control( 'heading_content_title', [ 'label' => esc_html__( 'Title', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'show_title', [ 'label' => esc_html__( 'Show Title', '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( 'title_text', [ 'label' => esc_html__( 'Title Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => "Let's change it up a bit", 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'rows' => 3, 'condition' => [ 'show_title' => 'yes' ], ] ); $this->add_control( 'title_tag', [ 'label' => esc_html__( 'Title HTML Tag', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1'=>'H1','h2'=>'H2','h3'=>'H3','h4'=>'H4','h5'=>'H5','h6'=>'H6','div'=>'div','span'=>'span','p'=>'p' ], 'default' => 'h2', 'condition' => [ 'show_title' => 'yes' ], ] ); // Description controls $this->add_control( 'heading_content_desc', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'show_desc', [ 'label' => esc_html__( 'Show Description', '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( 'desc_text', [ 'label' => esc_html__( 'Description Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => 'Discover high-intensity classes and community training designed to transform your everyday body and mind.', 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'rows' => 4, 'condition' => [ 'show_desc' => 'yes' ], ] ); $this->add_control( 'desc_tag', [ 'label' => esc_html__( 'Description HTML Tag', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'p'=>'p','div'=>'div','span'=>'span' ], 'default' => 'p', 'condition' => [ 'show_desc' => 'yes' ], ] ); $this->end_controls_section(); /* ── Content: 3. Buttons ── */ $this->start_controls_section( 'section_content_buttons', [ 'label' => esc_html__( 'Buttons', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_style!' => 'grid-only' ], ] ); // Primary Button $this->add_control( 'heading_primary_button', [ 'label' => esc_html__( 'Primary Button', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'show_button', [ 'label' => esc_html__( 'Show Primary Button', '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( 'button_text', [ 'label' => esc_html__( 'Button Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Find a class', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'condition' => [ 'show_button' => 'yes' ], ] ); $this->add_control( 'button_url', [ 'label' => esc_html__( 'Button Link', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => false ], 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::URL_CATEGORY ] ], 'condition' => [ 'show_button' => 'yes' ], ] ); $this->add_control( 'button_icon', [ 'label' => esc_html__( 'Button Icon', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::ICONS, 'condition' => [ 'show_button' => 'yes' ], ] ); $this->add_control( 'button_icon_align', [ 'label' => esc_html__( 'Icon Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'left' => esc_html__( 'Before Text', 'addronix-addons-for-elementor' ), 'right' => esc_html__( 'After Text', 'addronix-addons-for-elementor' ), ], 'default' => 'right', 'condition' => [ 'show_button' => 'yes', 'button_icon[value]!' => '' ], ] ); $this->add_control( 'button_icon_indent', [ 'label' => esc_html__( 'Icon Spacing', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 40 ] ], 'default' => [ 'size' => 8, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn .aafe-btn-icon--left' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .aafe-shuffle-hero__btn .aafe-btn-icon--right' => 'margin-left: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'show_button' => 'yes', 'button_icon[value]!' => '' ], ] ); // Secondary Button $this->add_control( 'heading_sec_button', [ 'label' => esc_html__( 'Secondary Button', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'show_sec_button', [ 'label' => esc_html__( 'Show Secondary Button', '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' => 'no', ] ); $this->add_control( 'sec_button_text', [ 'label' => esc_html__( 'Button Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Explore More', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'condition' => [ 'show_sec_button' => 'yes' ], ] ); $this->add_control( 'sec_button_url', [ 'label' => esc_html__( 'Button Link', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => false ], 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::URL_CATEGORY ] ], 'condition' => [ 'show_sec_button' => 'yes' ], ] ); $this->add_control( 'sec_button_icon', [ 'label' => esc_html__( 'Button Icon', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::ICONS, 'condition' => [ 'show_sec_button' => 'yes' ], ] ); $this->add_control( 'sec_button_icon_align', [ 'label' => esc_html__( 'Icon Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'left' => esc_html__( 'Before Text', 'addronix-addons-for-elementor' ), 'right' => esc_html__( 'After Text', 'addronix-addons-for-elementor' ), ], 'default' => 'right', 'condition' => [ 'show_sec_button' => 'yes', 'sec_button_icon[value]!' => '' ], ] ); $this->add_control( 'sec_button_icon_indent', [ 'label' => esc_html__( 'Icon Spacing', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 40 ] ], 'default' => [ 'size' => 8, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn-sec .aafe-btn-icon--left' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .aafe-shuffle-hero__btn-sec .aafe-btn-icon--right' => 'margin-left: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'show_sec_button' => 'yes', 'sec_button_icon[value]!' => '' ], ] ); $this->end_controls_section(); /* ── Content: 4. Grid Images ── */ $this->start_controls_section( 'section_content_images', [ 'label' => esc_html__( 'Grid Images', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'image_source', [ 'label' => esc_html__( 'Image Selection Mode', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'gallery' => esc_html__( 'Media Gallery (Select Multiple at Once)', 'addronix-addons-for-elementor' ), 'repeater' => esc_html__( 'Custom Repeater (Individual Links)', 'addronix-addons-for-elementor' ), ], 'default' => 'gallery', ] ); // Gallery control (select multiple images at once) $this->add_control( 'gallery_images', [ 'label' => esc_html__( 'Add Images', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::GALLERY, 'default' => [], 'show_label' => false, 'dynamic' => [ 'active' => true ], 'condition' => [ 'image_source' => 'gallery' ], 'description' => esc_html__( 'Click above to select 8 to 24 images together from your Media Library.', 'addronix-addons-for-elementor' ), ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'gallery_image_size', 'default' => 'large', 'separator' => 'none', 'condition' => [ 'image_source' => 'gallery' ], ] ); $this->add_control( 'gallery_link_to', [ 'label' => esc_html__( 'Image Link', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => esc_html__( 'None', 'addronix-addons-for-elementor' ), 'file' => esc_html__( 'Media File (Lightbox)', 'addronix-addons-for-elementor' ), 'custom' => esc_html__( 'Custom URL', 'addronix-addons-for-elementor' ), ], 'condition' => [ 'image_source' => 'gallery' ], ] ); $this->add_control( 'gallery_custom_url', [ 'label' => esc_html__( 'Custom URL', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::URL_CATEGORY ] ], 'condition' => [ 'image_source' => 'gallery', 'gallery_link_to' => 'custom' ], ] ); $this->add_control( 'open_lightbox', [ 'label' => esc_html__( 'Lightbox', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => [ 'default' => esc_html__( 'Default', 'addronix-addons-for-elementor' ), 'yes' => esc_html__( 'Yes', 'addronix-addons-for-elementor' ), 'no' => esc_html__( 'No', 'addronix-addons-for-elementor' ), ], 'condition' => [ 'image_source' => 'gallery', 'gallery_link_to' => 'file' ], ] ); // Repeater mode (individual image custom items) $repeater = new Repeater(); $repeater->add_control( 'grid_image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src() ], 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::IMAGE_CATEGORY ] ], ] ); $repeater->add_control( 'image_link', [ 'label' => esc_html__( 'Image Link (Optional)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'placeholder' => 'https://your-link.com', 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::URL_CATEGORY ] ], ] ); $repeater->add_control( 'image_title', [ 'label' => esc_html__( 'Image Title / Alt', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__( 'Gallery image', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], ] ); $curated_demo_images = [ 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1517838277536-f5f99be501cd?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1571019614242-c5c5dee9f50b?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1540497077202-7c8a3999166f?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1518611012118-696072aa579a?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1574680096145-d05b474e2155?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1574680096145-d05b474e2155?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1518310383802-640c2de311b2?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1583454110551-21f2fa2afe61?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1526506118085-60ce8714f8c5?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1599058945522-28d584b6f0ff?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1550345332-09e3ac987658?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1549576490-b0b4831ef60a?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1594737625785-a6cbdabd333c?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1517836357463-d25dfeac3438?w=600&auto=format&fit=crop&q=80', ]; $default_repeater_items = []; foreach ( $curated_demo_images as $demo_url ) { $default_repeater_items[] = [ 'grid_image' => [ 'url' => $demo_url ], 'image_title' => 'Hero Item', ]; } $this->add_control( 'images_list', [ 'label' => esc_html__( 'Items (16 Recommended)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => $default_repeater_items, 'title_field' => '{{{ image_title || "Image Item" }}}', 'condition' => [ 'image_source' => 'repeater' ], ] ); $this->add_responsive_control( 'grid_columns', [ 'label' => esc_html__( 'Grid Columns', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6' ], 'default' => '4', 'tablet_default' => '3', 'mobile_default' => '2', 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__grid' => 'grid-template-columns: repeat({{VALUE}}, 1fr);' ], ] ); $this->add_responsive_control( 'item_aspect_ratio', [ 'label' => esc_html__( 'Image Aspect Ratio', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ '1/1' => esc_html__( 'Square (1:1)', 'addronix-addons-for-elementor' ), '4/3' => esc_html__( 'Landscape (4:3)', 'addronix-addons-for-elementor' ), '3/4' => esc_html__( 'Portrait (3:4)', 'addronix-addons-for-elementor' ), '16/9' => esc_html__( 'Widescreen (16:9)', 'addronix-addons-for-elementor' ), 'custom' => esc_html__( 'Custom Ratio', 'addronix-addons-for-elementor' ), ], 'default' => '1/1', 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img' => 'aspect-ratio: {{VALUE}};' ], ] ); $this->add_responsive_control( 'custom_aspect_ratio', [ 'label' => esc_html__( 'Custom Ratio Value', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0.4, 'max' => 2.5, 'step' => 0.05 ] ], 'default' => [ 'size' => 1, 'unit' => 'px' ], 'condition' => [ 'item_aspect_ratio' => 'custom' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img' => 'aspect-ratio: {{SIZE}};' ], ] ); $this->end_controls_section(); /* ── Content: 5. Shuffle Animation Settings ── */ $this->start_controls_section( 'section_shuffle_settings', [ 'label' => esc_html__( 'Shuffle Animation', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'auto_shuffle', [ 'label' => esc_html__( 'Auto Shuffle', '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( 'shuffle_interval', [ 'label' => esc_html__( 'Shuffle Interval (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'default' => 3000, 'min' => 1000, 'max' => 12000, 'step' => 500, 'description' => esc_html__( 'Time in milliseconds between automatic shuffles.', 'addronix-addons-for-elementor' ), 'condition' => [ 'auto_shuffle' => 'yes' ], ] ); $this->add_control( 'anim_duration', [ 'label' => esc_html__( 'Animation Speed (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 300, 'max' => 3000, 'step' => 100 ] ], 'default' => [ 'size' => 1200, 'unit' => 'px' ], 'description' => esc_html__( 'Smoothness and speed of the FLIP card transition.', 'addronix-addons-for-elementor' ), 'selectors' => [ '{{WRAPPER}}' => '--aafe-flip-duration: {{SIZE}}ms;' ], ] ); $this->add_control( 'anim_easing', [ 'label' => esc_html__( 'Animation Easing', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'ease-out' => esc_html__( 'Smooth Ease Out (Natural)', 'addronix-addons-for-elementor' ), 'spring' => esc_html__( 'Gentle Spring / Bounce', 'addronix-addons-for-elementor' ), 'material' => esc_html__( 'Material Standard', 'addronix-addons-for-elementor' ), 'linear' => esc_html__( 'Linear', 'addronix-addons-for-elementor' ), ], 'default' => 'ease-out', ] ); $this->add_control( 'pause_on_hover', [ 'label' => esc_html__( 'Pause on Hover', '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', 'description' => esc_html__( 'Temporarily pauses shuffling when user hovers over the grid.', 'addronix-addons-for-elementor' ), 'condition' => [ 'auto_shuffle' => 'yes' ], ] ); $this->add_control( 'shuffle_on_click', [ 'label' => esc_html__( 'Click to Shuffle', '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', 'description' => esc_html__( 'Instantly triggers a new shuffle animation when an image is clicked.', 'addronix-addons-for-elementor' ), ] ); $this->end_controls_section(); /* ================================================================= STYLE TAB ================================================================= */ /* ── Style: 1. Section Container ── */ $this->start_controls_section( 'style_container', [ 'label' => esc_html__( 'Section Container', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'wrapper_max_width', [ 'label' => esc_html__( 'Content Max Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => 400, 'max' => 2000 ] ], 'default' => [ 'size' => 1200, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__inner' => 'max-width: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'columns_gap', [ 'label' => esc_html__( 'Columns Gap', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 150 ] ], 'default' => [ 'size' => 40, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__inner' => 'gap: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'wrapper_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'default' => [ 'top' => 60, 'right' => 30, 'bottom' => 60, 'left' => 30, 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'wrapper_background', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero-wrapper', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'wrapper_border', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero-wrapper', 'separator' => 'before', ] ); $this->add_responsive_control( 'wrapper_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'wrapper_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero-wrapper', ] ); $this->end_controls_section(); /* ── Style: 2. Content Box ── */ $this->start_controls_section( 'style_content_box', [ 'label' => esc_html__( 'Content Box', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_style!' => 'grid-only' ], ] ); $this->add_responsive_control( 'content_max_width', [ 'label' => esc_html__( 'Max Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 200, 'max' => 1000 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__content' => 'max-width: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'content_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 3. Subtitle ── */ $this->start_controls_section( 'style_subtitle', [ 'label' => esc_html__( 'Subtitle', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_subtitle' => 'yes', 'layout_style!' => 'grid-only' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'subtitle_typography', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__subtitle', ] ); $this->start_controls_tabs( 'subtitle_style_tabs' ); $this->start_controls_tab( 'subtitle_tab_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'subtitle_color', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__subtitle' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'subtitle_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__subtitle', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'subtitle_tab_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'subtitle_hover_color', [ 'label' => esc_html__( 'Hover Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero-wrapper:hover .aafe-shuffle-hero__subtitle' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'subtitle_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero-wrapper:hover .aafe-shuffle-hero__subtitle', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); // Badge Pill Options $this->add_control( 'heading_badge_style', [ 'label' => esc_html__( 'Pill Badge Styling', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'subtitle_style' => 'badge' ], ] ); $this->add_control( 'badge_bg_color', [ 'label' => esc_html__( 'Badge Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__subtitle.aafe-subtitle--badge' => 'background-color: {{VALUE}};' ], 'condition' => [ 'subtitle_style' => 'badge' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'badge_border', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__subtitle.aafe-subtitle--badge', 'condition' => [ 'subtitle_style' => 'badge' ], ] ); $this->add_responsive_control( 'badge_radius', [ 'label' => esc_html__( 'Badge Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 999, 'right' => 999, 'bottom' => 999, 'left' => 999, 'unit' => 'px', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__subtitle.aafe-subtitle--badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], 'condition' => [ 'subtitle_style' => 'badge' ], ] ); $this->add_responsive_control( 'badge_padding', [ 'label' => esc_html__( 'Badge Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'default' => [ 'top' => 6, 'right' => 16, 'bottom' => 6, 'left' => 16, 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__subtitle.aafe-subtitle--badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], 'condition' => [ 'subtitle_style' => 'badge' ], ] ); $this->add_control( 'badge_dot_color', [ 'label' => esc_html__( 'Dot Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-subtitle-dot' => 'background-color: {{VALUE}};' ], 'condition' => [ 'subtitle_style' => 'badge', 'subtitle_badge_dot' => 'yes' ], ] ); $this->add_responsive_control( 'subtitle_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__subtitle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 4. Title ── */ $this->start_controls_section( 'style_title', [ 'label' => esc_html__( 'Title', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_title' => 'yes', 'layout_style!' => 'grid-only' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__title', ] ); $this->add_control( 'title_gradient', [ 'label' => esc_html__( 'Gradient Title', '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' => 'no', ] ); $this->add_control( 'title_gradient_color_1', [ 'label' => esc_html__( 'First Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'condition' => [ 'title_gradient' => 'yes' ], ] ); $this->add_control( 'title_gradient_color_2', [ 'label' => esc_html__( 'Second Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'condition' => [ 'title_gradient' => 'yes' ], ] ); $this->add_control( 'title_gradient_angle', [ 'label' => esc_html__( 'Angle', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'deg' ], 'range' => [ 'deg' => [ 'min' => 0, 'max' => 360, 'step' => 5 ] ], 'default' => [ 'size' => 135, 'unit' => 'deg' ], 'condition' => [ 'title_gradient' => 'yes' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__title.aafe-title--gradient' => 'background-image: linear-gradient({{SIZE}}deg, {{title_gradient_color_1.VALUE}} 0%, {{title_gradient_color_2.VALUE}} 100%);', ], ] ); $this->start_controls_tabs( 'title_style_tabs', [ 'condition' => [ 'title_gradient!' => 'yes' ] ] ); $this->start_controls_tab( 'title_tab_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__title' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'title_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__title', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'title_tab_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'title_hover_color', [ 'label' => esc_html__( 'Hover Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero-wrapper:hover .aafe-shuffle-hero__title' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'title_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero-wrapper:hover .aafe-shuffle-hero__title', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'title_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'separator' => 'before', 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 16, 'left' => 0, 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 5. Description ── */ $this->start_controls_section( 'style_desc', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_desc' => 'yes', 'layout_style!' => 'grid-only' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__desc', ] ); $this->start_controls_tabs( 'desc_style_tabs' ); $this->start_controls_tab( 'desc_tab_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'desc_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__desc' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'desc_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__desc', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'desc_tab_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'desc_hover_color', [ 'label' => esc_html__( 'Hover Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero-wrapper:hover .aafe-shuffle-hero__desc' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'desc_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero-wrapper:hover .aafe-shuffle-hero__desc', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'desc_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'separator' => 'before', 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 24, 'left' => 0, 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 6. Primary Button ── */ $this->start_controls_section( 'style_primary_button', [ 'label' => esc_html__( 'Primary Button', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_button' => 'yes', 'layout_style!' => 'grid-only' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'btn_typography', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn', ] ); $this->start_controls_tabs( 'btn_style_tabs' ); $this->start_controls_tab( 'btn_tab_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'btn_color', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'btn_background', 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'btn_tab_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'btn_hover_color', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn:hover' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'btn_hover_background', 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn:hover', ] ); $this->add_control( 'btn_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn:hover' => 'border-color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'btn_border', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn', 'separator' => 'before', ] ); $this->add_responsive_control( 'btn_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 8, 'right' => 8, 'bottom' => 8, 'left' => 8, 'unit' => 'px', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'btn_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'default' => [ 'top' => 13, 'right' => 28, 'bottom' => 13, 'left' => 28, 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 7. Secondary Button ── */ $this->start_controls_section( 'style_secondary_button', [ 'label' => esc_html__( 'Secondary Button', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_sec_button' => 'yes', 'layout_style!' => 'grid-only' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'sec_btn_typography', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn-sec', ] ); $this->start_controls_tabs( 'sec_btn_style_tabs' ); $this->start_controls_tab( 'sec_btn_tab_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'sec_btn_color', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn-sec' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'sec_btn_background', 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn-sec', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'sec_btn_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn-sec', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'sec_btn_tab_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'sec_btn_hover_color', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn-sec:hover' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'sec_btn_hover_background', 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn-sec:hover', ] ); $this->add_control( 'sec_btn_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn-sec:hover' => 'border-color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'sec_btn_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn-sec:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'sec_btn_border', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__btn-sec', 'separator' => 'before', ] ); $this->add_responsive_control( 'sec_btn_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 8, 'right' => 8, 'bottom' => 8, 'left' => 8, 'unit' => 'px', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn-sec' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'sec_btn_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'default' => [ 'top' => 13, 'right' => 28, 'bottom' => 13, 'left' => 28, 'unit' => 'px', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btn-sec' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 8. Buttons Spacing ── */ $this->start_controls_section( 'style_buttons_spacing', [ 'label' => esc_html__( 'Buttons Spacing', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_style!' => 'grid-only' ], ] ); $this->add_responsive_control( 'buttons_gap', [ 'label' => esc_html__( 'Gap Between Buttons', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50 ] ], 'default' => [ 'size' => 14, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btns' => 'gap: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'buttons_margin_top', [ 'label' => esc_html__( 'Spacing Above Buttons', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 80 ] ], 'default' => [ 'size' => 24, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__btns' => 'margin-top: {{SIZE}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── Style: 9. Grid & Images ── */ $this->start_controls_section( 'style_grid_images', [ 'label' => esc_html__( 'Grid & Images', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'grid_items_gap', [ 'label' => esc_html__( 'Grid Items Gap', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50 ] ], 'default' => [ 'size' => 12, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__grid' => 'gap: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'img_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 10, 'right' => 10, 'bottom' => 10, 'left' => 10, 'unit' => 'px', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'img_border', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__img', ] ); $this->start_controls_tabs( 'img_style_tabs' ); $this->start_controls_tab( 'img_tab_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'img_opacity', [ 'label' => esc_html__( 'Opacity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.1, 'max' => 1, 'step' => 0.05 ] ], 'default' => [ 'size' => 1, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img' => 'opacity: {{SIZE}};' ], ] ); $this->add_group_control( Group_Control_Css_Filter::get_type(), [ 'name' => 'img_filters', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__img', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'img_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__img', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'img_tab_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'img_hover_opacity', [ 'label' => esc_html__( 'Opacity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.1, 'max' => 1, 'step' => 0.05 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img:hover' => 'opacity: {{SIZE}};' ], ] ); $this->add_group_control( Group_Control_Css_Filter::get_type(), [ 'name' => 'img_hover_filters', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__img:hover', ] ); $this->add_control( 'img_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img:hover' => 'border-color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'img_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-shuffle-hero__img:hover', ] ); $this->add_control( 'img_hover_zoom', [ 'label' => esc_html__( 'Hover Zoom (Scale)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.0, 'max' => 1.25, 'step' => 0.01 ] ], 'default' => [ 'size' => 1.05, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img:hover' => '--aafe-img-hover-scale: {{SIZE}};' ], ] ); $this->add_control( 'img_hover_lift', [ 'label' => esc_html__( 'Hover Lift (px)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, 'step' => 1 ] ], 'default' => [ 'size' => 5, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img:hover' => '--aafe-img-hover-lift: -{{SIZE}}px;' ], ] ); $this->add_control( 'img_hover_duration', [ 'label' => esc_html__( 'Hover Transition (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 150, 'max' => 1000, 'step' => 50 ] ], 'default' => [ 'size' => 350, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-shuffle-hero__img' => '--aafe-img-transition: {{SIZE}}ms;' ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $layout_style = ! empty( $settings['layout_style'] ) ? $settings['layout_style'] : 'left-right'; $is_reverse_mobile = ( 'yes' === ( $settings['reverse_columns_mobile'] ?? 'no' ) ); $reverse_mobile_class = $is_reverse_mobile ? 'aafe-reverse-mobile aafe-reverse-mobile-yes' : 'aafe-reverse-mobile-no'; $easing_class = 'aafe-easing-' . ( ! empty( $settings['anim_easing'] ) ? $settings['anim_easing'] : 'ease-out' ); $this->add_render_attribute( 'wrapper', [ 'class' => [ 'aafe-shuffle-hero-wrapper', $reverse_mobile_class, 'aafe-layout-' . $layout_style ], ] ); // Shuffle data attributes $interval = ! empty( $settings['shuffle_interval'] ) ? absint( $settings['shuffle_interval'] ) : 3000; $anim_duration = isset( $settings['anim_duration']['size'] ) ? absint( $settings['anim_duration']['size'] ) : 1200; $auto_shuffle = ( 'yes' === ( $settings['auto_shuffle'] ?? 'yes' ) ) ? 'yes' : 'no'; $pause_hover = ( 'yes' === ( $settings['pause_on_hover'] ?? 'yes' ) ) ? 'yes' : 'no'; $shuffle_click = ( 'yes' === ( $settings['shuffle_on_click'] ?? 'yes' ) ) ? 'yes' : 'no'; $this->add_render_attribute( 'grid', [ 'class' => [ 'aafe-shuffle-hero__grid', $easing_class ], 'data-interval' => $interval, 'data-duration' => $anim_duration, 'data-auto-shuffle' => $auto_shuffle, 'data-pause-hover' => $pause_hover, 'data-shuffle-click' => $shuffle_click, ] ); // Tags $sub_tag = ! empty( $settings['subtitle_tag'] ) ? tag_escape( $settings['subtitle_tag'] ) : 'span'; $title_tag = ! empty( $settings['title_tag'] ) ? tag_escape( $settings['title_tag'] ) : 'h2'; $desc_tag = ! empty( $settings['desc_tag'] ) ? tag_escape( $settings['desc_tag'] ) : 'p'; // Subtitle classes $is_badge = ( 'badge' === ( $settings['subtitle_style'] ?? 'normal' ) ); $sub_class = 'aafe-shuffle-hero__subtitle' . ( $is_badge ? ' aafe-subtitle--badge' : '' ); // Title classes $is_title_gradient = ( 'yes' === ( $settings['title_gradient'] ?? 'no' ) ); $title_class = 'aafe-shuffle-hero__title' . ( $is_title_gradient ? ' aafe-title--gradient' : '' ); // Primary button attributes $has_btn = ( 'yes' === ( $settings['show_button'] ?? 'yes' ) ) && ! empty( $settings['button_text'] ); if ( $has_btn ) { $this->add_render_attribute( 'btn_primary', 'class', 'aafe-shuffle-hero__btn' ); if ( ! empty( $settings['button_url']['url'] ) ) { $this->add_link_attributes( 'btn_primary', $settings['button_url'] ); } } // Secondary button attributes $has_sec_btn = ( 'yes' === ( $settings['show_sec_button'] ?? 'no' ) ) && ! empty( $settings['sec_button_text'] ); if ( $has_sec_btn ) { $this->add_render_attribute( 'btn_secondary', 'class', 'aafe-shuffle-hero__btn-sec' ); if ( ! empty( $settings['sec_button_url']['url'] ) ) { $this->add_link_attributes( 'btn_secondary', $settings['sec_button_url'] ); } } // Process images list based on image_source mode (Gallery vs Repeater) $curated_demo_images = [ 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1517838277536-f5f99be501cd?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1571019614242-c5c5dee9f50b?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1540497077202-7c8a3999166f?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1518611012118-696072aa579a?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1574680096145-d05b474e2155?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1574680096145-d05b474e2155?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1518310383802-640c2de311b2?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1583454110551-21f2fa2afe61?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1526506118085-60ce8714f8c5?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1599058945522-28d584b6f0ff?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1550345332-09e3ac987658?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1549576490-b0b4831ef60a?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1594737625785-a6cbdabd333c?w=600&auto=format&fit=crop&q=80', 'https://images.unsplash.com/photo-1517836357463-d25dfeac3438?w=600&auto=format&fit=crop&q=80', ]; $images_to_display = []; $source_mode = $settings['image_source'] ?? 'gallery'; if ( 'repeater' === $source_mode ) { if ( ! empty( $settings['images_list'] ) ) { foreach ( $settings['images_list'] as $item ) { $url = ! empty( $item['grid_image']['url'] ) ? $item['grid_image']['url'] : ''; if ( $url ) { $images_to_display[] = [ 'url' => $url, 'link' => $item['image_link']['url'] ?? '', 'ext' => ! empty( $item['image_link']['is_external'] ), 'nof' => ! empty( $item['image_link']['nofollow'] ), 'title' => $item['image_title'] ?? '', 'lightbox' => false, 'id' => $item['_id'] ?? '', ]; } } } } else { // Gallery mode (default) if ( ! empty( $settings['gallery_images'] ) && is_array( $settings['gallery_images'] ) ) { $size = ! empty( $settings['gallery_image_size_size'] ) ? $settings['gallery_image_size_size'] : 'large'; $gallery_link_mode = $settings['gallery_link_to'] ?? 'none'; $custom_url = $settings['gallery_custom_url']['url'] ?? ''; foreach ( $settings['gallery_images'] as $index => $g_item ) { $img_id = ! empty( $g_item['id'] ) ? absint( $g_item['id'] ) : 0; $url = ''; if ( $img_id ) { $url = wp_get_attachment_image_url( $img_id, $size ); } if ( ! $url && ! empty( $g_item['url'] ) ) { $url = $g_item['url']; } if ( ! $url ) { continue; } $link_url = ''; $is_lb = false; if ( 'file' === $gallery_link_mode ) { $link_url = wp_get_attachment_image_url( $img_id, 'full' ) ?: $url; $is_lb = ( 'no' !== ( $settings['open_lightbox'] ?? 'default' ) ); } elseif ( 'custom' === $gallery_link_mode && $custom_url ) { $link_url = $custom_url; } $images_to_display[] = [ 'url' => $url, 'link' => $link_url, 'ext' => ! empty( $settings['gallery_custom_url']['is_external'] ), 'nof' => ! empty( $settings['gallery_custom_url']['nofollow'] ), 'title' => get_the_title( $img_id ) ?: "Gallery image {$index}", 'lightbox' => $is_lb, 'id' => $img_id ?: $index, ]; } } } // Fallback to curated demo photos if none selected yet if ( empty( $images_to_display ) ) { foreach ( $curated_demo_images as $idx => $demo_url ) { $images_to_display[] = [ 'url' => $demo_url, 'link' => '', 'ext' => false, 'nof' => false, 'title' => 'Demo Hero Item', 'lightbox' => false, 'id' => 'demo_' . $idx, ]; } } ?>