start_controls_section( 'title_tab', [ 'label' => esc_html__( 'Content', 'addonskit-elementor' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => esc_html__( 'Title', 'addonskit-elementor' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'label_block' => true, ] ); $this->add_control( 'title_layout', [ 'label' => esc_html__( 'Title style', 'addonskit-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'style-1', 'options' => [ '' => esc_html__( 'Default', 'addonskit-elementor' ), 'style-1' => esc_html__( 'Style 1', 'addonskit-elementor' ), 'style-2' => esc_html__( 'Style 2', 'addonskit-elementor' ), 'style-3' => esc_html__( 'Style 3', 'addonskit-elementor' ), ], ] ); $this->add_control( 'title_tag', [ 'label' => esc_html__( 'Title tag', 'addonskit-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'h2', 'options' => [ '' => esc_html__( 'Default', 'addonskit-elementor' ), 'h1' => esc_html__( 'H1', 'addonskit-elementor' ), 'h2' => esc_html__( 'H2', 'addonskit-elementor' ), 'h3' => esc_html__( 'H3', 'addonskit-elementor' ), 'h4' => esc_html__( 'H4', 'addonskit-elementor' ), 'h5' => esc_html__( 'H5', 'addonskit-elementor' ), 'h6' => esc_html__( 'H6', 'addonskit-elementor' ), ], ] ); $this->end_controls_section(); $this->start_controls_section( 'title_style_tab', [ 'label' => esc_html__( 'Title Style', 'addonskit-elementor' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'title_style', [ 'type' => \Elementor\Controls_Manager::HEADING, 'label' => esc_html__( 'Title', 'addonskit-elementor' ), 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => esc_html__( 'Typography', 'addonskit-elementor' ), 'selector' => '{{WRAPPER}} .addonskit-section-title', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], ], ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Title Color', 'addonskit-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .addonskit-section-title' => 'color: {{VALUE}} ', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'title-background', 'types' => ['gradient'], 'selector' => '{{WRAPPER}} .addonskit-section-title', ] ); $this->add_control( 'separator_style', [ 'type' => \Elementor\Controls_Manager::HEADING, 'label' => esc_html__( 'Separator style', 'addonskit-elementor' ), 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'separator_background', 'types' => ['gradient'], 'selector' => '{{WRAPPER}} .addonskit-section-title-border', ] ); $this->end_controls_section(); } protected function render(){ $settings = $this->get_settings_for_display(); $title_tag = ! empty( $settings['title_tag'] ) ? $settings['title_tag'] : 'h2'; $title = ! empty( $settings['title'] ) ? $settings['title'] : ''; $layout = ! empty( $settings['title_layout'] ) ? $settings['title_layout'] : 'style-1'; ?>