lt' => 'flex-start', 'options' => array( 'flex-start' => array( 'title' => esc_html__( 'Top', 'jet-elements' ), 'icon' => 'eicon-v-align-top', ), 'center' => array( 'title' => esc_html__( 'Center', 'jet-elements' ), 'icon' => 'eicon-v-align-middle', ), 'flex-end' => array( 'title' => esc_html__( 'Bottom', 'jet-elements' ), 'icon' => 'eicon-v-align-bottom', ), ), 'selectors' => array( '{{WRAPPER}} '. $css_scheme['after_container'] => 'align-items: {{VALUE}};', ), ), 25 ); $this->_add_control( 'after_label_color', array( 'label' => esc_html__( 'Color', 'jet-elements' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['after_label'] => 'color: {{VALUE}}', ), ), 25 ); $this->_add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'after_label_typography', 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} ' . $css_scheme['after_label'], ), 50 ); $this->_add_group_control( Group_Control_Background::get_type(), array( 'name' => 'after_label_background', 'selector' => '{{WRAPPER}} ' . $css_scheme['after_label'], 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2, ), ), ), ), 25 ); $this->_add_responsive_control( 'after_label_margin', array( 'label' => __( 'Margin', 'jet-elements' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['after_label'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ), 75 ); $this->_add_responsive_control( 'after_label_padding', array( 'label' => __( 'Padding', 'jet-elements' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['after_label'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ), 50 ); $this->_end_controls_tab(); $this->_end_controls_tabs(); $this->_end_controls_section(); /** * Handle Style Section */ $this->_start_controls_section( 'section_image_comparison_handle_style', array( 'label' => esc_html__( 'Handle', 'jet-elements' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ) ); $this->_add_responsive_control( 'handle_control_alignment', array( 'label' => esc_html__( 'Alignment', 'jet-elements' ), 'type' => Controls_Manager::CHOOSE, 'default' => 'center', 'label_block' => false, 'options' => array( 'flex-start' => array( 'title' => esc_html__( 'Top', 'jet-elements' ), 'icon' => 'eicon-v-align-top', ), 'center' => array( 'title' => esc_html__( 'Center', 'jet-elements' ), 'icon' => 'eicon-v-align-middle', ), 'flex-end' => array( 'title' => esc_html__( 'Bottom', 'jet-elements' ), 'icon' => 'eicon-v-align-bottom', ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller' => 'align-self: {{VALUE}};', ), ), 25 ); $this->_add_responsive_control( 'handle_control_width', array( 'label' => esc_html__( 'Control Width', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 20, 'max' => 100, ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] => 'width: {{SIZE}}{{UNIT}}; margin-left: calc( {{SIZE}}{{UNIT}} / -2 );', '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-control' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-controller' => 'width: {{SIZE}}{{UNIT}};', ) ), 50 ); $this->_add_responsive_control( 'handle_control_height', array( 'label' => esc_html__( 'Height', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 20, 'max' => 100, ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-controller' => 'height: {{SIZE}}{{UNIT}};', ) ), 50 ); $this->_add_responsive_control( 'handle_divider_margin', array( 'label' => __( 'Margin', 'jet-elements' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-controller' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'separator' => 'before', ), 100 ); $this->_add_responsive_control( 'handle_divider_radius', array( 'label' => __( 'Border Radius', 'jet-elements' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-controller' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ), 75 ); $this->_start_controls_tabs( 'tabs_handle_styles' ); $this->_start_controls_tab( 'tab_handle_normal', array( 'label' => esc_html__( 'Normal', 'jet-elements' ), ) ); $this->_add_group_control( Group_Control_Background::get_type(), array( 'name' => 'handle_control_background', 'selector' => '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller', 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1, ), ), ), ), 25 ); $this->_add_control( 'handle_arrow_color', array( 'label' => esc_html__( 'Arrow Color', 'jet-elements' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller i' => 'color: {{VALUE}}', '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller i svg *' => 'fill: {{VALUE}}', ), ), 25 ); $this->_add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'handle_control_box_shadow', 'selector' => '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller', ), 100 ); $this->_end_controls_tab(); $this->_start_controls_tab( 'tab_handle_hover', array( 'label' => esc_html__( 'Hover', 'jet-elements' ), ) ); $this->_add_group_control( Group_Control_Background::get_type(), array( 'name' => 'handle_control_background_hover', 'selector' => '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ':hover .jx-controller', 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2, ), ), ), ), 25 ); $this->_add_control( 'handle_arrow_color_hover', array( 'label' => esc_html__( 'Arrow Color', 'jet-elements' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ':hover .jx-controller i' => 'color: {{VALUE}}', '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ':hover .jx-controller i svg *' => 'fill: {{VALUE}}', ), ), 25 ); $this->_add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'handle_control_box_shadow_hover', 'selector' => '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ':hover .jx-controller', ), 100 ); $this->_end_controls_tab(); $this->_end_controls_tabs(); $this->_add_control( 'heading_handle_divider_style', array( 'label' => esc_html__( 'Handle Divider', 'jet-elements' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ), 25 ); $this->_add_responsive_control( 'handle_divider_width', array( 'label' => esc_html__( 'Divider Width', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 1, 'max' => 10, ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-control:before' => 'width: {{SIZE}}{{UNIT}}; margin-left: calc( {{SIZE}}{{UNIT}}/-2);', ) ), 50 ); $this->_add_control( 'handle_divider_color', array( 'label' => esc_html__( 'Divider Color', 'jet-elements' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-control:before' => 'background-color: {{VALUE}};', ), ), 25 ); $this->_add_control( 'heading_handle_arrow_style', array( 'label' => esc_html__( 'Handle Arrow', 'jet-elements' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ), 50 ); $this->_add_responsive_control( 'handle_arrow_size', array( 'label' => esc_html__( 'Arrow Size', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', 'em' ), 'range' => array( 'px' => array( 'min' => 1, 'max' => 100, ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller i' => 'font-size: {{SIZE}}{{UNIT}}', '{{WRAPPER}} ' . $css_scheme['jx_instance'] . ' .jx-controller i svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}', ), ), 50 ); $this->_add_responsive_control( 'handle_arrow_margin', array( 'label' => __( 'Margin', 'jet-elements' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['handle'] . ' .jx-controller i' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ), 50 ); $this->_end_controls_section(); /* * Arrows section */ $this->_start_controls_section( 'section_arrows_style', array( 'label' => esc_html__( 'Carousel Arrows', 'jet-elements' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ) ); $this->_start_controls_tabs( 'tabs_arrows_style' ); $this->_start_controls_tab( 'tab_arrows_normal', array( 'label' => esc_html__( 'Normal', 'jet-elements' ), ) ); $this->_add_group_control( \Jet_Group_Control_Box_Style::get_type(), array( 'name' => 'arrows_style', 'label' => esc_html__( 'Arrows Style', 'jet-elements' ), 'selector' => '{{WRAPPER}} ' . $css_scheme['arrow'], 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1, ), ), ), ), 25 ); $this->_end_controls_tab(); $this->_start_controls_tab( 'tab_arrows_hover', array( 'label' => esc_html__( 'Hover', 'jet-elements' ), ), 25 ); $this->_add_group_control( \Jet_Group_Control_Box_Style::get_type(), array( 'name' => 'arrows_hover_style', 'label' => esc_html__( 'Arrows Style', 'jet-elements' ), 'selector' => '{{WRAPPER}} ' . $css_scheme['arrow'] . ':hover', 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_4, ), ), ), ), 25 ); $this->_end_controls_tab(); $this->_end_controls_tabs(); $this->_add_control( 'prev_arrow_position', array( 'label' => esc_html__( 'Prev Arrow Position', 'jet-elements' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ), 75 ); $this->_add_control( 'prev_vert_position', array( 'label' => esc_html__( 'Vertical Position by', 'jet-elements' ), 'type' => Controls_Manager::SELECT, 'default' => 'top', 'options' => array( 'top' => esc_html__( 'Top', 'jet-elements' ), 'bottom' => esc_html__( 'Bottom', 'jet-elements' ), ), ), 75 ); $this->_add_responsive_control( 'prev_top_position', array( 'label' => esc_html__( 'Top Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'prev_vert_position' => 'top', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.prev-arrow' => 'top: {{SIZE}}{{UNIT}}; bottom: auto;', ), ), 75 ); $this->_add_responsive_control( 'prev_bottom_position', array( 'label' => esc_html__( 'Bottom Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'prev_vert_position' => 'bottom', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.prev-arrow' => 'bottom: {{SIZE}}{{UNIT}}; top: auto;', ), ), 75 ); $this->_add_control( 'prev_hor_position', array( 'label' => esc_html__( 'Horizontal Position by', 'jet-elements' ), 'type' => Controls_Manager::SELECT, 'default' => 'left', 'options' => array( 'left' => esc_html__( 'Left', 'jet-elements' ), 'right' => esc_html__( 'Right', 'jet-elements' ), ), ), 75 ); $this->_add_responsive_control( 'prev_left_position', array( 'label' => esc_html__( 'Left Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'prev_hor_position' => 'left', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.prev-arrow' => 'left: {{SIZE}}{{UNIT}}; right: auto;', ), ), 75 ); $this->_add_responsive_control( 'prev_right_position', array( 'label' => esc_html__( 'Right Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'prev_hor_position' => 'right', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.prev-arrow' => 'right: {{SIZE}}{{UNIT}}; left: auto;', ), ), 75 ); $this->_add_control( 'next_arrow_position', array( 'label' => esc_html__( 'Next Arrow Position', 'jet-elements' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ), 75 ); $this->_add_control( 'next_vert_position', array( 'label' => esc_html__( 'Vertical Position by', 'jet-elements' ), 'type' => Controls_Manager::SELECT, 'default' => 'top', 'options' => array( 'top' => esc_html__( 'Top', 'jet-elements' ), 'bottom' => esc_html__( 'Bottom', 'jet-elements' ), ), ), 75 ); $this->_add_responsive_control( 'next_top_position', array( 'label' => esc_html__( 'Top Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'next_vert_position' => 'top', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.next-arrow' => 'top: {{SIZE}}{{UNIT}}; bottom: auto;', ), ), 75 ); $this->_add_responsive_control( 'next_bottom_position', array( 'label' => esc_html__( 'Bottom Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'next_vert_position' => 'bottom', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.next-arrow' => 'bottom: {{SIZE}}{{UNIT}}; top: auto;', ), ), 75 ); $this->_add_control( 'next_hor_position', array( 'label' => esc_html__( 'Horizontal Position by', 'jet-elements' ), 'type' => Controls_Manager::SELECT, 'default' => 'right', 'options' => array( 'left' => esc_html__( 'Left', 'jet-elements' ), 'right' => esc_html__( 'Right', 'jet-elements' ), ), ), 75 ); $this->_add_responsive_control( 'next_left_position', array( 'label' => esc_html__( 'Left Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'next_hor_position' => 'left', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.next-arrow' => 'left: {{SIZE}}{{UNIT}}; right: auto;', ), ), 75 ); $this->_add_responsive_control( 'next_right_position', array( 'label' => esc_html__( 'Right Indent', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%', 'em' ), 'range' => array( 'px' => array( 'min' => -400, 'max' => 400, ), '%' => array( 'min' => -100, 'max' => 100, ), 'em' => array( 'min' => -50, 'max' => 50, ), ), 'condition' => array( 'next_hor_position' => 'right', ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['arrow'] . '.next-arrow' => 'right: {{SIZE}}{{UNIT}}; left: auto;', ), ), 75 ); $this->_end_controls_section(); /* * Dots section */ $this->_start_controls_section( 'section_dots_style', array( 'label' => esc_html__( 'Carousel Dots', 'jet-elements' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ) ); $this->_start_controls_tabs( 'tabs_dots_style' ); $this->_start_controls_tab( 'tab_dots_normal', array( 'label' => esc_html__( 'Normal', 'jet-elements' ), ) ); $this->_add_group_control( \Jet_Group_Control_Box_Style::get_type(), array( 'name' => 'dots_style', 'label' => esc_html__( 'Dots Style', 'jet-elements' ), 'selector' => '{{WRAPPER}} ' . $css_scheme['dots'] .' li span', 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3, ), ), ), 'exclude' => array( 'box_font_color', 'box_font_size', ), ), 25 ); $this->_end_controls_tab(); $this->_start_controls_tab( 'tab_dots_hover', array( 'label' => esc_html__( 'Hover', 'jet-elements' ), ) ); $this->_add_group_control( \Jet_Group_Control_Box_Style::get_type(), array( 'name' => 'dots_style_hover', 'label' => esc_html__( 'Dots Style', 'jet-elements' ), 'selector' => '{{WRAPPER}} ' . $css_scheme['dots'] . ' li span:hover', 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1, ), ), ), 'exclude' => array( 'box_font_color', 'box_font_size', ), ), 25 ); $this->_end_controls_tab(); $this->_start_controls_tab( 'tab_dots_active', array( 'label' => esc_html__( 'Active', 'jet-elements' ), ) ); $this->_add_group_control( \Jet_Group_Control_Box_Style::get_type(), array( 'name' => 'dots_style_active', 'label' => esc_html__( 'Dots Style', 'jet-elements' ), 'selector' => '{{WRAPPER}} ' . $css_scheme['dots'] .' li.slick-active span', 'fields_options' => array( 'color' => array( 'scheme' => array( 'type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_4, ), ), ), 'exclude' => array( 'box_font_color', 'box_font_size', ), ), 25 ); $this->_end_controls_tab(); $this->_end_controls_tabs(); $this->_add_responsive_control( 'dots_alignment', array( 'label' => esc_html__( 'Alignment', 'jet-elements' ), 'type' => Controls_Manager::CHOOSE, 'default' => 'center', 'options' => array( 'flex-start' => array( 'title' => esc_html__( 'Start', 'jet-elements' ), 'icon' => ! is_rtl() ? 'eicon-h-align-left' : 'eicon-h-align-right', ), 'center' => array( 'title' => esc_html__( 'Center', 'jet-elements' ), 'icon' => 'eicon-h-align-center', ), 'flex-end' => array( 'title' => esc_html__( 'End', 'jet-elements' ), 'icon' => ! is_rtl() ? 'eicon-h-align-right' : 'eicon-h-align-left', ), ), 'separator' => 'before', 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['dots'] => 'justify-content: {{VALUE}};', ), ), 50 ); $this->_add_control( 'dots_gap', array( 'label' => esc_html__( 'Gap', 'jet-elements' ), 'type' => Controls_Manager::SLIDER, 'default' => array( 'size' => 5, 'unit' => 'px', ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['dots'] . ' li' => 'padding-left: {{SIZE}}{{UNIT}}; padding-right: {{SIZE}}{{UNIT}}', ), ), 25 ); $this->_add_control( 'dots_margin', array( 'label' => esc_html__( 'Dots Box Margin', 'jet-elements' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['dots'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ), 50 ); $this->_end_controls_section(); } /** * [render description] * @return [type] [description] */ protected function render() { $this->_context = 'render'; $this->_open_wrap(); include $this->_get_global_template( 'index' ); $this->_close_wrap(); } /** * Generate setting json * * @return string */ public function generate_setting_json() { $settings = $this->get_settings(); $widget_id = $this->get_id(); $instance_settings = array( 'slidesToShow' => array( 'desktop' => absint( $settings['slides_to_show'] ) ), 'autoplaySpeed' => absint( $settings['autoplay_speed'] ), 'autoplay' => filter_var( $settings['autoplay'], FILTER_VALIDATE_BOOLEAN ), 'pauseOnHover' => filter_var( $settings['pause_on_hover'], FILTER_VALIDATE_BOOLEAN ), 'speed' => absint( $settings['speed'] ), 'arrows' => filter_var( $settings['arrows'], FILTER_VALIDATE_BOOLEAN ), 'dots' => filter_var( $settings['dots'], FILTER_VALIDATE_BOOLEAN ), 'slidesToScroll' => absint( $settings['slides_to_scroll'] ), 'prevArrow' => '.jet-image-comparison__prev-arrow-' . $widget_id, 'nextArrow' => '.jet-image-comparison__next-arrow-' . $widget_id, 'rtl' => is_rtl(), ); if ( 'fade' === $settings['effect'] ) { $instance_settings['fade'] = true; } $instance_settings = json_encode( $instance_settings ); return sprintf( 'data-settings=\'%1$s\'', $instance_settings ); } }