register_jet_control_group( 'section_select_style', [ 'title' => esc_html__( 'Select', 'jet-smart-filters' ), 'tab' => 'style', ] ); } public function register_filter_style_controls() { $css_scheme = apply_filters( 'jet-smart-filters/widgets/select/css-scheme', [ 'filter' => '.jet-select', 'select' => '.jet-select__control', ] ); $this->start_jet_control_group( 'section_select_style' ); $this->register_jet_control( 'content_position', [ 'tab' => 'style', 'label' => esc_html__( 'Direction', 'jet-smart-filters' ), 'type' => 'select', 'options' => [ 'flex' => esc_html__( 'Line', 'jet-smart-filters' ), 'block' => esc_html__( 'Columns', 'jet-smart-filters' ), ], 'default' => 'block', 'css' => [ [ 'property' => 'display', 'selector' => '.jet-smart-filters-select' . ', .jet-smart-filters-hierarchy ' . $css_scheme['filter'], ], ], ] ); $this->register_jet_control( 'content_alignment', [ 'tab' => 'style', 'label' => esc_html__( 'Alignment', 'jet-smart-filters' ), 'type' => 'align-items', 'css' => [ [ 'property' => 'align-items', 'selector' => '.jet-smart-filters-select' . ', .jet-smart-filters-hierarchy ' . $css_scheme['filter'], ], ], 'required' => [ 'content_position', '=', 'flex' ], ] ); $this->register_jet_control( 'select_width', [ 'tab' => 'style', 'label' => esc_html__( 'Select width', 'jet-smart-filters' ), 'type' => 'number', 'units' => true, 'css' => [ [ 'property' => 'max-width', 'selector' => '.jet-smart-filters-select ' . $css_scheme['filter'] . ', .jet-smart-filters-hierarchy ' . $css_scheme['select'], ], [ 'property' => 'flex-basis', 'selector' => '.jet-smart-filters-select ' . $css_scheme['filter'] . ', .jet-smart-filters-hierarchy ' . $css_scheme['select'], ], ], ] ); $this->end_jet_control_group(); } }