$this->add_control( // xx Layout 'layout_heading', [ 'label' => __( 'Layout', 'zilom-themer' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'layout', [ 'label' => __( 'Layout Display', 'zilom-themer' ), 'type' => Controls_Manager::SELECT, 'default' => 'grid', 'options' => [ 'grid' => __( 'Grid', 'zilom-themer' ), 'carousel' => __( 'Carousel', 'zilom-themer' ), ] ] ); $this->add_control( 'style', [ 'label' => __('Style', 'zilom-themer'), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'gallery-style-1' => __( 'Gallery Style I', 'zilom-themer' ), ], 'default' => 'style-1', ] ); $this->add_control( 'image_size', [ 'label' => __('Style', 'zilom-themer'), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => $this->get_thumbnail_size(), 'default' => 'zilom_medium' ] ); $this->add_control( 'pagination', [ 'label' => __('Pagination', 'zilom-themer'), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'condition' => [ 'layout' => 'grid' ], ] ); $this->end_controls_section(); $this->add_control_carousel(false, array('layout' => 'carousel')); $this->add_control_grid(array('layout' => 'grid')); } protected function render() { $settings = $this->get_settings_for_display(); printf( '
', $this->get_name() ); if( !empty($settings['layout']) ){ include $this->get_template('gallery/' . $settings['layout'] . '.php'); } print '
'; } } $widgets_manager->register(new GVAElement_Gallery());
Open chat
Hello
Can we help you?