start_controls_section( 'content_section', [ 'label' => esc_html__( 'Content', 'businesswebx' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'gallery', [ 'label' => esc_html__( 'Add Images', 'businesswebx' ), 'type' => \Elementor\Controls_Manager::GALLERY, 'default' => [], ] ); $columns = []; for($i=1; $i<=12; $i++){ $width = (12/$i)/12 *100; $columns[$width."%"] = $i; } $this->add_responsive_control( 'columns', [ 'label' => esc_html__( 'Columns', 'businesswebx' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '33%', 'options' => $columns, 'selectors' => [ '{{WRAPPER}} .gallery-item' => 'width: calc({{SIZE}} - 20px);', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'style_section', [ 'label' => esc_html__( 'Style', 'businesswebx' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'height', [ 'label' => esc_html__( 'Heights', 'businesswebx' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'unit' => 'px', 'size' => 400 ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 10, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'size_units' => ['px', '%', 'vh'], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); // die(var_dump($settings)); ?>