start_controls_section( 'content_section', [ 'label' => __( 'Videos', 'addonnest' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'columns', [ 'label' => __( 'Grid Columns', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '3', 'options' => [ '2' => '2 Columns', '3' => '3 Columns', '4' => '4 Columns', ] ] ); $this->add_control( 'videos', [ 'label' => __( 'Add Videos', 'addonnest' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => [ [ 'name' => 'title', 'label' => __( 'Title', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __( 'Video Title', 'addonnest' ), ], [ 'name' => 'source', 'label' => __( 'Video Source', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ 'youtube' => 'YouTube', 'vimeo' => 'Vimeo', 'self' => 'Self Hosted', ], 'default' => 'youtube', ], [ 'name' => 'url', 'label' => __( 'Video URL', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXT, 'placeholder' => __( 'https://', 'addonnest' ), ], ], 'default' => [], 'title_field' => '{{{ title }}}', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $columns = $settings['columns']; $videos = $settings['videos']; $column_class = 'columns-' . $columns; echo '