usk_is_edit_mode()) { return ['usk-all-styles']; } else { return ['usk-font', 'usk-shiny-grid', 'slick-modal']; } } // public function get_custom_help_url() { // return 'https://youtu.be/3VkvEpVaNAM'; // } public function get_query() { return $this->_query; } protected function register_controls() { $this->start_controls_section( 'section_woocommerce_layout', [ 'label' => esc_html__('Layout', 'ultimate-store-kit'), ] ); $this->add_control( 'layout_style', [ 'label' => esc_html__('Style', 'ultimate-store-kit'), 'type' => Controls_Manager::SELECT, 'default' => 'grid', 'options' => [ 'grid' => esc_html__('Grid', 'ultimate-store-kit'), 'list' => esc_html__('List', 'ultimate-store-kit'), ], ] ); $this->add_responsive_control( 'columns', [ 'label' => esc_html__('Columns', 'ultimate-store-kit'), 'type' => Controls_Manager::SELECT, 'default' => '3', 'tablet_default' => '2', 'mobile_default' => '1', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', ], 'condition' => [ 'layout_style' => 'grid' ], 'selectors' => [ '{{WRAPPER}} .usk-shiny-grid .usk-grid' => 'grid-template-columns: repeat({{VALUE}}, 1fr);', ], 'render_type' => 'template' ] ); $this->add_responsive_control( 'items_columns_gap', [ 'label' => esc_html__('Columns Gap', 'ultimate-store-kit'), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 30, ], 'selectors' => [ '{{WRAPPER}} .usk-shiny-grid .usk-grid' => 'grid-column-gap: {{SIZE}}px;', ], ] ); $this->add_responsive_control( 'items_row_gap', [ 'label' => esc_html__('Row Gap', 'ultimate-store-kit'), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 30, ], 'selectors' => [ '{{WRAPPER}} .usk-shiny-grid .usk-grid' => 'grid-row-gap: {{SIZE}}px;', ], ] ); $this->register_global_controls_grid_layout(); $this->add_control( 'show_tab', [ 'label' => esc_html__('Columns Filter', 'ultimate-store-kit'), 'type' => Controls_Manager::SWITCHER, 'separator' => 'before' ] ); $this->add_control( 'filter_column_lists', [ 'label' => __('Select Column Type', 'ultimate-store-kit'), 'type' => Controls_Manager::SELECT2, 'label_block' => true, 'multiple' => true, 'options' => [ 'list-2' => __('List', 'ultimate-store-kit'), 'grid-2' => __('Column 2', 'ultimate-store-kit'), 'grid-3' => __('Column 3', 'ultimate-store-kit'), 'grid-4' => __('Column 4', 'ultimate-store-kit'), 'grid-5' => __('Column 5', 'ultimate-store-kit'), 'grid-6' => __('Column 6', 'ultimate-store-kit'), ], 'condition' => [ 'show_tab' => 'yes' ], 'default' => ['list-2', 'grid-2', 'grid-3', 'grid-4'], ] ); $this->add_control( 'show_result_count', [ 'label' => esc_html__('Result Count', 'ultimate-store-kit'), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__('Show', 'ultimate-store-kit'), 'label_off' => esc_html__('Hide', 'ultimate-store-kit'), 'return_value' => 'yes', 'default' => 'yes', 'separator' => 'before', 'condition' => [ 'show_tab' => 'yes' ] ] ); $this->add_control( 'show_pagination', [ 'label' => esc_html__('Pagination', 'ultimate-store-kit'), 'type' => Controls_Manager::SWITCHER, 'separator' => 'before' ] ); $this->end_controls_section(); $this->start_controls_section( 'section_post_query_builder', [ 'label' => __('Query', 'ultimate-store-kit'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->register_query_builder_controls(); $this->register_controls_wc_additional(); $this->end_controls_section(); $this->register_global_controls_additional(); $this->register_global_controls_grid_columns(); $this->register_global_controls_result_count(); $this->register_global_controls_grid_items(); $this->register_global_controls_grid_image(); $this->register_global_controls_content(); $this->register_global_controls_title(); $this->register_global_controls_category(); $this->register_global_controls_excerpt(); $this->register_global_controls_price(); $this->register_global_controls_rating(); $this->register_global_controls_badge(); $this->register_global_controls_add_to_cart(); $this->register_global_controls_action_btn(); $this->register_global_controls_grid_pagination(); } public function render_header() { $settings = $this->get_settings_for_display(); $this->add_render_attribute('usk-shiny-grid', 'class', 'usk-shiny-grid usk-grid-carousel usk-css-grid', true); $this->add_render_attribute('usk-shiny-grid', 'data-filter', [$settings['show_tab']]); ?>