start_controls_section( 'section_title', [ 'label' => esc_html__( 'Event List', 'addonnest' ), ] ); $this->add_control( 'events_list', [ 'label' => esc_html__( 'Event Items', 'addonnest' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'show_label' => true, 'default' => [ [ 'text' => esc_html__( 'Event #1', 'addonnest' ), 'icon' => 'fa fa-check', ], ], 'fields' => [ [ 'name' => 'event_image', 'label' => esc_html__( 'Event Image', 'addonnest' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'label_block' => true, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ], [ 'name' => 'event_title', 'label' => esc_html__( 'Title', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'label_block' => true, 'placeholder' => esc_html__( 'Title', 'addonnest' ), 'default' => esc_html__( 'Join the Biggest Rock Star Event 2022', 'addonnest' ), ], [ 'name' => 'event_content', 'label' => esc_html__( 'Events Content', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'label_block' => true, 'placeholder' => esc_html__( 'Events Content', 'addonnest' ), 'default' => esc_html__( 'Audio player software is used to play back sound recordings in one of the many formats available for computers today. It can also play back music. There is audio player software that is native to the computer\'s operating system', 'addonnest' ), ], [ 'name' => 'event_button_1', 'label' => esc_html__( 'Button Text 1', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => esc_html__( 'Button Text', 'addonnest' ), 'default' => esc_html__( 'Buy Now', 'addonnest' ), ], [ 'name' => 'event_button_link_1', 'label' => esc_html__( 'Button Link 1', 'addonnest' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => esc_url( '#' ), 'default' => [ 'url' => '#', ], ], [ 'name' => 'event_button_2', 'label' => esc_html__( 'Button Text 2', 'addonnest' ), 'type' => \Elementor\Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => esc_html__( 'Button Text', 'addonnest' ), 'default' => esc_html__( 'Read More', 'addonnest' ), ], [ 'name' => 'event_button_link_2', 'label' => esc_html__( 'Button Link 2', 'addonnest' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => esc_url( '#' ), 'default' => [ 'url' => '#', ], ], ], ] ); $this->end_controls_section(); // Title Section Start $this->start_controls_section( 'section_title_style', [ 'label' => esc_html__( 'Title Style', 'addonnest' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'title_margin', [ 'label' => esc_html__( 'Margin', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .event-content-inner h2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .event-content-inner h2' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => esc_html__( 'Typography', 'addonnest' ), 'selector' => '{{WRAPPER}} .event-content-inner h2', ] ); $this->end_controls_section(); // Content Section Start $this->start_controls_section( 'section_content_style', [ 'label' => esc_html__( 'Content Style', 'addonnest' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'content_margin', [ 'label' => esc_html__( 'Margin', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .event-content-inner p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'content_color', [ 'label' => esc_html__( 'Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .event-content-inner p' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'label' => esc_html__( 'Typography', 'addonnest' ), 'selector' => '{{WRAPPER}} .event-content-inner p', ] ); $this->end_controls_section(); // Button 1 Section Start $this->start_controls_section( 'section_button_1_style', [ 'label' => esc_html__( 'Button 1', 'addonnest' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'event_btn_typography', 'label' => esc_html__( 'Typography', 'addonnest' ), 'selector' => '{{WRAPPER}} .event-single-wrapper .event-content-inner .btn-1', ] ); $this->add_control( 'button_1_color', [ 'label' => esc_html__( 'Text Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-1' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'button_1_hover_color', [ 'label' => esc_html__( 'Text Hover Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-1:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'button_1_background', 'label' => esc_html__( 'Background', 'addonnest' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .event-content-inner .btn-1', ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'button_1_border', 'selector' => '{{WRAPPER}} .event-content-inner .btn-1', ] ); $this->add_control( 'button_1_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-1' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'button_1_box_shadow', 'selector' => '{{WRAPPER}} .event-content-inner .btn-1', ] ); $this->add_responsive_control( 'button_1_padding', [ 'label' => esc_html__( 'Padding', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Button 2 Section Start $this->start_controls_section( 'section_button_2_style', [ 'label' => esc_html__( 'Button 2', 'addonnest' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'event_btn2_typography', 'label' => esc_html__( 'Typography', 'addonnest' ), 'selector' => '{{WRAPPER}} .event-single-wrapper .event-content-inner .btn.btn-transparent', ] ); $this->add_control( 'button_2_color', [ 'label' => esc_html__( 'Text Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-transparent' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'button_2_hover_color', [ 'label' => esc_html__( 'Text Hover Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-transparent:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'button_2_background', 'label' => esc_html__( 'Background', 'addonnest' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .event-content-inner .btn-transparent', ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'button_2_border', 'selector' => '{{WRAPPER}} .event-content-inner .btn-transparent', ] ); $this->add_control( 'button_2_border_radius', [ 'label' => esc_html__( 'Border Radius', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-transparent' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'button_2_box_shadow', 'selector' => '{{WRAPPER}} .event-content-inner .btn-transparent', ] ); $this->add_responsive_control( 'button_2_padding', [ 'label' => esc_html__( 'Padding', 'addonnest' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .event-content-inner .btn-transparent' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); if ( empty( $settings['events_list'] ) ) { return; } ?>
widgets_manager->register_widget_type( new AddonNest_Widget_Events_List() );