Loading...
Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'media-grid', 'layout_animation', ['pro-fd', 'pro-fs'] ); $this->add_control( 'layout_animation_duration', [ 'label' => esc_html__( 'Animation Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.3, 'min' => 0, 'max' => 5, 'step' => 0.1, 'condition' => [ 'layout_animation!' => 'default', 'layout_select!' => 'slider', ], ] ); $this->add_control( 'layout_animation_delay', [ 'label' => esc_html__( 'Animation Delay', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.05, 'condition' => [ 'layout_animation!' => 'default', 'layout_select!' => 'slider', ], ] ); $this->add_control_layout_slider_amount(); $this->add_control_layout_slider_rows(); $this->add_control( 'layout_slides_to_scroll', [ 'label' => esc_html__( 'Slides to Scroll', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 10, 'default' => 2, 'frontend_available' => true, 'separator' => 'before', 'condition' => [ 'layout_select' => 'slider', ], ] ); $this->add_responsive_control( 'layout_slider_gutter', [ 'type' => Controls_Manager::SLIDER, 'label' => esc_html__( 'Gutter', 'wpr-addons' ), 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 50, ] ], 'default' => [ 'unit' => 'px', 'size' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid .slick-slide' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.wpr-grid-slider-rows-2 .wpr-grid .wpr-grid-item' => 'margin-bottom: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.wpr-grid-slider-rows-3 .wpr-grid .wpr-grid-item' => 'margin-bottom: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid .slick-list' => 'margin-left: -{{SIZE}}{{UNIT}};', '{{WRAPPER}}.wpr-grid-slider-rows-2 .wpr-grid .slick-list' => 'margin-bottom: -{{SIZE}}{{UNIT}};', '{{WRAPPER}}.wpr-grid-slider-rows-3 .wpr-grid .slick-list' => 'margin-bottom: -{{SIZE}}{{UNIT}};' ], 'render_type' => 'template', 'condition' => [ 'layout_slider_amount!' => '1', 'layout_select' => 'slider', ] ] ); $this->add_responsive_control( 'layout_slider_nav', [ 'label' => esc_html__( 'Navigation', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'widescreen_default' => 'yes', 'laptop_default' => 'yes', 'tablet_extra_default' => 'yes', 'tablet_default' => 'yes', 'mobile_extra_default' => 'yes', 'mobile_default' => 'yes', 'selectors_dictionary' => [ '' => 'none', 'yes' => 'flex' ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'display:{{VALUE}} !important;', ], 'separator' => 'before', 'condition' => [ 'layout_select' => 'slider', ] ] ); $this->add_control_layout_slider_nav_hover(); $this->add_control( 'layout_slider_nav_icon', [ 'label' => esc_html__( 'Select Icon', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'svg-angle-1-left', 'options' => Utilities::get_svg_icons_array( 'arrows', [ 'fas fa-angle-left' => esc_html__( 'Angle', 'wpr-addons' ), 'fas fa-angle-double-left' => esc_html__( 'Angle Double', 'wpr-addons' ), 'fas fa-arrow-left' => esc_html__( 'Arrow', 'wpr-addons' ), 'fas fa-arrow-alt-circle-left' => esc_html__( 'Arrow Circle', 'wpr-addons' ), 'far fa-arrow-alt-circle-left' => esc_html__( 'Arrow Circle Alt', 'wpr-addons' ), 'fas fa-long-arrow-alt-left' => esc_html__( 'Long Arrow', 'wpr-addons' ), 'fas fa-chevron-left' => esc_html__( 'Chevron', 'wpr-addons' ), 'svg-icons' => esc_html__( 'SVG Icons -----', 'wpr-addons' ), ] ), 'separator' => 'after', 'condition' => [ 'layout_slider_nav' => 'yes', 'layout_select' => 'slider', ], ] ); $this->add_responsive_control( 'layout_slider_dots', [ 'label' => esc_html__( 'Pagination', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'widescreen_default' => 'yes', 'laptop_default' => 'yes', 'tablet_extra_default' => 'yes', 'tablet_default' => 'yes', 'mobile_extra_default' => 'yes', 'mobile_default' => 'yes', 'selectors_dictionary' => [ '' => 'none', 'yes' => 'inline-table' ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dots' => 'display:{{VALUE}};', ], 'condition' => [ 'layout_select' => 'slider', ], ] ); $this->add_control_layout_slider_dots_position(); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'media-grid', 'layout_slider_dots_position', ['pro-vr'] ); $this->add_controls_group_layout_slider_autoplay(); $this->add_control( 'layout_slider_loop', [ 'label' => esc_html__( 'Infinite Loop', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'frontend_available' => true, 'separator' => 'before', 'condition' => [ 'layout_select' => 'slider', ], ] ); $this->add_control( 'layout_slider_effect', [ 'type' => Controls_Manager::SELECT, 'label' => esc_html__( 'Effect', 'wpr-addons' ), 'default' => 'slide', 'options' => [ 'slide' => esc_html__( 'Slide', 'wpr-addons' ), 'fade' => esc_html__( 'Fade', 'wpr-addons' ), ], 'condition' => [ 'layout_slider_amount' => 1, 'layout_select' => 'slider', ], ] ); $this->add_control( 'layout_slider_effect_duration', [ 'label' => esc_html__( 'Effect Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.7, 'min' => 0, 'max' => 5, 'step' => 0.1, 'condition' => [ 'layout_slider_amount' => 1, 'layout_select' => 'slider', ], ] ); $this->end_controls_section(); // End Controls Section // Tab: Content ============== // Section: Elements --------- $this->start_controls_section( 'section_grid_elements', [ 'label' => esc_html__( 'Elements', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->add_control( 'element_select', [ 'label' => esc_html__( 'Select Element', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'title', 'options' => array_merge( $this->add_option_element_select(), $post_taxonomy_names ), 'separator' => 'after' ] ); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $repeater, Controls_Manager::RAW_HTML, 'media-grid', 'element_select', ['pro-lk', 'pro-shr'] ); $repeater->add_control( 'element_location', [ 'label' => esc_html__( 'Location', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'over', 'options' => [ 'above' => esc_html__( 'Above Media', 'wpr-addons' ), 'over' => esc_html__( 'Over Media', 'wpr-addons' ), 'below' => esc_html__( 'Below Media', 'wpr-addons' ), ] ] ); $repeater->add_control( 'element_display', [ 'label' => esc_html__( 'Display', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'block', 'options' => [ 'inline' => esc_html__( 'Inline', 'wpr-addons' ), 'block' => esc_html__( 'Seperate Line', 'wpr-addons' ), 'custom' => esc_html__( 'Custom Width', 'wpr-addons' ), ], ] ); $repeater->add_control( 'element_custom_width', [ 'label' => esc_html__( 'Element Width', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['%'], 'range' => [ '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 100, ], 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}}' => 'width: {{SIZE}}%;', ], 'condition' => [ 'element_display' => 'custom', ], ] ); if ( ! wpr_fs()->can_use_premium_code() ) { $repeater->add_control( 'element_align_pro_notice', [ 'raw' => 'Vertical Align option is available
in the Pro version', // 'raw' => 'Vertical Align option is available
in the Pro version', 'type' => Controls_Manager::RAW_HTML, 'content_classes' => 'wpr-pro-notice', 'condition' => [ 'element_location' => 'over', ], ] ); } $repeater->add_control( 'element_align_vr', [ 'label' => esc_html__( 'Vertical Align', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'middle', 'options' => [ 'top' => [ 'title' => esc_html__( 'Top', 'wpr-addons' ), 'icon' => 'eicon-v-align-top', ], 'middle' => [ 'title' => esc_html__( 'Middle', 'wpr-addons' ), 'icon' => 'eicon-v-align-middle', ], 'bottom' => [ 'title' => esc_html__( 'Bottom', 'wpr-addons' ), 'icon' => 'eicon-v-align-bottom', ], ], 'condition' => [ 'element_location' => 'over', ], ] ); $repeater->add_control( 'element_align_hr', [ 'label' => esc_html__( 'Horizontal Align', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'center', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'wpr-addons' ), 'icon' => 'eicon-h-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'wpr-addons' ), 'icon' => 'eicon-h-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'wpr-addons' ), 'icon' => 'eicon-h-align-right', ] ], 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}}' => 'text-align: {{VALUE}}', ], 'render_type' => 'template', 'separator' => 'after' ] ); $repeater->add_control( 'element_title_tag', [ 'label' => esc_html__( 'Title HTML Tag', 'wpr-addons' ), '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' => [ 'element_select' => 'title', ] ] ); $repeater->add_control( 'element_dropcap', [ 'label' => esc_html__( 'Enable Drop Cap', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'condition' => [ 'element_select' => [ 'caption' ], ] ] ); $repeater->add_control( 'element_word_count', [ 'label' => esc_html__( 'Word Count', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 20, 'min' => 1, 'condition' => [ 'element_select' => [ 'title', 'caption' ], ] ] ); $repeater->add_control( 'element_show_avatar', [ 'label' => esc_html__( 'Show Avatar', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'condition' => [ 'element_select' => [ 'author' ] ] ] ); $repeater->add_control( 'element_avatar_size', [ 'label' => esc_html__( 'Avatar Size', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 32, 'min' => 8, 'condition' => [ 'element_select' => [ 'author' ], 'element_show_avatar' => 'yes' ], 'separator' => 'after' ] ); $repeater->add_control( 'element_tax_sep', [ 'label' => esc_html__( 'Separator', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => ', ', 'condition' => [ 'element_select!' => [ 'title', 'caption', 'date', 'time', 'author', 'likes', 'sharing', 'lightbox', 'separator', 'post_format', ], ], 'separator' => 'after' ] ); $repeater->add_control( 'element_tax_style', [ 'label' => esc_html__( 'Select Styling', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'wpr-grid-tax-style-1', 'options' => [ 'wpr-grid-tax-style-1' => esc_html__( 'Taxonomy Style 1', 'wpr-addons' ), 'wpr-grid-tax-style-2' => esc_html__( 'Taxonomy Style 2', 'wpr-addons' ), ], 'condition' => [ 'element_select!' => [ 'title', 'caption', 'date', 'time', 'author', 'likes', 'sharing', 'lightbox', 'separator', ], ], 'separator' => 'after' ] ); $repeater->add_control( 'element_like_icon', $this->add_repeater_args_element_like_icon() ); $repeater->add_control( 'element_like_show_count', $this->add_repeater_args_element_like_show_count() ); $repeater->add_control( 'element_like_text', $this->add_repeater_args_element_like_text() ); $repeater->add_control( 'element_sharing_icon_1', $this->add_repeater_args_element_sharing_icon_1() ); $repeater->add_control( 'element_sharing_icon_2', $this->add_repeater_args_element_sharing_icon_2() ); $repeater->add_control( 'element_sharing_icon_3', $this->add_repeater_args_element_sharing_icon_3() ); $repeater->add_control( 'element_sharing_icon_4', $this->add_repeater_args_element_sharing_icon_4() ); $repeater->add_control( 'element_sharing_icon_5', $this->add_repeater_args_element_sharing_icon_5() ); $repeater->add_control( 'element_sharing_icon_6', $this->add_repeater_args_element_sharing_icon_6() ); $repeater->add_control( 'element_sharing_trigger', $this->add_repeater_args_element_sharing_trigger() ); $repeater->add_control( 'element_sharing_trigger_icon', $this->add_repeater_args_element_sharing_trigger_icon() ); $repeater->add_control( 'element_sharing_trigger_action', $this->add_repeater_args_element_sharing_trigger_action() ); $repeater->add_control( 'element_sharing_trigger_direction', $this->add_repeater_args_element_sharing_trigger_direction() ); $repeater->add_control( 'element_sharing_tooltip', $this->add_repeater_args_element_sharing_tooltip() ); $repeater->add_control( 'element_lightbox_overlay', [ 'label' => esc_html__( 'Media Overlay', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'separator' => 'after', 'condition' => [ 'element_select' => [ 'lightbox' ], ], ] ); $repeater->add_control( 'element_separator_style', [ 'label' => esc_html__( 'Select Styling', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'wpr-grid-sep-style-1', 'options' => [ 'wpr-grid-sep-style-1' => esc_html__( 'Separator Style 1', 'wpr-addons' ), 'wpr-grid-sep-style-2' => esc_html__( 'Separator Style 2', 'wpr-addons' ), ], 'condition' => [ 'element_select' => 'separator', ] ] ); $repeater->add_control( 'element_extra_text_pos', [ 'label' => esc_html__( 'Extra Text Display', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'before' => esc_html__( 'Before Element', 'wpr-addons' ), 'after' => esc_html__( 'After Element', 'wpr-addons' ), ], 'default' => 'none', 'condition' => [ 'element_select!' => [ 'title', 'caption', 'separator', ], ] ] ); $repeater->add_control( 'element_extra_text', [ 'label' => esc_html__( 'Extra Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => '', 'condition' => [ 'element_select!' => [ 'title', 'caption', 'separator', ], 'element_extra_text_pos!' => 'none' ] ] ); $repeater->add_control( 'element_extra_icon_pos', [ 'label' => esc_html__( 'Extra Icon Position', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'before' => esc_html__( 'Before Element', 'wpr-addons' ), 'after' => esc_html__( 'After Element', 'wpr-addons' ), ], 'default' => 'none', 'condition' => [ 'element_select!' => [ 'title', 'caption', 'separator', 'likes', 'sharing', ], ] ] ); $repeater->add_control( 'element_extra_icon', [ 'label' => esc_html__( 'Select Icon', 'wpr-addons' ), 'type' => Controls_Manager::ICONS, 'skin' => 'inline', 'label_block' => false, 'default' => [ 'value' => 'fas fa-search', 'library' => 'fa-solid', ], 'condition' => [ 'element_select!' => [ 'title', 'caption', 'separator', 'likes', 'sharing', ], 'element_extra_icon_pos!' => 'none' ] ] ); $repeater->add_control( 'animation_divider', [ 'type' => Controls_Manager::DIVIDER, 'style' => 'thick', 'condition' => [ 'element_location' => 'over' ], ] ); $repeater->add_control( 'element_animation', [ 'label' => esc_html__( 'Select Animation', 'wpr-addons' ), 'type' => 'wpr-animations', 'default' => 'none', 'condition' => [ 'element_location' => 'over' ], ] ); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $repeater, Controls_Manager::RAW_HTML, 'media-grid', 'element_animation', ['pro-slrt','pro-slxrt','pro-slbt','pro-sllt','pro-sltp','pro-slxlt','pro-sktp','pro-skrt','pro-skbt','pro-sklt','pro-scup','pro-scdn','pro-rllt','pro-rlrt'] ); $repeater->add_control( 'element_animation_duration', [ 'label' => esc_html__( 'Animation Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.3, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}}' => 'transition-duration: {{VALUE}}s;' ], 'condition' => [ 'element_animation!' => 'none', 'element_location' => 'over', ], ] ); $repeater->add_control( 'element_animation_delay', [ 'label' => esc_html__( 'Animation Delay', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-animation-wrap:hover {{CURRENT_ITEM}}' => 'transition-delay: {{VALUE}}s;' ], 'condition' => [ 'element_animation!' => 'none', 'element_location' => 'over' ], ] ); $repeater->add_control( 'element_animation_timing', [ 'label' => esc_html__( 'Animation Timing', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => Utilities::wpr_animation_timings(), 'default' => 'ease-default', 'condition' => [ 'element_animation!' => 'none', 'element_location' => 'over' ], ] ); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $repeater, Controls_Manager::RAW_HTML, 'media-grid', 'element_animation_timing', Utilities::wpr_animation_timing_pro_conditions()); $repeater->add_control( 'element_animation_size', [ 'label' => esc_html__( 'Animation Size', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'small' => esc_html__( 'Small', 'wpr-addons' ), 'medium' => esc_html__( 'Medium', 'wpr-addons' ), 'large' => esc_html__( 'Large', 'wpr-addons' ), ], 'default' => 'large', 'condition' => [ 'element_animation!' => 'none', 'element_location' => 'over' ], ] ); $repeater->add_control( 'element_animation_tr', [ 'label' => esc_html__( 'Animation Transparency', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'element_animation!' => 'none', 'element_location' => 'over' ], ] ); $repeater->add_responsive_control( 'element_show_on', [ 'label' => esc_html__( 'Show on this Device', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'widescreen_default' => 'yes', 'laptop_default' => 'yes', 'tablet_extra_default' => 'yes', 'tablet_default' => 'yes', 'mobile_extra_default' => 'yes', 'mobile_default' => 'yes', 'selectors_dictionary' => [ '' => 'position: absolute; left: -99999999px;', 'yes' => 'position: static; left: auto;' ], 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}}' => '{{VALUE}}', ], 'render_type' => 'template', ] ); $this->add_control( 'grid_elements', [ 'label' => esc_html__( 'Grid Elements', 'wpr-addons' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'element_select' => 'lightbox', 'element_location' => 'over', 'element_extra_icon_pos' => 'before', 'element_animation' => 'fade-in', 'element_animation_size' => 'large', 'element_lightbox_overlay' => 'yes', 'element_sharing_trigger_icon' => 'fas fa-share', ], [ 'element_select' => 'title', 'element_location' => 'over', 'element_extra_icon_pos' => 'before', 'element_animation' => 'fade-in', 'element_animation_size' => 'large', 'element_sharing_trigger_icon' => 'fas fa-share', ], ], 'title_field' => '{{{ element_select.charAt(0).toUpperCase() + element_select.slice(1) }}}', ] ); $this->end_controls_section(); // End Controls Section // Tab: Content ============== // Section: Media Overlay ---- $this->start_controls_section( 'section_image_overlay', [ 'label' => esc_html__( 'Media Overlay', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_responsive_control( 'overlay_width', [ 'label' => esc_html__( 'Overlay Width', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%', 'px' ], 'default' => [ 'unit' => '%', 'size' => 100, ], 'range' => [ '%' => [ 'min' => 0, 'max' => 100, ], 'px' => [ 'min' => 0, 'max' => 500, ], ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-media-hover-bg' => 'width: {{SIZE}}{{UNIT}};top:calc((100% - {{overlay_hegiht.SIZE}}{{overlay_hegiht.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-top"]' => 'top:calc((100% - {{overlay_hegiht.SIZE}}{{overlay_hegiht.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-bottom"]' => 'bottom:calc((100% - {{overlay_hegiht.SIZE}}{{overlay_hegiht.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-right"]' => 'top:calc((100% - {{overlay_hegiht.SIZE}}{{overlay_hegiht.UNIT}})/2);right:calc((100% - {{SIZE}}{{UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-left"]' => 'top:calc((100% - {{overlay_hegiht.SIZE}}{{overlay_hegiht.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);', ], ] ); $this->add_responsive_control( 'overlay_hegiht', [ 'label' => esc_html__( 'Overlay Hegiht', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%', 'px' ], 'default' => [ 'unit' => '%', 'size' => 100, ], 'range' => [ '%' => [ 'min' => 0, 'max' => 100, ], 'px' => [ 'min' => 0, 'max' => 500, ], ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-media-hover-bg' => 'height: {{SIZE}}{{UNIT}};top:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-top"]' => 'top:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-bottom"]' => 'bottom:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-right"]' => 'top:calc((100% - {{SIZE}}{{UNIT}})/2);right:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);', '{{WRAPPER}} .wpr-grid-media-hover-bg[class*="-left"]' => 'top:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);', ], 'separator' => 'after', ] ); $this->add_control( 'overlay_animation', [ 'label' => esc_html__( 'Select Animation', 'wpr-addons' ), 'type' => 'wpr-animations-alt', 'default' => 'fade-in', ] ); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'woo-grid', 'overlay_animation', ['pro-slrt','pro-slxrt','pro-slbt','pro-sllt','pro-sltp','pro-slxlt','pro-sktp','pro-skrt','pro-skbt','pro-sklt','pro-scup','pro-scdn','pro-rllt','pro-rlrt',]); $this->add_control( 'overlay_animation_duration', [ 'label' => esc_html__( 'Animation Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.3, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-media-hover-bg' => 'transition-duration: {{VALUE}}s;' ], 'condition' => [ 'overlay_animation!' => 'none', ], ] ); $this->add_control( 'overlay_animation_delay', [ 'label' => esc_html__( 'Animation Delay', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-animation-wrap:hover .wpr-grid-media-hover-bg' => 'transition-delay: {{VALUE}}s;' ], 'condition' => [ 'overlay_animation!' => 'none', ], ] ); $this->add_control( 'overlay_animation_timing', [ 'label' => esc_html__( 'Animation Timing', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => Utilities::wpr_animation_timings(), 'default' => 'ease-default', 'condition' => [ 'overlay_animation!' => 'none', ], ] ); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'woo-grid', 'overlay_animation_timing', Utilities::wpr_animation_timing_pro_conditions()); $this->add_control( 'overlay_animation_size', [ 'label' => esc_html__( 'Animation Size', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'small' => esc_html__( 'Small', 'wpr-addons' ), 'medium' => esc_html__( 'Medium', 'wpr-addons' ), 'large' => esc_html__( 'Large', 'wpr-addons' ), ], 'default' => 'large', 'condition' => [ 'overlay_animation!' => 'none', ], ] ); $this->add_control( 'overlay_animation_tr', [ 'label' => esc_html__( 'Animation Transparency', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'overlay_animation!' => 'none', ], ] ); $this->add_control_overlay_animation_divider(); $this->add_control_overlay_image(); $this->add_control_overlay_image_width(); $this->end_controls_section(); // End Controls Section // Tab: Content ============== // Section: Image Effects ---- $this->start_controls_section( 'section_image_effects', [ 'label' => esc_html__( 'Image Effects', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control_image_effects(); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'media-grid', 'image_effects', ['pro-zi', 'pro-zo', 'pro-go', 'pro-bo'] ); $this->add_control( 'image_effects_duration', [ 'label' => esc_html__( 'Animation Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.3, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-media-wrap img' => 'transition-duration: {{VALUE}}s;' ], 'condition' => [ 'image_effects!' => 'none', ], ] ); $this->add_control( 'image_effects_delay', [ 'label' => esc_html__( 'Animation Delay', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-media-wrap:hover img' => 'transition-delay: {{VALUE}}s;' ], 'condition' => [ 'image_effects!' => 'none', ], ] ); $this->add_control( 'image_effects_animation_timing', [ 'label' => esc_html__( 'Animation Timing', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => Utilities::wpr_animation_timings(), 'default' => 'ease-default', 'condition' => [ 'image_effects!' => 'none', ], ] ); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'media-grid', 'image_effects_animation_timing', Utilities::wpr_animation_timing_pro_conditions() ); $this->add_control( 'image_effects_size', [ 'label' => esc_html__( 'Animation Size', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'small' => esc_html__( 'Small', 'wpr-addons' ), 'medium' => esc_html__( 'Medium', 'wpr-addons' ), 'large' => esc_html__( 'Large', 'wpr-addons' ), ], 'default' => 'small', 'condition' => [ 'image_effects!' => ['none', 'slide'], ] ] ); $this->add_control( 'image_effects_direction', [ 'label' => esc_html__( 'Animation Direction', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'top' => esc_html__( 'Top', 'wpr-addons' ), 'right' => esc_html__( 'Right', 'wpr-addons' ), 'bottom' => esc_html__( 'Bottom', 'wpr-addons' ), 'left' => esc_html__( 'Left', 'wpr-addons' ), ], 'default' => 'bottom', 'condition' => [ 'image_effects!' => 'none', 'image_effects' => 'slide' ] ] ); $this->end_controls_section(); // End Controls Section // Tab: Content ============== // Section: Lightbox Popup ---- $this->start_controls_section( 'section_lightbox_popup', [ 'label' => esc_html__( 'Lightbox Popup', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'lightbox_popup_autoplay', [ 'label' => esc_html__( 'Autoplay Slides', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control( 'lightbox_popup_progressbar', [ 'label' => esc_html__( 'Show Progress Bar', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', 'condition' => [ 'lightbox_popup_autoplay' => 'true' ] ] ); $this->add_control( 'lightbox_popup_pause', [ 'label' => esc_html__( 'Autoplay Speed', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 5, 'min' => 1, 'max' => 10, 'step' => 1, 'condition' => [ 'lightbox_popup_autoplay' => 'true', ], ] ); $this->add_control( 'lightbox_popup_counter', [ 'label' => esc_html__( 'Show Counter', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control( 'lightbox_popup_arrows', [ 'label' => esc_html__( 'Show Arrows', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control( 'lightbox_popup_captions', [ 'label' => esc_html__( 'Show Captions', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control_lightbox_popup_thumbnails(); $this->add_control_lightbox_popup_thumbnails_default(); $this->add_control_lightbox_popup_sharing(); $this->add_control( 'lightbox_popup_zoom', [ 'label' => esc_html__( 'Show Zoom Button', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control( 'lightbox_popup_fullscreen', [ 'label' => esc_html__( 'Show Full Screen Button', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control( 'lightbox_popup_download', [ 'label' => esc_html__( 'Show Download Button', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'true', 'return_value' => 'true', ] ); $this->add_control( 'lightbox_popup_description', [ 'raw' => sprintf(__( 'You can change Lightbox Popup styling options globaly. Navigate to Dashboard > %s > Settings.', 'wpr-addons' ), Utilities::get_plugin_name()), 'type' => Controls_Manager::RAW_HTML, 'separator' => 'before', 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', ] ); $this->end_controls_section(); // End Controls Section // Tab: Content ============== // Section: Filters ---------- $this->start_controls_section( 'section_grid_filters', [ 'label' => 'Filters Video Tutorial ', 'tab' => Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_select!' => 'slider', 'layout_filters' => 'yes', ], ] ); $this->add_control( 'filters_select', [ 'label' => esc_html__( 'Select Taxonomy', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => $post_taxonomy_names, 'default' => 'media_category', 'separator' => 'after', ] ); $this->add_control( 'filters_linkable', [ 'label' => esc_html__( 'Set Linkable Filters', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'return_value' => 'yes', ] ); $this->add_control( 'filters_hide_empty', [ 'label' => esc_html__( 'Hide Empty Filters', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'return_value' => 'yes', 'condition' => [ 'filters_linkable!' => 'yes', ], ] ); $this->add_control_filters_deeplinking(); $this->add_control( 'filters_all', [ 'label' => esc_html__( 'Show "All" Filter', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'filters_linkable!' => 'yes', ], ] ); $this->add_control( 'filters_all_text', [ 'label' => esc_html__( '"All" Filter Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'All Photos', 'condition' => [ 'filters_all' => 'yes', 'filters_linkable!' => 'yes', ], ] ); $this->add_control_filters_count(); $this->add_control_filters_count_superscript(); $this->add_control_filters_count_brackets(); $this->add_control_filters_default_filter(); $this->add_control_filters_icon(); $this->add_control_filters_icon_align(); $this->add_control( 'filters_separator', [ 'label' => esc_html__( 'Separator', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => '', 'separator' => 'before', ] ); $this->add_control( 'filters_separator_align', [ 'label' => esc_html__( 'Separator Position', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'left', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'wpr-addons' ), 'icon' => 'eicon-h-align-left', ], 'right' => [ 'title' => esc_html__( 'Right', 'wpr-addons' ), 'icon' => 'eicon-h-align-right', ] ], 'condition' => [ 'filters_separator!' => '', ], ] ); $this->add_responsive_control( 'filters_align', [ 'label' => esc_html__( 'Align', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'center', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'wpr-addons' ), 'icon' => 'eicon-h-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'wpr-addons' ), 'icon' => 'eicon-h-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'wpr-addons' ), 'icon' => 'eicon-h-align-right', ] ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters' => 'text-align: {{VALUE}}', ], 'separator' => 'before', ] ); $this->add_control_filters_animation(); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'media-grid', 'filters_animation', ['pro-fd'], ['pro-fs'] ); $this->add_control( 'filters_animation_duration', [ 'label' => esc_html__( 'Animation Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.3, 'min' => 0, 'max' => 5, 'step' => 0.1, 'condition' => [ 'filters_animation!' => 'default', ], ] ); $this->add_control( 'filters_animation_delay', [ 'label' => esc_html__( 'Animation Delay', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.05, 'condition' => [ 'filters_animation!' => 'default' ], ] ); $this->end_controls_section(); // End Controls Section // Tab: Content ============== // Section: Pagination ------- $this->start_controls_section( 'section_grid_pagination', [ 'label' => esc_html__( 'Pagination', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_CONTENT, 'condition' => [ 'layout_select!' => 'slider', 'layout_pagination' => 'yes', ], ] ); $this->add_control_pagination_type(); // Upgrade to Pro Notice Utilities::upgrade_pro_notice( $this, Controls_Manager::RAW_HTML, 'media-grid', 'pagination_type', ['pro-is'] ); $this->add_control( 'pagination_older_text', [ 'label' => esc_html__( 'Older Posts Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Older Posts', 'condition' => [ 'pagination_type' => 'default', ], ] ); $this->add_control( 'pagination_newer_text', [ 'label' => esc_html__( 'Newer Posts Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Newer Posts', 'condition' => [ 'pagination_type' => 'default', ] ] ); $this->add_control( 'pagination_on_icon', [ 'label' => esc_html__( 'Select Icon', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'fas fa-angle', 'options' => Utilities::get_svg_icons_array( 'arrows', [ 'fas fa-angle' => esc_html__( 'Angle', 'wpr-addons' ), 'fas fa-angle-double' => esc_html__( 'Angle Double', 'wpr-addons' ), 'fas fa-arrow' => esc_html__( 'Arrow', 'wpr-addons' ), 'fas fa-arrow-alt-circle' => esc_html__( 'Arrow Circle', 'wpr-addons' ), 'far fa-arrow-alt-circle' => esc_html__( 'Arrow Circle Alt', 'wpr-addons' ), 'fas fa-long-arrow-alt' => esc_html__( 'Long Arrow', 'wpr-addons' ), 'fas fa-chevron' => esc_html__( 'Chevron', 'wpr-addons' ), 'svg-icons' => esc_html__( 'SVG Icons -----', 'wpr-addons' ), ] ), 'condition' => [ 'pagination_type' => 'default' ], ] ); $this->add_control( 'pagination_prev_next', [ 'label' => esc_html__( 'Previous & Next Buttons', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'pagination_type' => 'numbered', ], ] ); $this->add_control( 'pagination_prev_text', [ 'label' => esc_html__( 'Prev Page Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Previous Page', 'condition' => [ 'pagination_type' => 'numbered', 'pagination_prev_next' => 'yes', ], ] ); $this->add_control( 'pagination_next_text', [ 'label' => esc_html__( 'Next Page Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Next Page', 'condition' => [ 'pagination_type' => 'numbered', 'pagination_prev_next' => 'yes', ] ] ); $this->add_control( 'pagination_pn_icon', [ 'label' => esc_html__( 'Select Icon', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'fas fa-angle', 'options' => Utilities::get_svg_icons_array( 'arrows', [ 'fas fa-angle' => esc_html__( 'Angle', 'wpr-addons' ), 'fas fa-angle-double' => esc_html__( 'Angle Double', 'wpr-addons' ), 'fas fa-arrow' => esc_html__( 'Arrow', 'wpr-addons' ), 'fas fa-arrow-alt-circle' => esc_html__( 'Arrow Circle', 'wpr-addons' ), 'far fa-arrow-alt-circle' => esc_html__( 'Arrow Circle Alt', 'wpr-addons' ), 'fas fa-long-arrow-alt' => esc_html__( 'Long Arrow', 'wpr-addons' ), 'fas fa-chevron' => esc_html__( 'Chevron', 'wpr-addons' ), 'svg-icons' => esc_html__( 'SVG Icons -----', 'wpr-addons' ), ] ), 'condition' => [ 'pagination_type' => 'numbered', 'pagination_prev_next' => 'yes' ], ] ); $this->add_control( 'pagination_first_last', [ 'label' => esc_html__( 'First & Last Buttons', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'pagination_type' => 'numbered', ], ] ); $this->add_control( 'pagination_first_text', [ 'label' => esc_html__( 'First Page Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'First Page', 'condition' => [ 'pagination_type' => 'numbered', 'pagination_first_last' => 'yes', ], ] ); $this->add_control( 'pagination_last_text', [ 'label' => esc_html__( 'Last Page Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Last Page', 'condition' => [ 'pagination_type' => 'numbered', 'pagination_first_last' => 'yes', ] ] ); $this->add_control( 'pagination_fl_icon', [ 'label' => esc_html__( 'Select Icon', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'fas fa-angle', 'options' => Utilities::get_svg_icons_array( 'arrows', [ 'fas fa-angle' => esc_html__( 'Angle', 'wpr-addons' ), 'fas fa-angle-double' => esc_html__( 'Angle Double', 'wpr-addons' ), 'fas fa-arrow' => esc_html__( 'Arrow', 'wpr-addons' ), 'fas fa-arrow-alt-circle' => esc_html__( 'Arrow Circle', 'wpr-addons' ), 'far fa-arrow-alt-circle' => esc_html__( 'Arrow Circle Alt', 'wpr-addons' ), 'fas fa-long-arrow-alt' => esc_html__( 'Long Arrow', 'wpr-addons' ), 'fas fa-chevron' => esc_html__( 'Chevron', 'wpr-addons' ), 'svg-icons' => esc_html__( 'SVG Icons -----', 'wpr-addons' ), ] ), 'condition' => [ 'pagination_type' => 'numbered', 'pagination_first_last' => 'yes' ], ] ); $this->add_control( 'pagination_disabled_arrows', [ 'label' => esc_html__( 'Show Disabled Buttons', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'return_value' => 'yes', 'condition' => [ 'pagination_type' => [ 'default', 'numbered' ], ], ] ); $this->add_control( 'pagination_range', [ 'label' => esc_html__( 'Range', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 2, 'min' => 1, 'condition' => [ 'pagination_type' => 'numbered', ] ] ); $this->add_control( 'pagination_load_more_text', [ 'label' => esc_html__( 'Load More Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'Load More', 'condition' => [ 'pagination_type' => 'load-more', ] ] ); $this->add_control( 'pagination_finish_text', [ 'label' => esc_html__( 'Finish Text', 'wpr-addons' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => 'End of Content.', 'condition' => [ 'pagination_type' => [ 'load-more', 'infinite-scroll' ], ] ] ); $this->add_control( 'pagination_animation', [ 'label' => esc_html__( 'Select Animation', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'loader-1', 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'loader-1' => esc_html__( 'Loader 1', 'wpr-addons' ), 'loader-2' => esc_html__( 'Loader 2', 'wpr-addons' ), 'loader-3' => esc_html__( 'Loader 3', 'wpr-addons' ), 'loader-4' => esc_html__( 'Loader 4', 'wpr-addons' ), 'loader-5' => esc_html__( 'Loader 5', 'wpr-addons' ), 'loader-6' => esc_html__( 'Loader 6', 'wpr-addons' ), ], 'condition' => [ 'pagination_type' => [ 'load-more', 'infinite-scroll' ], ] ] ); $this->add_control( 'pagination_align', [ 'label' => esc_html__( 'Alignment', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'wpr-addons' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'wpr-addons' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'wpr-addons' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => esc_html__( 'Justified', 'wpr-addons' ), 'icon' => 'eicon-text-align-justify', ], ], 'default' => 'center', 'prefix_class' => 'wpr-grid-pagination-', 'render_type' => 'template', 'separator' => 'before', 'condition' => [ 'pagination_type!' => 'infinite-scroll', ] ] ); $this->end_controls_section(); // End Controls Section // Section: Request New Feature Utilities::wpr_add_section_request_feature( $this, Controls_Manager::RAW_HTML, '' ); // Section: Pro Features Utilities::pro_features_list_section( $this, '', Controls_Manager::RAW_HTML, 'media-grid', [ 'Grid Columns 1,2,3,4,5,6,7,8', 'Masonry Layout', 'Random Images Query', 'Image Slider Columns (Carousel) 1,2,3,4,5,6,7,8', 'Infinite Scrolling Pagination', 'Image Slider Autoplay options', 'Image Slider Advanced Navigation Positioning', 'Image Slider Advanced Pagination Positioning', 'Advanced Image Likes', 'Advanced Image Sharing', 'Advanced Grid Loading Animations (Fade in & Slide Up)', 'Advanced Grid Elements Positioning', 'Unlimited Image Overlay Animations', 'Image overlay GIF upload option', 'Image Overlay Blend Mode', 'Image Effects: Zoom, Grayscale, Blur', 'Lightbox Thumbnail Gallery, Lightbox Image Sharing Button', 'Grid Category Filter Deeplinking', 'Grid Category Filter Icons select', 'Grid Category Filter Count', 'Grid Item Even/Odd Background Color', 'Title & Category Advanced Link Hover Animations', 'Image Order' ] ); // Styles ==================== // Section: Grid Item -------- $this->start_controls_section( 'section_style_grid_item', [ 'label' => esc_html__( 'Grid Item', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'grid_item_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-above-content' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-item-below-content' => 'background-color: {{VALUE}}', ], ] ); $this->add_control_grid_item_even_bg_color(); $this->add_control( 'grid_item_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-above-content' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-item-below-content' => 'border-color: {{VALUE}}', ], ] ); $this->add_control_grid_item_even_border_color(); $this->add_control( 'grid_item_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'solid', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-above-content' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wpr-grid-item-below-content' => 'border-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_control( 'grid_item_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-above-content' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-below-content' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'grid_item_border_type!' => 'none', ], 'render_type' => 'template' ] ); $this->add_responsive_control( 'grid_item_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 10, 'right' => 10, 'bottom' => 10, 'left' => 10, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-above-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-below-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template' ] ); $this->add_control( 'grid_item_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-above-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-below-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'grid_item_shadow', 'selector' => '{{WRAPPER}} .wpr-grid-item', ] ); $this->end_controls_section(); // Styles ==================== // Section: Grid Media ------- $this->start_controls_section( 'section_style_grid_media', [ 'label' => esc_html__( 'Grid Media', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'grid_media_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-image-wrap' => 'border-color: {{VALUE}}', ], ] ); $this->add_control( 'grid_media_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-image-wrap' => 'border-style: {{VALUE}};', ], ] ); $this->add_control( 'grid_media_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-image-wrap' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'grid_media_border_type!' => 'none', ], ] ); $this->add_control( 'grid_media_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-image-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Media Overlay ---- $this->start_controls_section( 'section_style_overlay', [ 'label' => esc_html__( 'Media Overlay', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control_overlay_color(); $this->add_control_overlay_blend_mode(); $this->add_control_overlay_border_color(); $this->add_control_overlay_border_type(); $this->add_control_overlay_border_width(); $this->add_control( 'overlay_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-media-hover-bg' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Title ------------ $this->start_controls_section( 'section_style_title', [ 'label' => esc_html__( 'Title', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_grid_title_style' ); $this->start_controls_tab( 'tab_grid_title_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'title_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'title_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'border-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_title_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'title_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'title_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'title_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a:hover' => 'border-color: {{VALUE}}', ], ] ); $this->add_control_title_pointer_color_hr(); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control_title_pointer(); $this->add_control_title_pointer_height(); $this->add_control_title_pointer_animation(); $this->add_control( 'title_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.3, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-item-title .wpr-pointer-item:before' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-item-title .wpr-pointer-item:after' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .wpr-grid-item-title a' ] ); $this->add_control( 'title_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'title_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'title_border_type!' => 'none', ], ] ); $this->add_responsive_control( 'title_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'title_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-title .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->end_controls_section(); // Styles ==================== // Section: Caption ---------- $this->start_controls_section( 'section_style_caption', [ 'label' => esc_html__( 'Caption', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'caption_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block p' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'caption_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'caption_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => 'border-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'caption_typography', 'selector' => '{{WRAPPER}} .wpr-grid-item-caption' ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'caption_dropcap_typography', 'label' => esc_html__( 'Drop Cap Typography', 'wpr-addons' ), 'selector' => '{{WRAPPER}} .wpr-grid-item-caption.wpr-enable-dropcap p:first-child:first-letter' ] ); $this->add_responsive_control( 'caption_justify', [ 'label' => esc_html__( 'Justify Text', 'wpr-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'widescreen_default' => '', 'laptop_default' => '', 'tablet_extra_default' => '', 'tablet_default' => '', 'mobile_extra_default' => '', 'mobile_default' => '', 'selectors_dictionary' => [ '' => '', 'yes' => 'text-align: justify;' ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => '{{VALUE}}', ], 'render_type' => 'template', ] ); $this->add_control( 'caption_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'caption_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'caption_border_type!' => 'none', ], ] ); $this->add_responsive_control( 'caption_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'caption_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-caption .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Styles ==================== // Section: Date ------------- $this->start_controls_section( 'section_style_date', [ 'label' => esc_html__( 'Date', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'date_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'date_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block > span' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'date_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block > span' => 'border-color: {{VALUE}}', ] ] ); $this->add_control( 'date_extra_text_color', [ 'label' => esc_html__( 'Extra Text Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block span[class*="wpr-grid-extra-text"]' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'date_extra_icon_color', [ 'label' => esc_html__( 'Extra Icon Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block [class*="wpr-grid-extra-icon"] i' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-item-date .inner-block [class*="wpr-grid-extra-icon"] svg' => 'fill: {{VALUE}}' ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'date_typography', 'selector' => '{{WRAPPER}} .wpr-grid-item-date' ] ); $this->add_control( 'date_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block > span' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'date_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'date_border_type!' => 'none', ], ] ); $this->add_control( 'date_text_spacing', [ 'label' => esc_html__( 'Extra Text Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .wpr-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-date .wpr-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_control( 'date_icon_spacing', [ 'label' => esc_html__( 'Extra Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .wpr-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-date .wpr-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'date_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'date_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-date .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Styles ==================== // Section: Time ------------- $this->start_controls_section( 'section_style_time', [ 'label' => esc_html__( 'Time', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'time_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'time_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block > span' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'time_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block > span' => 'border-color: {{VALUE}}', ], ] ); $this->add_control( 'time_extra_text_color', [ 'label' => esc_html__( 'Extra Text Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block span[class*="wpr-grid-extra-text"]' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'time_extra_icon_color', [ 'label' => esc_html__( 'Extra Icon Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block [class*="wpr-grid-extra-icon"] i' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-item-time .inner-block [class*="wpr-grid-extra-icon"] svg' => 'fill: {{VALUE}}' ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'time_typography', 'selector' => '{{WRAPPER}} .wpr-grid-item-time' ] ); $this->add_control( 'time_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block > span' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'time_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'time_border_type!' => 'none', ], ] ); $this->add_control( 'time_text_spacing', [ 'label' => esc_html__( 'Extra Text Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .wpr-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-time .wpr-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_control( 'time_icon_spacing', [ 'label' => esc_html__( 'Extra Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .wpr-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-time .wpr-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'time_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'time_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-time .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->end_controls_section(); // Styles ==================== // Section: Author ----------- $this->start_controls_section( 'section_style_author', [ 'label' => esc_html__( 'Author', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_grid_author_style' ); $this->start_controls_tab( 'tab_grid_author_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'author_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'author_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'author_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'border-color: {{VALUE}}', ], ] ); $this->add_control( 'author_extra_text_color', [ 'label' => esc_html__( 'Extra Text Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block span[class*="wpr-grid-extra-text"]' => 'color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_author_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'author_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'author_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'author_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a:hover' => 'border-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'author_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'author_typography', 'selector' => '{{WRAPPER}} .wpr-grid-item-author' ] ); $this->add_control( 'author_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'author_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'author_border_type!' => 'none', ], ] ); $this->add_control( 'author_border_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ] ] ); $this->add_control( 'author_text_spacing', [ 'label' => esc_html__( 'Extra Text Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .wpr-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-author .wpr-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_control( 'author_icon_spacing', [ 'label' => esc_html__( 'Extra Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .wpr-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-author .wpr-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'author_avatar_spacing', [ 'label' => esc_html__( 'Avatar Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author img' => 'margin-right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'author_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'author_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-author .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Styles ======================= // Section: Likes --------------- $this->add_section_style_likes(); // Styles ========================= // Section: Sharing --------------- $this->add_section_style_sharing(); // Styles ==================== // Section: Lightbox --------- $this->start_controls_section( 'section_style_lightbox', [ 'label' => esc_html__( 'Lightbox', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_grid_lightbox_style' ); $this->start_controls_tab( 'tab_grid_lightbox_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'lightbox_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'lightbox_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'lightbox_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'lightbox_shadow', 'selector' => '{{WRAPPER}} .wpr-grid-item-lightbox i', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_lightbox_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'lightbox_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'lightbox_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'lightbox_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span:hover' => 'border-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'lightbox_shadow_divider', [ 'type' => Controls_Manager::DIVIDER, 'style' => 'thick', ] ); $this->add_control( 'lightbox_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'lightbox_typography', 'selector' => '{{WRAPPER}} .wpr-grid-item-lightbox' ] ); $this->add_control( 'lightbox_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'lightbox_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'lightbox_border_type!' => 'none', ], ] ); $this->add_control( 'lightbox_text_spacing', [ 'label' => esc_html__( 'Extra Text Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .wpr-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-item-lightbox .wpr-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_responsive_control( 'lightbox_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'lightbox_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 10, 'left' => 0, ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'lightbox_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 2, 'right' => 2, 'bottom' => 2, 'left' => 2, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-item-lightbox .inner-block > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Separator Style 1 $this->start_controls_section( 'section_style_separator1', [ 'label' => esc_html__( 'Separator Style 1', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'separator1_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-1 .inner-block > span' => 'border-bottom-color: {{VALUE}}', ], ] ); $this->add_control( 'separator1_width', [ 'label' => esc_html__( 'Width', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px','%'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 100, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-1:not(.wpr-grid-item-display-inline) .inner-block > span' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-sep-style-1.wpr-grid-item-display-inline' => 'width: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'separator1_height', [ 'label' => esc_html__( 'Height', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 1, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 2, ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-1 .inner-block > span' => 'border-bottom-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'separator1_border_type', [ 'label' => esc_html__( 'Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'solid', 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-1 .inner-block > span' => 'border-bottom-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'separator1_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'render_type' => 'template', 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-1 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'separator1_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-1 .inner-block > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Separator Style 2 $this->start_controls_section( 'section_style_separator2', [ 'label' => esc_html__( 'Separator Style 2', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'separator2_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-2 .inner-block > span' => 'border-bottom-color: {{VALUE}}', ], ] ); $this->add_control( 'separator2_width', [ 'label' => esc_html__( 'Width', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px','%'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 20, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-2:not(.wpr-grid-item-display-inline) .inner-block > span' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-sep-style-2.wpr-grid-item-display-inline' => 'width: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'separator2_height', [ 'label' => esc_html__( 'Height', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 2, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-2 .inner-block > span' => 'border-bottom-width: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->add_control( 'separator2_border_type', [ 'label' => esc_html__( 'Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'solid', 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-2 .inner-block > span' => 'border-bottom-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'separator2_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-2 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->add_control( 'separator2_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-sep-style-2 .inner-block > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Taxonomy Style 1 ------ $this->start_controls_section( 'section_style_tax1', [ 'label' => esc_html__( 'Taxonomy Style 1', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_grid_tax1_style' ); $this->start_controls_tab( 'tab_grid_tax1_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'tax1_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'tax1_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'tax1_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'border-color: {{VALUE}}', ], ] ); $this->add_control( 'tax1_extra_text_color', [ 'label' => esc_html__( 'Extra Text Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block span[class*="wpr-grid-extra-text"]' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'tax1_extra_icon_color', [ 'label' => esc_html__( 'Extra Icon Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9C9C9C', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block [class*="wpr-grid-extra-icon"] i' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block [class*="wpr-grid-extra-icon"] svg' => 'fill: {{VALUE}}' ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_tax1_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'tax1_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-pointer-item:before' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-pointer-item:after' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'tax1_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'tax1_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a:hover' => 'border-color: {{VALUE}}', ], ] ); $this->add_control_tax1_pointer_color_hr(); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control_tax1_pointer(); $this->add_control_tax1_pointer_height(); $this->add_control_tax1_pointer_animation(); $this->add_control( 'tax1_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-pointer-item:before' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-pointer-item:after' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'tax1_typography', 'selector' => '{{WRAPPER}} .wpr-grid-tax-style-1' ] ); $this->add_control( 'tax1_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'tax1_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'tax1_border_type!' => 'none', ], ] ); $this->add_control( 'tax1_text_spacing', [ 'label' => esc_html__( 'Extra Text Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'tax1_icon_spacing', [ 'label' => esc_html__( 'Extra Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-tax-style-1 .wpr-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'tax1_gutter', [ 'label' => esc_html__( 'Gutter', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, ], ], 'default' => [ 'unit' => 'px', 'size' => 3, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'margin-right: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'tax1_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->add_responsive_control( 'tax1_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->add_control( 'tax1_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 2, 'right' => 2, 'bottom' => 2, 'left' => 2, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-1 .inner-block a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Taxonomy Style 2 - $this->start_controls_section( 'section_style_tax2', [ 'label' => esc_html__( 'Taxonomy Style 2', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_grid_tax2_style' ); $this->start_controls_tab( 'tab_grid_tax2_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'tax2_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'tax2_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'tax2_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'border-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_tax2_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'tax2_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-pointer-item:before' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-pointer-item:after' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'tax2_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#4A45D2', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'tax2_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a:hover' => 'border-color: {{VALUE}}', ], ] ); $this->add_control_tax2_pointer_color_hr(); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control_tax2_pointer(); $this->add_control_tax2_pointer_height(); $this->add_control_tax2_pointer_animation(); $this->add_control( 'tax2_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-pointer-item:before' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-pointer-item:after' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'tax2_typography', 'selector' => '{{WRAPPER}} .wpr-grid-tax-style-2' ] ); $this->add_control( 'tax2_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'tax2_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'tax2_border_type!' => 'none', ], ] ); $this->add_control( 'tax2_text_spacing', [ 'label' => esc_html__( 'Extra Text Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_control( 'tax2_icon_spacing', [ 'label' => esc_html__( 'Extra Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-tax-style-2 .wpr-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'tax2_gutter', [ 'label' => esc_html__( 'Gutter', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, ], ], 'default' => [ 'unit' => 'px', 'size' => 3, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'margin-right: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_responsive_control( 'tax2_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 10, 'bottom' => 0, 'left' => 10, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->add_responsive_control( 'tax2_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', ] ); $this->add_control( 'tax2_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 3, 'right' => 3, 'bottom' => 3, 'left' => 3, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-tax-style-2 .inner-block a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Navigation ------- $this->start_controls_section( 'wpr__section_style_grid_slider_nav', [ 'label' => esc_html__( 'Slider Navigation', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_select' => 'slider', ], ] ); $this->start_controls_tabs( 'tabs_grid_slider_nav_style' ); $this->start_controls_tab( 'tab_grid_slider_nav_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'grid_slider_nav_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => 'rgba(255,255,255,0.8)', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-grid-slider-arrow svg' => 'fill: {{VALUE}};', ], ] ); $this->add_control( 'grid_slider_nav_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'grid_slider_nav_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_slider_nav_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'grid_slider_nav_hover_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow:hover' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-grid-slider-arrow:hover svg' => 'fill: {{VALUE}};', ], ] ); $this->add_control( 'grid_slider_nav_hover_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'grid_slider_nav_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'grid_slider_nav_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-slider-arrow svg' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'grid_slider_nav_font_size', [ 'label' => esc_html__( 'Font Size', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 200, ], ], 'default' => [ 'unit' => 'px', 'size' => 25, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-slider-arrow svg' => 'width: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'grid_slider_nav_size', [ 'label' => esc_html__( 'Box Size', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px',], 'range' => [ 'px' => [ 'min' => 10, 'max' => 200, ], ], 'default' => [ 'unit' => 'px', 'size' => 60, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], 'separator' => 'after', ] ); $this->add_control( 'grid_slider_nav_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'border-style: {{VALUE}};', ], ] ); $this->add_control( 'grid_slider_nav_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 2, 'right' => 2, 'bottom' => 0, 'left' => 2, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'grid_slider_nav_border_type!' => 'none', ], ] ); $this->add_control( 'grid_slider_nav_border_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-arrow' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'after', ] ); $this->add_control_stack_grid_slider_nav_position(); $this->end_controls_section(); // End Controls Section // Styles ==================== // Section: Pagination ------- $this->start_controls_section( 'wpr__section_style_grid_slider_dots', [ 'label' => esc_html__( 'Slider Pagination', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_select' => 'slider', ], ] ); $this->start_controls_tabs( 'tabs_grid_slider_dots' ); $this->start_controls_tab( 'tab_grid_slider_dots_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'grid_slider_dots_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => 'rgba(0,0,0,0.35)', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'grid_slider_dots_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'border-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_slider_dots_active', [ 'label' => esc_html__( 'Active', 'wpr-addons' ), ] ); $this->add_control( 'grid_slider_dots_active_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#222222', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dots .slick-active .wpr-grid-slider-dot' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'grid_slider_dots_active_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dots .slick-active .wpr-grid-slider-dot' => 'border-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'grid_slider_dots_width', [ 'label' => esc_html__( 'Box Width', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px',], 'range' => [ 'px' => [ 'min' => 1, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 8, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'width: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', 'render_type' => 'template' ] ); $this->add_responsive_control( 'grid_slider_dots_height', [ 'label' => esc_html__( 'Box Height', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px',], 'range' => [ 'px' => [ 'min' => 1, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 8, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'height: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template' ] ); $this->add_control( 'grid_slider_dots_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'border-style: {{VALUE}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control( 'grid_slider_dots_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'render_type' => 'template', 'condition' => [ 'grid_slider_dots_border_type!' => 'none', ], ] ); $this->add_control( 'grid_slider_dots_border_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => 50, 'right' => 50, 'bottom' => 50, 'left' => 50, 'unit' => '%', ], 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dot' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'grid_slider_dots_gutter', [ 'type' => Controls_Manager::SLIDER, 'label' => esc_html__( 'Gutter', 'wpr-addons' ), 'size_units' => ['px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 7, ], 'selectors' => [ '{{WRAPPER}}.wpr-grid-slider-dots-horizontal .wpr-grid-slider-dot' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.wpr-grid-slider-dots-vertical .wpr-grid-slider-dot' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], 'render_type' => 'template', 'separator' => 'before', ] ); $this->add_control_grid_slider_dots_hr(); $this->add_responsive_control( 'grid_slider_dots_vr', [ 'type' => Controls_Manager::SLIDER, 'label' => esc_html__( 'Vertical Position', 'wpr-addons' ), 'size_units' => [ '%', 'px' ], 'range' => [ '%' => [ 'min' => -20, 'max' => 120, ], 'px' => [ 'min' => -200, 'max' => 2000, ], ], 'default' => [ 'unit' => '%', 'size' => 96, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-slider-dots' => 'top: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); // End Controls Section // Styles ==================== // Section: Filters ---------- $this->start_controls_section( 'section_style_filters', [ 'label' => esc_html__( 'Filters', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, 'condition' => [ 'layout_select!' => 'slider', 'layout_filters' => 'yes', ], ] ); $this->add_control( 'active_styles_notice', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => esc_html__('Apply active filter styles from the hover tab.', 'wpr-addons'), 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info' ] ); $this->start_controls_tabs( 'tabs_grid_filters_style' ); $this->start_controls_tab( 'tab_grid_filters_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'filters_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#7A7A7A', 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'filters_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > span' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'filters_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > span' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'filters_box_shadow', 'selector' => '{{WRAPPER}} .wpr-grid-filters li > a, {{WRAPPER}} .wpr-grid-filters li > span', ] ); $this->add_control( 'filters_wrapper_color', [ 'label' => esc_html__( 'Wrapper Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters' => 'background-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_filters_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'filters_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > span:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > .wpr-active-filter' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'filters_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a:hover' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > span:hover' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > .wpr-active-filter' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'filters_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a:hover' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > span:hover' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-filters li > .wpr-active-filter' => 'border-color: {{VALUE}}', ] ] ); $this->add_control_filters_pointer_color_hr(); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'filters_box_shadow_hr', 'selector' => '{{WRAPPER}} .wpr-grid-filters li > a:hover, {{WRAPPER}} .wpr-grid-filters li > span:hover', 'separator' => 'after', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control_filters_pointer(); $this->add_control_filters_pointer_height(); $this->add_control_filters_pointer_animation(); $this->add_control( 'filters_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-filters li > span' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-pointer-item:before' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-pointer-item:after' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'filters_typography', 'selector' => '{{WRAPPER}} .wpr-grid-filters li' ] ); $this->add_control( 'filters_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wpr-grid-filters li > span' => 'border-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_control( 'filters_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-filters li > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'filters_border_type!' => 'none', ], ] ); $this->add_responsive_control( 'filters_distance_from_grid', [ 'label' => esc_html__( 'Distance From Grid', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 25, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_control( 'filters_icon_spacing', [ 'label' => esc_html__( 'Extra Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-filters-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'filters_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 0, 'right' => 5, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'filters_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', ], 'default' => [ 'top' => 3, 'right' => 15, 'bottom' => 3, 'left' => 15, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-filters li > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'filters_wrapper_padding', [ 'label' => esc_html__( 'Wrapper Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'filters_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 3, 'right' => 3, 'bottom' => 3, 'left' => 3, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-filters li > a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-filters li > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Pagination ---------- $this->start_controls_section( 'section_style_pagination', [ 'label' => esc_html__( 'Pagination', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, 'condition' => [ 'layout_select!' => 'slider', 'layout_pagination' => 'yes', ], ] ); $this->start_controls_tabs( 'tabs_grid_pagination_style' ); $this->start_controls_tab( 'tab_grid_pagination_normal', [ 'label' => esc_html__( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'pagination_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination svg' => 'fill: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'pagination_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-pagination-finish' => 'color: {{VALUE}}', ] ] ); $this->add_control( 'pagination_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'pagination_box_shadow', 'selector' => '{{WRAPPER}} .wpr-grid-pagination a, {{WRAPPER}} .wpr-grid-pagination > div > span', ] ); $this->add_control( 'pagination_loader_color', [ 'label' => esc_html__( 'Loader Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-double-bounce .wpr-child' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-wave .wpr-rect' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-spinner-pulse' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-chasing-dots .wpr-child' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-three-bounce .wpr-child' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-fading-circle .wpr-circle:before' => 'background-color: {{VALUE}}', ], 'condition' => [ 'pagination_type' => [ 'load-more', 'infinite-scroll' ] ] ] ); $this->add_control( 'pagination_wrapper_color', [ 'label' => esc_html__( 'Wrapper Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination' => 'background-color: {{VALUE}}', ], 'separator' => 'after', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_grid_pagination_hover', [ 'label' => esc_html__( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'pagination_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination a:hover svg' => 'fill: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination > div > span:not(.wpr-disabled-arrow):hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'pagination_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#4A45D2', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a:hover' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination > div > span:not(.wpr-disabled-arrow):hover' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'pagination_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#E8E8E8', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a:hover' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination > div > span:not(.wpr-disabled-arrow):hover' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'border-color: {{VALUE}}', ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'pagination_box_shadow_hr', 'selector' => '{{WRAPPER}} .wpr-grid-pagination a:hover, {{WRAPPER}} .wpr-grid-pagination > div > span:not(.wpr-disabled-arrow):hover', 'separator' => 'after', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'pagination_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-pagination svg' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'transition-duration: {{VALUE}}s', ], 'separator' => 'after', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'pagination_typography', 'selector' => '{{WRAPPER}} .wpr-grid-pagination' ] ); $this->add_responsive_control( 'pagination_icon_size', [ 'label' => esc_html__( 'Icon Size', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 5, 'max' => 30, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination svg' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'pagination_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'border-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_control( 'pagination_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'pagination_border_type!' => 'none', ], ] ); $this->add_responsive_control( 'pagination_distance_from_grid', [ 'label' => esc_html__( 'Distance From Grid', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 35, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination' => 'margin-top: {{SIZE}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_control( 'pagination_gutter', [ 'label' => esc_html__( 'Gutter', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'margin-right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'pagination_icon_spacing', [ 'label' => esc_html__( 'Icon Spacing', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 25, ], ], 'default' => [ 'unit' => 'px', 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination .wpr-prev-post-link i' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-next-post-link i' => 'padding-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-first-page i' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-prev-page i' => 'padding-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-next-page i' => 'padding-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-last-page i' => 'padding-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-prev-post-link svg' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-next-post-link svg' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-first-page svg' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-prev-page svg' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-next-page svg' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination .wpr-last-page svg' => 'margin-left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'pagination_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 8, 'right' => 15, 'bottom' => 8, 'left' => 15, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-disabled-arrow' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'pagination_wrapper_padding', [ 'label' => esc_html__( 'Wrapper Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'pagination_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 3, 'right' => 3, 'bottom' => 3, 'left' => 3, ], 'selectors' => [ '{{WRAPPER}} .wpr-grid-pagination a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination > div > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-grid-pagination span.wpr-grid-current-page' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); } // Get Taxonomies Related to Post Type public function get_related_taxonomies() { $relations = []; $post_types = Utilities::get_custom_types_of( 'post', false ); foreach ( $post_types as $slug => $title ) { $relations[$slug] = []; foreach ( get_object_taxonomies( $slug ) as $tax ) { array_push( $relations[$slug], $tax ); } } return json_encode( $relations ); } // Get Max Pages public function get_max_num_pages( $settings ) { $query = new \WP_Query( $this->get_main_query_args() ); $max_num_pages = intval( ceil( $query->max_num_pages ) ); // Reset wp_reset_postdata(); // $max_num_pages return $max_num_pages; } // Main Query Args public function get_main_query_args() { $settings = $this->get_settings_for_display(); $author = ! empty( $settings[ 'query_author' ] ) ? implode( ',', $settings[ 'query_author' ] ) : ''; // Get Paged if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); } elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); } else { $paged = 1; } if ( empty($settings['query_offset']) ) { $settings[ 'query_offset' ] = 0; } $offset = ( $paged - 1 ) * $settings['query_posts_per_page'] + $settings[ 'query_offset' ]; if ( ! wpr_fs()->can_use_premium_code() ) { $settings[ 'query_randomize' ] = ''; $settings['order_posts'] = 'date'; } $query_order_by = '' != $settings['query_randomize'] ? $settings['query_randomize'] : $settings['order_posts']; if ( 'manual' === $settings[ 'query_selection' ] ) { $query_order_by = 'post__in'; } // Dynamic $args = [ 'post_type' => 'attachment', 'post_status' => 'inherit', 'tax_query' => $this->get_tax_query_args(), 'post__not_in' => $settings[ 'query_exclude_attachment' ], 'posts_per_page' => $settings['query_posts_per_page'], 'orderby' => $query_order_by, 'author' => $author, 'paged' => $paged, 'offset' => $offset ]; // Manual if ( 'manual' === $settings[ 'query_selection' ] ) { $post_ids = ['']; $attachments = $settings['query_manual_attachment']; $attachments_count = 0; if (!empty($attachments) ) { $attachments_count = count($attachments); } for ( $i = 0; $i < $attachments_count; $i++ ) { array_push( $post_ids, $settings['query_manual_attachment'][$i]['id'] ); } $orderby = '' === $settings[ 'query_randomize' ] ? 'post__in' : 'rand'; $args = [ 'post_type' => 'attachment', 'post_status' => 'inherit', 'post__in' => $post_ids, 'orderby' => $orderby, 'paged' => $paged, 'posts_per_page' => $settings['query_posts_per_page'], 'paged' => $paged, ]; } if ( 'rand' !== $query_order_by && 'manual' !== $settings['query_selection'] ) { $args['order'] = $settings['order_direction']; } return $args; } // Taxonomy Query Args public function get_tax_query_args() { $settings = $this->get_settings(); $tax_query = []; foreach ( get_object_taxonomies( 'attachment' ) as $tax ) { if ( ! empty($settings[ 'query_taxonomy_'. $tax ]) ) { array_push( $tax_query, [ 'taxonomy' => $tax, 'field' => 'id', 'terms' => $settings[ 'query_taxonomy_'. $tax ] ] ); } } return $tax_query; } // Get Animation Class public function get_animation_class( $data, $object ) { $class = ''; // Animation Class if ( 'none' !== $data[ $object .'_animation'] ) { $class .= ' wpr-'. $object .'-'. $data[ $object .'_animation']; $class .= ' wpr-anim-size-'. $data[ $object .'_animation_size']; $class .= ' wpr-anim-timing-'. $data[ $object .'_animation_timing']; if ( 'yes' === $data[ $object .'_animation_tr'] ) { $class .= ' wpr-anim-transparency'; } } return $class; } // Get Image Effect Class public function get_image_effect_class( $settings ) { $class = ''; if ( ! wpr_fs()->can_use_premium_code() ) { if ( 'pro-zi' == $settings['image_effects'] || 'pro-zo' == $settings['image_effects'] || 'pro-go' == $settings['image_effects'] || 'pro-bo' == $settings['image_effects'] ) { $settings['image_effects'] = 'none'; } } // Animation Class if ( 'none' !== $settings['image_effects'] ) { $class .= ' wpr-'. $settings['image_effects']; } // Slide Effect if ( 'slide' !== $settings['image_effects'] ) { $class .= ' wpr-effect-size-'. $settings['image_effects_size']; } else { $class .= ' wpr-effect-dir-'. $settings['image_effects_direction']; } return $class; } // Render Post Thumbnail public function render_post_thumbnail( $settings ) { $id = get_the_ID(); $src = Group_Control_Image_Size::get_attachment_image_src( $id, 'layout_image_crop', $settings ); $alt = '' === wp_get_attachment_caption( $id ) ? get_the_title() : wp_get_attachment_caption( $id ); echo '
'; echo ''. esc_attr( $alt ) .''; echo '
'; } // Render Media Overlay public function render_media_overlay( $settings ) { echo '
'; if ( wpr_fs()->can_use_premium_code() ) { if ( '' !== $settings['overlay_image']['url'] ) { echo ''; } } echo '
'; } // Render Post Title public function render_post_title( $settings, $class ) { $title_pointer = ! wpr_fs()->can_use_premium_code() ? 'none' : $this->get_settings()['title_pointer']; $title_pointer_animation = ! wpr_fs()->can_use_premium_code() ? 'fade' : $this->get_settings()['title_pointer_animation']; $pointer_item_class = (isset($this->get_settings()['title_pointer']) && 'none' !== $this->get_settings()['title_pointer']) ? 'class="wpr-pointer-item"' : ''; $class .= ' wpr-pointer-'. $title_pointer; $class .= ' wpr-pointer-line-fx wpr-pointer-fx-'. $title_pointer_animation; $tags_whitelist = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'span', 'p']; $element_title_tag = Utilities::validate_html_tags_wl( $settings['element_title_tag'], 'h2', $tags_whitelist ); echo '<'. esc_attr($element_title_tag) .' class="'. esc_attr($class) .'">'; echo '
'; echo ''; echo esc_html(wp_trim_words( get_the_title(), $settings['element_word_count'] )); echo ''; echo '
'; echo ''; } // Render Post Excerpt public function render_post_excerpt( $settings, $class ) { $dropcap_class = 'yes' === $settings['element_dropcap'] ? ' wpr-enable-dropcap' : ''; $class .= $dropcap_class; if ( '' === get_the_excerpt() ) { return; } echo '
'; echo '
'; echo '

'. esc_html(wp_trim_words( get_the_excerpt(), $settings['element_word_count'] )) .'

'; echo '
'; echo '
'; } // Render Post Date public function render_post_date( $settings, $class ) { echo '
'; echo '
'; echo ''; // Text: Before if ( 'before' === $settings['element_extra_text_pos'] ) { echo ''. esc_html( $settings['element_extra_text'] ) .''; } // Icon: Before if ( 'before' === $settings['element_extra_icon_pos'] ) { ob_start(); \Elementor\Icons_Manager::render_icon($settings['element_extra_icon'], ['aria-hidden' => 'true']); $extra_icon = ob_get_clean(); echo ''; echo $extra_icon; echo ''; } // Date echo esc_html(apply_filters( 'the_date', get_the_date( '' ), get_option( 'date_format' ), '', '' )); // Icon: After if ( 'after' === $settings['element_extra_icon_pos'] ) { ob_start(); \Elementor\Icons_Manager::render_icon($settings['element_extra_icon'], ['aria-hidden' => 'true']); $extra_icon = ob_get_clean(); echo ''; echo $extra_icon; echo ''; } // Text: After if ( 'after' === $settings['element_extra_text_pos'] ) { echo ''. esc_html( $settings['element_extra_text'] ) .''; } echo ''; echo '
'; echo '
'; } // Render Post Time public function render_post_time( $settings, $class ) { echo '
'; echo '
'; echo ''; // Text: Before if ( 'before' === $settings['element_extra_text_pos'] ) { echo ''. esc_html( $settings['element_extra_text'] ) .''; } // Icon: Before if ( 'before' === $settings['element_extra_icon_pos'] ) { ob_start(); \Elementor\Icons_Manager::render_icon($settings['element_extra_icon'], ['aria-hidden' => 'true']); $extra_icon = ob_get_clean(); echo ''; echo $extra_icon; echo ''; } // Time echo esc_html(get_the_time('')); // Icon: After if ( 'after' === $settings['element_extra_icon_pos'] ) { ob_start(); \Elementor\Icons_Manager::render_icon($settings['element_extra_icon'], ['aria-hidden' => 'true']); $extra_icon = ob_get_clean(); echo ''; echo $extra_icon; echo ''; } // Text: After if ( 'after' === $settings['element_extra_text_pos'] ) { echo ''. esc_html( $settings['element_extra_text'] ) .''; } echo ''; echo '
'; echo '
'; } // Render Post Author public function render_post_author( $settings, $class ) { $author_id = get_post_field( 'post_author' ); echo '
'; echo ''; echo '
'; } // Render Post Likes public function render_post_likes( $settings, $class, $post_id ) {} // Render Post Sharing public function render_post_sharing_icons( $settings, $class ) {} // Render Post Lightbox public function render_post_lightbox( $settings, $class, $post_id ) { echo '
'; echo '
'; $lightbox_source = get_the_post_thumbnail_url( $post_id ); // Audio Post Type if ( 'audio' === get_post_format() ) { // Load Meta Value if ( 'meta' === $settings['element_lightbox_pfa_select'] ) { $utilities = new Utilities(); $meta_value = get_post_meta( $post_id, $settings['element_lightbox_pfa_meta'], true ); // URL if ( false === strpos( $meta_value, '