upk_is_edit_mode()) { return ['swiper', 'upk-all-styles']; } else { return ['swiper', 'upk-font', 'upk-paradox-slider']; } } public function get_script_depends() { if ( $this->upk_is_edit_mode() ) { return [ 'swiper', 'upk-all-scripts' ]; } else { return [ 'swiper', 'upk-paradox-slider' ]; } } public function get_custom_help_url() { return 'https://youtu.be/2ZYnLz__uA4'; } public function get_query() { return $this->_query; } public function has_widget_inner_wrapper(): bool { return ! \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); } protected function register_controls() { $this->start_controls_section( 'section_content_layout', [ 'label' => esc_html__('Layout', 'ultimate-post-kit'), ] ); $this->add_responsive_control( 'item_height', [ 'label' => esc_html__('Height', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'vh' ], 'range' => [ 'px' => [ 'min' => 200, 'max' => 1080, ], 'vh' => [ 'min' => 10, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-item' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'content_width', [ 'label' => esc_html__('Content Max Width', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 200, 'max' => 1200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-content-box' => 'max-width: {{SIZE}}px;', ], ] ); $this->add_control( 'content_alignment', [ 'label' => __( 'Content Alignment', 'ultimate-post-kit' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'ultimate-post-kit' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'ultimate-post-kit' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'ultimate-post-kit' ), 'icon' => 'eicon-text-align-right', ], ], 'prefix_class' => 'upk-content--', 'render_type' => 'template', ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'primary_thumbnail', 'exclude' => ['custom'], 'default' => 'full', ] ); $this->add_control( 'hr_1', [ 'type' => Controls_Manager::DIVIDER, ] ); //Global Title Controls $this->register_title_controls(); $this->register_text_controls(); $this->add_control( 'show_category', [ 'label' => esc_html__('Show Category', 'ultimate-post-kit'), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); $this->add_control( 'show_author', [ 'label' => esc_html__('Show Author', 'ultimate-post-kit'), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); //Global Date Controls $this->register_date_controls(); $this->add_control( 'meta_separator', [ 'label' => __('Separator', 'ultimate-post-kit'), 'type' => Controls_Manager::TEXT, 'default' => '.', 'label_block' => false, ] ); //Global Reading Time Controls $this->register_reading_time_controls(); $this->add_control( 'global_link', [ 'label' => __('Item Wrapper Link', 'ultimate-post-kit'), 'type' => Controls_Manager::SWITCHER, 'prefix_class' => 'upk-global-link-', 'description' => __('Be aware! When Item Wrapper Link activated then title link and read more link will not work', 'ultimate-post-kit'), 'separator' => 'before' ] ); $this->end_controls_section(); // Query Settings $this->start_controls_section( 'section_post_query_builder', [ 'label' => __( 'Query', 'ultimate-post-kit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'item_limit', [ 'label' => esc_html__('Item Limit', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1, 'max' => 20, ], ], 'default' => [ 'size' => 3, ], 'condition' => [ 'posts_source!' => 'current_query', ] ] ); $this->register_query_builder_controls(); $this->end_controls_section(); $this->start_controls_section( 'section_content_navigation', [ 'label' => __( 'Navigation', 'ultimate-post-kit' ), ] ); $this->add_control( 'navigation', [ 'label' => __( 'Navigation', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => 'both', 'options' => [ 'both' => esc_html__( 'Arrows and Dots', 'ultimate-post-kit' ), 'arrows-fraction' => esc_html__( 'Arrows and Fraction', 'ultimate-post-kit' ), 'arrows' => esc_html__( 'Arrows', 'ultimate-post-kit' ), 'dots' => esc_html__( 'Dots', 'ultimate-post-kit' ), 'progressbar' => esc_html__( 'Progress', 'ultimate-post-kit' ), 'none' => esc_html__( 'None', 'ultimate-post-kit' ), ], 'prefix_class' => 'upk-navigation-type-', 'render_type' => 'template', ] ); $this->add_control( 'dynamic_bullets', [ 'label' => __( 'Dynamic Bullets?', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, 'condition' => [ 'navigation' => [ 'dots', 'both' ], ], ] ); $this->add_control( 'show_scrollbar', [ 'label' => __( 'Show Scrollbar?', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, ] ); $this->add_control( 'both_position', [ 'label' => __( 'Arrows and Dots Position', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => 'center', 'options' => ultimate_post_kit_navigation_position(), 'condition' => [ 'navigation' => 'both', ], ] ); $this->add_control( 'arrows_fraction_position', [ 'label' => __( 'Arrows and Fraction Position', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => 'center', 'options' => ultimate_post_kit_navigation_position(), 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_control( 'arrows_position', [ 'label' => __( 'Arrows Position', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => 'center', 'options' => ultimate_post_kit_navigation_position(), 'condition' => [ 'navigation' => 'arrows', ], ] ); $this->add_control( 'dots_position', [ 'label' => __( 'Dots Position', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => 'bottom-center', 'options' => ultimate_post_kit_pagination_position(), 'condition' => [ 'navigation' => 'dots', ], ] ); $this->add_control( 'progress_position', [ 'label' => __( 'Progress Position', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => 'bottom', 'options' => [ 'bottom' => esc_html__('Bottom', 'ultimate-post-kit'), 'top' => esc_html__('Top', 'ultimate-post-kit'), ], 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_control( 'nav_arrows_icon', [ 'label' => esc_html__( 'Arrows Icon', 'ultimate-post-kit' ), 'type' => Controls_Manager::SELECT, 'default' => '0', 'options' => [ '0' => esc_html__( 'Default', 'ultimate-post-kit' ), '1' => esc_html__('Style 1', 'ultimate-post-kit'), '2' => esc_html__('Style 2', 'ultimate-post-kit'), '3' => esc_html__('Style 3', 'ultimate-post-kit'), '4' => esc_html__('Style 4', 'ultimate-post-kit'), '5' => esc_html__('Style 5', 'ultimate-post-kit'), '6' => esc_html__('Style 6', 'ultimate-post-kit'), '7' => esc_html__('Style 7', 'ultimate-post-kit'), '8' => esc_html__('Style 8', 'ultimate-post-kit'), '9' => esc_html__('Style 9', 'ultimate-post-kit'), '10' => esc_html__('Style 10', 'ultimate-post-kit'), '11' => esc_html__('Style 11', 'ultimate-post-kit'), '12' => esc_html__('Style 12', 'ultimate-post-kit'), '13' => esc_html__('Style 13', 'ultimate-post-kit'), '14' => esc_html__('Style 14', 'ultimate-post-kit'), '15' => esc_html__('Style 15', 'ultimate-post-kit'), '16' => esc_html__('Style 16', 'ultimate-post-kit'), '17' => esc_html__('Style 17', 'ultimate-post-kit'), '18' => esc_html__('Style 18', 'ultimate-post-kit'), 'circle-1' => esc_html__('Style 19', 'ultimate-post-kit'), 'circle-2' => esc_html__('Style 20', 'ultimate-post-kit'), 'circle-3' => esc_html__('Style 21', 'ultimate-post-kit'), 'circle-4' => esc_html__('Style 22', 'ultimate-post-kit'), 'square-1' => esc_html__('Style 23', 'ultimate-post-kit'), ], 'condition' => [ 'navigation' => ['arrows-fraction', 'both', 'arrows'], ], ] ); $this->add_control( 'hide_arrow_on_mobile', [ 'label' => __( 'Hide Arrow on Mobile', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'condition' => [ 'navigation' => [ 'arrows-fraction', 'arrows', 'both' ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_carousel_settings', [ 'label' => __( 'Carousel Settings', 'ultimate-post-kit' ), ] ); $this->add_control( 'autoplay', [ 'label' => __( 'Autoplay', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); $this->add_control( 'autoplay_speed', [ 'label' => esc_html__( 'Autoplay Speed', 'ultimate-post-kit' ), 'type' => Controls_Manager::NUMBER, 'default' => 5000, 'condition' => [ 'autoplay' => 'yes', ], ] ); $this->add_control( 'pauseonhover', [ 'label' => esc_html__( 'Pause on Hover', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, 'condition' => [ 'autoplay' => 'yes', ], ] ); $this->add_control( 'grab_cursor', [ 'label' => __( 'Grab Cursor', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, ] ); $this->add_control( 'loop', [ 'label' => __( 'Loop', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', ] ); $this->add_control( 'speed', [ 'label' => __( 'Animation Speed (ms)', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 500, ], 'range' => [ 'px' => [ 'min' => 100, 'max' => 5000, 'step' => 50, ], ], ] ); $this->add_control( 'observer', [ 'label' => __( 'Observer', 'ultimate-post-kit' ), 'description' => __( 'When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-post-kit' ), 'type' => Controls_Manager::SWITCHER, ] ); $this->end_controls_section(); //Style $this->start_controls_section( 'upk_section_style', [ 'label' => esc_html__('Items', 'ultimate-post-kit'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'item_overlay_color', [ 'label' => esc_html__('Overlay Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-image-wrapper:before' => 'background: {{VALUE}};', ], ] ); $this->add_responsive_control( 'content_padding', [ 'label' => __('Content Padding', 'ultimate-post-kit'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-content-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); // border $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'slider_item_border', 'label' => esc_html__('Border', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-item', ] ); // border radius $this->add_responsive_control( 'slider_item_border_radius', [ 'label' => esc_html__('Border Radius', 'ultimate-post-kit'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style_title', [ 'label' => esc_html__('Title', 'ultimate-post-kit'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_title' => 'yes', ], ] ); $this->add_control( 'title_style', [ 'label' => esc_html__('Style', 'ultimate-post-kit') . BDTUPK_NC, 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => [ '' => esc_html__('Default', 'ultimate-post-kit'), 'underline' => esc_html__('Underline', 'ultimate-post-kit'), 'middle-underline' => esc_html__('Middle Underline', 'ultimate-post-kit'), 'overline' => esc_html__('Overline', 'ultimate-post-kit'), 'middle-overline' => esc_html__('Middle Overline', 'ultimate-post-kit'), ], ] ); $this->add_control( 'title_color', [ 'label' => esc_html__('Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-title a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'title_hover_color', [ 'label' => esc_html__('Hover Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-title a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'title_spacing', [ 'label' => esc_html__('Spacing', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-title' => 'padding-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => esc_html__('Typography', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-title', ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'title_text_shadow', 'label' => __('Text Shadow', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-title a', ] ); $this->add_group_control( Group_Control_Text_Stroke::get_type(), [ 'name' => 'title_text_stroke', 'label' => __('Text Stroke', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-title a', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style_text', [ 'label' => esc_html__('Text', 'ultimate-post-kit'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_excerpt' => 'yes', ], ] ); $this->add_control( 'text_color', [ 'label' => esc_html__('Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-text' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'text_spacing', [ 'label' => esc_html__('Spacing', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-text' => 'padding-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_typography', 'label' => esc_html__('Typography', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-text', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style_author', [ 'label' => esc_html__('Author', 'ultimate-post-kit'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_author' => 'yes', ], ] ); $this->add_responsive_control( 'author_avatar_size', [ 'label' => esc_html__('Avatar Size', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 20, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-author-image img' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'author_color', [ 'label' => esc_html__('Text Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-author-name a, {{WRAPPER}} .upk-paradox-slider .upk-author-role' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'author_spacing', [ 'label' => esc_html__('Spacing', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-author-image img' => 'margin-right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'author_name_typography', 'label' => esc_html__('Name Typography', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-author-name a', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'author_role_typography', 'label' => esc_html__('Role Typography', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-author-role', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style_date', [ 'label' => esc_html__('Meta', 'ultimate-post-kit'), 'tab' => Controls_Manager::TAB_STYLE, 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'name' => 'show_date', 'value' => 'yes' ], [ 'name' => 'show_reading_time', 'value' => 'yes' ] ] ], ] ); $this->add_control( 'date_color', [ 'label' => esc_html__('Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-meta' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'date_spacing', [ 'label' => esc_html__('Left Spacing', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 2, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-meta' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'meta_space_between', [ 'label' => esc_html__('Space Between', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-meta > div:before' => 'margin: 0 {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'date_typography', 'label' => esc_html__('Typography', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-meta', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style_category', [ 'label' => esc_html__('Category', 'ultimate-post-kit'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_category' => 'yes' ], ] ); $this->add_responsive_control( 'category_bottom_spacing', [ 'label' => esc_html__('Spacing', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 2, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category-date-wrap' => 'padding-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->start_controls_tabs('tabs_category_style'); $this->start_controls_tab( 'tab_category_normal', [ 'label' => esc_html__('Normal', 'ultimate-post-kit'), ] ); $this->add_control( 'category_color', [ 'label' => esc_html__('Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category a' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'category_background', 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-category a', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'category_border', 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-category a', ] ); $this->add_responsive_control( 'category_border_radius', [ 'label' => esc_html__('Border Radius', 'ultimate-post-kit'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'category_padding', [ 'label' => esc_html__('Padding', 'ultimate-post-kit'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'category_spacing', [ 'label' => esc_html__('Spacing', 'ultimate-post-kit'), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, 'step' => 2, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category a+a' => 'margin-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'category_shadow', 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-category a', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'category_typography', 'label' => esc_html__('Typography', 'ultimate-post-kit'), 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-category a', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_category_hover', [ 'label' => esc_html__('Hover', 'ultimate-post-kit'), 'condition' => [ 'show_category' => 'yes' ] ] ); $this->add_control( 'category_hover_color', [ 'label' => esc_html__('Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'category_hover_background', 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-category a:hover', ] ); $this->add_control( 'category_hover_border_color', [ 'label' => esc_html__('Border Color', 'ultimate-post-kit'), 'type' => Controls_Manager::COLOR, 'condition' => [ 'category_border_border!' => '', ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-category a:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); //Navigation Css $this->start_controls_section( 'section_style_navigation', [ 'label' => __( 'Navigation', 'ultimate-post-kit' ), 'tab' => Controls_Manager::TAB_STYLE, 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'name' => 'navigation', 'operator' => '!=', 'value' => 'none', ], [ 'name' => 'show_scrollbar', 'value' => 'yes', ], ], ], ] ); $this->add_control( 'arrows_heading', [ 'label' => __( 'Arrows', 'ultimate-post-kit' ), 'type' => Controls_Manager::HEADING, 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->start_controls_tabs( 'tabs_navigation_arrows_style' ); $this->start_controls_tab( 'tabs_nav_arrows_normal', [ 'label' => __( 'Normal', 'ultimate-post-kit' ), 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'arrows_color', [ 'label' => __( 'Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev i, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next i' => 'color: {{VALUE}}', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'arrows_background', [ 'label' => __( 'Background', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'background-color: {{VALUE}}', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'nav_arrows_border', 'selector' => '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next', 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'border_radius', [ 'label' => __( 'Border Radius', 'ultimate-post-kit' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_responsive_control( 'arrows_padding', [ 'label' => esc_html__( 'Padding', 'ultimate-post-kit' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'arrows_size', [ 'label' => __( 'Size', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 10, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev i, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next i' => 'font-size: {{SIZE || 18}}{{UNIT}};', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'arrows_space', [ 'label' => __( 'Space Between Arrows', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev' => 'margin-right: {{SIZE}}px;', '{{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'margin-left: {{SIZE}}px;', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tabs_nav_arrows_hover', [ 'label' => __( 'Hover', 'ultimate-post-kit' ), 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'arrows_hover_color', [ 'label' => __( 'Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev:hover i, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next:hover i' => 'color: {{VALUE}}', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'arrows_hover_background', [ 'label' => __( 'Background', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev:hover, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next:hover' => 'background-color: {{VALUE}}', ], 'condition' => [ 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->add_control( 'nav_arrows_hover_border_color', [ 'label' => __( 'Border Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev:hover, {{WRAPPER}} .upk-paradox-slider .upk-navigation-next:hover' => 'border-color: {{VALUE}};', ], 'condition' => [ 'nav_arrows_border_border!' => '', 'navigation!' => [ 'dots', 'progressbar', 'none' ], ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'hr_2', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_control( 'dots_heading', [ 'label' => __( 'Dots', 'ultimate-post-kit' ), 'type' => Controls_Manager::HEADING, 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_control( 'hr_11', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_control( 'dots_color', [ 'label' => __( 'Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-bullet' => 'background-color: {{VALUE}}', ], 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_control( 'active_dot_color', [ 'label' => __( 'Active Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}', ], 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_responsive_control( 'dots_border_radius', [ 'label' => esc_html__('Border Radius', 'ultimate-post-kit'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'dots_height_size', [ 'label' => __( 'Height(px)', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 5, 'max' => 20, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_responsive_control( 'dots_width_size', [ 'label' => __( 'Width(px)', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 5, 'max' => 20, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'navigation!' => [ 'arrows', 'arrows-fraction', 'progressbar', 'none' ], ], ] ); $this->add_control( 'hr_22', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_control( 'fraction_heading', [ 'label' => __( 'Fraction', 'ultimate-post-kit' ), 'type' => Controls_Manager::HEADING, 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_control( 'hr_12', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_control( 'fraction_color', [ 'label' => __( 'Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-fraction' => 'color: {{VALUE}}', ], 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_control( 'active_fraction_color', [ 'label' => __( 'Active Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-current' => 'color: {{VALUE}}', ], 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'fraction_typography', 'label' => esc_html__( 'Typography', 'ultimate-post-kit' ), //'scheme' => Schemes\Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-fraction', 'condition' => [ 'navigation' => 'arrows-fraction', ], ] ); $this->add_control( 'hr_3', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_control( 'progresbar_heading', [ 'label' => __( 'Progresbar', 'ultimate-post-kit' ), 'type' => Controls_Manager::HEADING, 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_control( 'hr_13', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_control( 'progresbar_color', [ 'label' => __( 'Bar Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-progressbar' => 'background-color: {{VALUE}}', ], 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_control( 'progres_color', [ 'label' => __( 'Progress Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'separator' => 'after', 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}', ], 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_control( 'hr_4', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->add_control( 'scrollbar_heading', [ 'label' => __( 'Scrollbar', 'ultimate-post-kit' ), 'type' => Controls_Manager::HEADING, 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->add_control( 'hr_14', [ 'type' => Controls_Manager::DIVIDER, 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->add_control( 'scrollbar_color', [ 'label' => __( 'Bar Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-scrollbar' => 'background: {{VALUE}}', ], 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->add_control( 'scrollbar_drag_color', [ 'label' => __( 'Drag Color', 'ultimate-post-kit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}', ], 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->add_control( 'scrollbar_height', [ 'label' => __( 'Height', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1, 'max' => 10, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;', ], 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->add_control( 'hr_05', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'navi_offset_heading', [ 'label' => __( 'Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'hr_6', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_responsive_control( 'arrows_ncx_position', [ 'label' => __( 'Arrows Horizontal Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0, ], 'tablet_default' => [ 'size' => 0, ], 'mobile_default' => [ 'size' => 0, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows', ], [ 'name' => 'arrows_position', 'operator' => '!=', 'value' => 'center', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-arrows-ncx: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'arrows_ncy_position', [ 'label' => __( 'Arrows Vertical Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 40, ], 'tablet_default' => [ 'size' => 40, ], 'mobile_default' => [ 'size' => 40, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-arrows-ncy: {{SIZE}}px;' ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows', ], [ 'name' => 'arrows_position', 'operator' => '!=', 'value' => 'center', ], ], ], ] ); $this->add_responsive_control( 'arrows_acx_position', [ 'label' => __( 'Arrows Horizontal Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 60, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev' => 'left: {{SIZE}}px;', '{{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'right: {{SIZE}}px;', ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows', ], [ 'name' => 'arrows_position', 'value' => 'center', ], ], ], ] ); $this->add_responsive_control( 'dots_nnx_position', [ 'label' => __( 'Dots Horizontal Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0, ], 'tablet_default' => [ 'size' => 0, ], 'mobile_default' => [ 'size' => 0, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'dots', ], [ 'name' => 'dots_position', 'operator' => '!=', 'value' => '', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-dots-nnx: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'dots_nny_position', [ 'label' => __( 'Dots Vertical Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => -60, ], 'tablet_default' => [ 'size' => -60, ], 'mobile_default' => [ 'size' => -60, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'dots', ], [ 'name' => 'dots_position', 'operator' => '!=', 'value' => '', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-dots-nny: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'both_ncx_position', [ 'label' => __( 'Arrows & Dots Horizontal Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0, ], 'tablet_default' => [ 'size' => 0, ], 'mobile_default' => [ 'size' => 0, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'both', ], [ 'name' => 'both_position', 'operator' => '!=', 'value' => 'center', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-both-ncx: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'both_ncy_position', [ 'label' => __( 'Arrows & Dots Vertical Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 40, ], 'tablet_default' => [ 'size' => 40, ], 'mobile_default' => [ 'size' => 40, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'both', ], [ 'name' => 'both_position', 'operator' => '!=', 'value' => 'center', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-both-ncy: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'both_cx_position', [ 'label' => __( 'Arrows Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 60, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev' => 'left: {{SIZE}}px;', '{{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'right: {{SIZE}}px;', ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'both', ], [ 'name' => 'both_position', 'value' => 'center', ], ], ], ] ); $this->add_responsive_control( 'both_cy_position', [ 'label' => __( 'Dots Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => -60, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-dots-container' => 'transform: translateY({{SIZE}}px);', ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'both', ], [ 'name' => 'both_position', 'value' => 'center', ], ], ], ] ); $this->add_responsive_control( 'arrows_fraction_ncx_position', [ 'label' => __( 'Arrows & Fraction Horizontal Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0, ], 'tablet_default' => [ 'size' => 0, ], 'mobile_default' => [ 'size' => 0, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows-fraction', ], [ 'name' => 'arrows_fraction_position', 'operator' => '!=', 'value' => 'center', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-arrows-fraction-ncx: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'arrows_fraction_ncy_position', [ 'label' => __( 'Arrows & Fraction Vertical Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 40, ], 'tablet_default' => [ 'size' => 40, ], 'mobile_default' => [ 'size' => 40, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows-fraction', ], [ 'name' => 'arrows_fraction_position', 'operator' => '!=', 'value' => 'center', ], ], ], 'selectors' => [ '{{WRAPPER}}' => '--upk-swiper-carousel-arrows-fraction-ncy: {{SIZE}}px;' ], ] ); $this->add_responsive_control( 'arrows_fraction_cx_position', [ 'label' => __( 'Arrows Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 60, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .upk-navigation-prev' => 'left: {{SIZE}}px;', '{{WRAPPER}} .upk-paradox-slider .upk-navigation-next' => 'right: {{SIZE}}px;', ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows-fraction', ], [ 'name' => 'arrows_fraction_position', 'value' => 'center', ], ], ], ] ); $this->add_responsive_control( 'arrows_fraction_cy_position', [ 'label' => __( 'Fraction Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => -60, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);', ], 'conditions' => [ 'terms' => [ [ 'name' => 'navigation', 'value' => 'arrows-fraction', ], [ 'name' => 'arrows_fraction_position', 'value' => 'center', ], ], ], ] ); $this->add_responsive_control( 'progress_y_position', [ 'label' => __( 'Progress Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 15, ], 'range' => [ 'px' => [ 'min' => -200, 'max' => 200, ], ], 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);', ], 'condition' => [ 'navigation' => 'progressbar', ], ] ); $this->add_responsive_control( 'scrollbar_vertical_offset', [ 'label' => __( 'Scrollbar Offset', 'ultimate-post-kit' ), 'type' => Controls_Manager::SLIDER, 'selectors' => [ '{{WRAPPER}} .upk-paradox-slider .swiper-horizontal > .swiper-scrollbar' => 'bottom: {{SIZE}}px;', ], 'condition' => [ 'show_scrollbar' => 'yes' ], ] ); $this->end_controls_section(); } /** * Main query render for this widget * @param $posts_per_page number item query limit */ public function query_posts( $posts_per_page ) { $default = $this->getGroupControlQueryArgs(); $args = []; if ( $posts_per_page ) { $args['posts_per_page'] = $posts_per_page; } $args = array_merge( $default, $args ); $this->_query = new WP_Query( $args ); } public function render_author() { if (!$this->get_settings('show_author')) { return; } ?>
get_id(); $settings = $this->get_settings_for_display(); $this->add_render_attribute( 'paradox-slider', 'id', $id ); $this->add_render_attribute( 'paradox-slider', 'class', ['upk-paradox-slider'] ); if ('arrows' == $settings['navigation']) { $this->add_render_attribute( 'paradox-slider', 'class', 'upk-arrows-align-'. $settings['arrows_position'] ); } elseif ('dots' == $settings['navigation']) { $this->add_render_attribute( 'paradox-slider', 'class', 'upk-dots-align-'. $settings['dots_position'] ); } elseif ('both' == $settings['navigation']) { $this->add_render_attribute( 'paradox-slider', 'class', 'upk-arrows-dots-align-'. $settings['both_position'] ); } elseif ('arrows-fraction' == $settings['navigation']) { $this->add_render_attribute( 'paradox-slider', 'class', 'upk-arrows-dots-align-'. $settings['arrows_fraction_position'] ); } if ('arrows-fraction' == $settings['navigation'] ) { $pagination_type = 'fraction'; } elseif ('both' == $settings['navigation'] or 'dots' == $settings['navigation']) { $pagination_type = 'bullets'; } elseif ('progressbar' == $settings['navigation'] ) { $pagination_type = 'progressbar'; } else { $pagination_type = ''; } $this->add_render_attribute( [ 'paradox-slider' => [ 'data-settings' => [ wp_json_encode(array_filter([ "autoplay" => ( "yes" == $settings["autoplay"] ) ? [ "delay" => $settings["autoplay_speed"] ] : false, "loop" => ($settings["loop"] == "yes") ? true : false, "speed" => $settings["speed"]["size"], "effect" => 'fade', "lazy" => true, "parallax" => true, "grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false, "pauseOnHover" => ("yes" == $settings["pauseonhover"]) ? true : false, "slidesPerView" => 1, "observer" => ($settings["observer"]) ? true : false, "observeParents" => ($settings["observer"]) ? true : false, "navigation" => [ "nextEl" => "#" . $id . " .upk-navigation-next", "prevEl" => "#" . $id . " .upk-navigation-prev", ], "pagination" => [ "el" => "#" . $id . " .swiper-pagination", "type" => $pagination_type, "clickable" => "true", 'dynamicBullets' => ("yes" == $settings["dynamic_bullets"]) ? true : false, ], "scrollbar" => [ "el" => "#" . $id . " .swiper-scrollbar", "hide" => "true", ], "lazy" => [ "loadPrevNext" => "true", ], ])) ] ] ] ); $this->add_render_attribute('swiper', 'class', 'swiper-carousel swiper'); ?>