> Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -100, 'max' => 40, 'step' => 1, ], ], 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next' => 'right: {{SIZE}}{{UNIT}};', ], ] ); $this->start_controls_tabs('tabs_arrows_style'); $this->start_controls_tab( 'tab_arrows_normal', [ 'label' => __('Normal', 'essential-addons-elementor'), ] ); $this->add_control( 'arrows_bg_color_normal', [ 'label' => __('Background Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next, {{WRAPPER}} .swiper-container .swiper-button-prev' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'arrows_color_normal', [ 'label' => __('Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next, {{WRAPPER}} .swiper-container .swiper-button-prev' => 'color: {{VALUE}};', '{{WRAPPER}} .swiper-container .swiper-button-next svg, {{WRAPPER}} .swiper-container .swiper-button-prev svg' => 'fill: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'arrows_border_normal', 'label' => __('Border', 'essential-addons-elementor'), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .swiper-container .swiper-button-next, {{WRAPPER}} .swiper-container .swiper-button-prev', ] ); $this->add_control( 'arrows_border_radius_normal', [ 'label' => __('Border Radius', 'essential-addons-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next, {{WRAPPER}} .swiper-container .swiper-button-prev' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_arrows_hover', [ 'label' => __('Hover', 'essential-addons-elementor'), ] ); $this->add_control( 'arrows_bg_color_hover', [ 'label' => __('Background Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next:hover, {{WRAPPER}} .swiper-container .swiper-button-prev:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'arrows_color_hover', [ 'label' => __('Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next:hover, {{WRAPPER}} .swiper-container .swiper-button-prev:hover' => 'color: {{VALUE}};', '{{WRAPPER}} .swiper-container .swiper-button-next:hover svg, {{WRAPPER}} .swiper-container .swiper-button-prev:hover svg' => 'fill: {{VALUE}};', ], ] ); $this->add_control( 'arrows_border_color_hover', [ 'label' => __('Border Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next:hover, {{WRAPPER}} .swiper-container .swiper-button-prev:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'arrows_padding', [ 'label' => __('Padding', 'essential-addons-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-button-next, {{WRAPPER}} .swiper-container .swiper-button-prev' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); /** * Style Tab: Dots */ $this->start_controls_section( 'section_dots_style', [ 'label' => __('Dots', 'essential-addons-elementor'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'dots' => 'yes', ], ] ); $this->add_control( 'dots_position', [ 'label' => __('Position', 'essential-addons-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'absolute' => __('Inside', 'essential-addons-elementor'), 'initial' => __('Outside', 'essential-addons-elementor'), ], 'default' => 'initial', 'selectors' => [ '{{WRAPPER}} .swiper-pagination' => 'position: {{VALUE}}' ] ] ); $this->add_responsive_control( 'dots_size', [ 'label' => __('Size', 'essential-addons-elementor'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 2, 'max' => 40, 'step' => 1, ], ], 'size_units' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}', ], ] ); $this->add_responsive_control( 'dots_spacing', [ 'label' => __('Spacing', 'essential-addons-elementor'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1, 'max' => 30, 'step' => 1, ], ], 'size_units' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet' => 'margin-left: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}}', ], ] ); $this->start_controls_tabs('tabs_dots_style'); $this->start_controls_tab( 'tab_dots_normal', [ 'label' => __('Normal', 'essential-addons-elementor'), ] ); $this->add_control( 'dots_color_normal', [ 'label' => __('Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet' => 'background: {{VALUE}};', ], ] ); $this->add_control( 'active_dot_color_normal', [ 'label' => __('Active Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet-active' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'dots_border_normal', 'label' => __('Border', 'essential-addons-elementor'), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .swiper-container .swiper-pagination-bullet', ] ); $this->add_control( 'dots_border_radius_normal', [ 'label' => __('Border Radius', 'essential-addons-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'dots_padding', [ 'label' => __('Padding', 'essential-addons-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'allowed_dimensions' => 'vertical', 'placeholder' => [ 'top' => '', 'right' => 'auto', 'bottom' => '', 'left' => 'auto', ], 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullets' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_dots_hover', [ 'label' => __('Hover', 'essential-addons-elementor'), ] ); $this->add_control( 'dots_color_hover', [ 'label' => __('Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet:hover' => 'background: {{VALUE}};', ], ] ); $this->add_control( 'dots_border_color_hover', [ 'label' => __('Border Color', 'essential-addons-elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container .swiper-pagination-bullet:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style (avatar style) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_twitter_feed_avatar_style', [ 'label' => esc_html__('Avatar', 'essential-addons-elementor'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_twitter_feed_show_avatar' => 'true', ], ] ); $this->add_control( 'eael_twitter_feed_avatar_width', [ 'label' => __('Width', 'essential-addons-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 5, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 38, ], 'selectors' => [ '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'eael_twitter_feed_avatar_height', [ 'label' => __('Height', 'essential-addons-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 5, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'eael_twitter_feed_avatar_border', 'label' => __('Border', 'essential-addons-elementor'), 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img', ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_twitter_feed_avatar_shadow', 'label' => __('Box Shadow', 'essential-addons-elementor'), 'selector' => '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-avatar img', ] ); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style (Icon style) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_twitter_feed_icon_style', [ 'label' => esc_html__('Icon', 'essential-addons-elementor'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_twitter_feed_show_icon' => 'true', ], ] ); $this->add_control( 'eael_section_twitter_feed_icon_size', [ 'label' => __('Font Size', 'essential-addons-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 5, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-icon' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'eael_section_twitter_feed_icon_color', [ 'label' => __('Color', 'essential-addons-elementor'), 'type' => \Elementor\Controls_Manager::COLOR, 'scheme' => [ 'type' => \Elementor\Core\Schemes\Color::get_type(), 'value' => \Elementor\Core\Schemes\Color::COLOR_1, ], 'selectors' => [ '{{WRAPPER}} .eael-twitter-feed-item .eael-twitter-feed-item-icon' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $render_html = $this->twitter_feed_render_items( $this->get_id(), $settings, 'swiper-slide' ); if ( empty( $render_html ) ) { return; } $this->add_render_attribute( 'eael-twitter-feed-carousel-wrap', [ 'data-items' => $this->get_settings( 'items' )['size'], 'data-items-tablet' => isset( $this->get_settings( 'items_tablet' )['size'] ) ? $this->get_settings( 'items_tablet' )['size'] : 2, 'data-items-mobile' => isset( $this->get_settings( 'items_mobile' )['size'] ) ? $this->get_settings( 'items_mobile' )['size'] : 1, 'data-margin' => $this->get_settings( 'margin' )['size'], 'data-margin-tablet' => isset( $this->get_settings( 'margin_tablet' )['size'] ) ? $this->get_settings( 'margin_tablet' )['size'] : 10, 'data-margin-mobile' => isset( $this->get_settings( 'margin_mobile' )['size'] ) ? $this->get_settings( 'margin_mobile' )['size'] : 10, 'data-effect' => $settings['carousel_effect'], 'data-speed' => $settings['slider_speed']['size'], 'data-autoplay' => ( $settings['autoplay'] == 'yes' && ! empty( $settings['autoplay_speed']['size'] ) ) ? $settings['autoplay_speed']['size'] : '0', 'data-pause-on-hover' => ( $settings['pause_on_hover'] == 'yes' ? 'true' : 'false' ), 'data-dots' => '1', ] ); echo '