HEX
Server: LiteSpeed
System: Linux l24.yourwebhosting.net 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: turkishi (1582)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/turkishi/public_html/wp-content/themes/kidzieo/includes/elementor/heading-subheading.php
<?php
namespace Elementor; // Custom widgets must be defined in the Elementor namespace
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly (security measure)

/**
 * Widget Name: Section Heading 
 */
class PBMIT_Heading extends Widget_Base{

 	// The get_name() method is a simple one, you just need to return a widget name that will be used in the code.
	public function get_name() {
		return 'pbmit_heading';
	}

	// The get_title() method, which again, is a very simple one, you need to return the widget title that will be displayed as the widget label.
	public function get_title() {
		return esc_attr__( 'Kidzieo Heading & Subheading Element', 'kidzieo' );
	}

	// The get_icon() method, is an optional but recommended method, it lets you set the widget icon. you can use any of the eicon or font-awesome icons, simply return the class name as a string.
	public function get_icon() {
		return 'fas fa-ad';
	}

	// The get_categories method, lets you set the category of the widget, return the category name as a string.
	public function get_categories() {
		return [ 'kidzieo_category' ];
	}

	protected function register_controls() {

		//Content Service box
		$this->start_controls_section(
			'content_section',
			[
				'label'	=> esc_attr__( 'Content', 'kidzieo' ),
			]
		);

		$this->add_control(
			'heading_style',
			[
				'label'			=> esc_attr__( 'Select Heading/Subheading View Style', 'kidzieo' ),
				'description'	=> esc_attr__( 'Select Heading/Subheading View Style.', 'kidzieo' ),
				'type'			=> 'pbmit_imgselect',
				'label_block'	=> true,
				'thumb_width'	=> '110px',
				'default'		=> '1',
				'options'		=> pbmit_element_template_list( 'heading-subheading', true ),
			]
		);
		$this->add_control(
			'title_animation',
			[
				'label'			=> esc_attr__( 'Heading Animation', 'kidzieo' ),
				'description'	=> esc_attr__( 'Select Heading Text Animation View style.', 'kidzieo' ) . ' ' . pbmit_esc_kses('<br><a target="_blank" href="' . esc_url('http://kidzieo-demo.pbminfotech.com/demo1/element/#heading-animations') . '">' . esc_attr__( 'See all anmiation demo here.', 'kidzieo' ) . '</a>' ),
				'type'			=> Controls_Manager::SELECT,
				'options'		=> [
					''				=> esc_attr__( 'No animation', 'kidzieo' ),
					'1'				=> esc_attr__( 'Animation Style 1', 'kidzieo' ),
					'2'				=> esc_attr__( 'Animation Style 2', 'kidzieo' ),
					'3'				=> esc_attr__( 'Animation Style 3', 'kidzieo' ),
				],
				'separator'		=> 'before',
			]
		);
		$this->add_control(
			'title',
			[
				'label'			=> esc_attr__( 'Heading', 'kidzieo' ),
				'type'			=> Controls_Manager::TEXTAREA,
				'dynamic'		=> [
					'active'		=> true,
				],
				'default'		=> esc_attr__( 'Welcome to our site', 'kidzieo' ),
				'placeholder'	=> esc_attr__( 'Enter your heading', 'kidzieo' ),
				'label_block'	=> true,
			]
		);
		$this->add_control(
			'title_link',
			[
				'label'			=> esc_attr__( 'Heading Link', 'kidzieo' ),
				'type'			=> Controls_Manager::URL,
				'label_block'	=> true,
			]
		);
		$this->add_control(
			'subtitle',
			[
				'label'			=> esc_attr__( 'Subheading', 'kidzieo' ),
				'type'			=> Controls_Manager::TEXTAREA,
				'dynamic'		=> [
					'active'		=> true,
				],
				'placeholder'	=> esc_attr__( 'Enter your subheading', 'kidzieo' ),
				'label_block'	=> true,
			]
		);
		$this->add_control(
			'subtitle_link',
			[
				'label'			=> esc_attr__( 'Subheading Link', 'kidzieo' ),
				'type'			=> Controls_Manager::URL,
				'label_block'	=> true,
			]
		);
		$this->add_control(
			'desc',
			[
				'label'			=> esc_attr__( 'Description', 'kidzieo' ),
				'type'			=> Controls_Manager::TEXTAREA,
				'placeholder'	=> esc_attr__( 'Type your description here', 'kidzieo' ),
			]
		);
		$this->add_control(
			'reverse_title',
			[
				'label'			=> esc_attr__( 'Reverse Heading', 'kidzieo' ),
				'description'	=> esc_attr__( 'Show Subheading before Heading', 'kidzieo' ),
				'type'			=> Controls_Manager::SWITCHER,
				'label_on'		=> esc_attr__( 'Yes', 'kidzieo' ),
				'label_off'		=> esc_attr__( 'No', 'kidzieo' ),
				'return_value'	=> 'yes',
				'default'		=> '',
			]
		);

		$this->add_responsive_control(
			'text_align',
			[
				'label'			=> esc_attr__( 'Alignment', 'kidzieo' ),
				'type'			=> Controls_Manager::CHOOSE,
				'options'		=> [
					'left'			=> [
						'title'			=> esc_attr__( 'Left', 'kidzieo' ),
						'icon'			=> 'fa fa-align-left',
					],
					'center'		=> [
						'title'			=> esc_attr__( 'Center', 'kidzieo' ),
						'icon'			=> 'fa fa-align-center',
					],
					'right'			=> [
						'title'			=> esc_attr__( 'Right', 'kidzieo' ),
						'icon'			=> 'fa fa-align-right',
					],
				],
				'prefix_class'	=> 'pbmit-align-',
				'selectors'		=> [
					'{{WRAPPER}} .pbmit-heading-subheading' => 'text-align: {{VALUE}};',
				],
				'dynamic'		=> [
					'active'		=> true,
				],
			]
		);
		$this->end_controls_section();

		// HTML Tags
		$this->start_controls_section(
			'advanced_section',
			[
				'label'	=> pbmit_esc_kses('<img class="pbmit-tab-small-logo" src="'.get_template_directory_uri() . '/includes/images/pbm-small-logo.png" /> ') . esc_attr__( 'Tag Settings', 'kidzieo' ),
				'tab'	=> Controls_Manager::TAB_ADVANCED,
			]
		);
		$this->add_control(
			'tag_options',
			[
				'label'			=> esc_attr__( 'Tags for SEO', 'kidzieo' ),
				'type'			=> Controls_Manager::HEADING,
				'separator'		=> 'before',
			]
		);
		$this->add_control(
			'title_tag',
			[
				'label'		=> esc_attr__( 'Heading Tag', 'kidzieo' ),
				'type'		=> Controls_Manager::SELECT,
				'options'	=> [
					'h1'		=> esc_attr( 'H1' ),
					'h2'		=> esc_attr( 'H2' ),
					'h3'		=> esc_attr( 'H3' ),
					'h4'		=> esc_attr( 'H4' ),
					'h5'		=> esc_attr( 'H5' ),
					'h6'		=> esc_attr( 'H6' ),
					'div'		=> esc_attr( 'DIV' ),
				],
				'default'	=> esc_attr( 'h2' ),
			]
		);
		$this->add_control(
			'subtitle_tag',
			[
				'label'		=> esc_attr__( 'Subheading Tag', 'kidzieo' ),
				'type'		=> Controls_Manager::SELECT,
				'options'	=> [
					'h1'		=> esc_attr( 'H1' ),
					'h2'		=> esc_attr( 'H2' ),
					'h3'		=> esc_attr( 'H3' ),
					'h4'		=> esc_attr( 'H4' ),
					'h5'		=> esc_attr( 'H5' ),
					'h6'		=> esc_attr( 'H6' ),
					'div'		=> esc_attr( 'DIV' ),
				],
				'default'	=> esc_attr( 'h4' ),
			]
		);
		$this->end_controls_section();

		//Style
		$this->start_controls_section(
			'style_section',
			[
				'label'	=> pbmit_esc_kses('<img class="pbmit-tab-small-logo" src="'.get_template_directory_uri() . '/includes/images/pbm-small-logo.png" /> ') . esc_attr__( 'Typo Settings', 'kidzieo' ),
				'tab'	=> Controls_Manager::TAB_ADVANCED,
			]
		);  

		//Heading
		$this->add_control(
			'heading_title',
			[
				'label'		=> esc_attr__( 'Heading', 'kidzieo' ),
				'type'		=> Controls_Manager::HEADING,
				'separator'	=> 'before',
			]
		);

		$this->add_control(
			'title_color',
			[
				'label'		=> esc_attr__( 'Color', 'kidzieo' ),
				'type'		=> Controls_Manager::COLOR,
				'default'	=> '',
				'selectors'	=> [
					'{{WRAPPER}} .pbmit-element-title'		=> 'color: {{VALUE}};',
					'{{WRAPPER}} .pbmit-element-title > a'	=> 'color: {{VALUE}};',
				]
			]
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'		=> 'title_typography',
				'selector'	=> '{{WRAPPER}} .pbmit-element-title',
			]
		);
		$this->add_responsive_control(
			'title_bottom_space',
			[
				'label'		=> esc_attr__( 'Spacing', 'kidzieo' ),
				'type'		=> Controls_Manager::SLIDER,
				'range'		=> [
					'px'		=> [
						'min'		=> 0,
						'max'		=> 100,
					],
				],
				'selectors'	=> [
					'{{WRAPPER}} .pbmit-element-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
				],
			]
		);

		//Subheading
		$this->add_control(
			'heading_stitle',
			[
				'label'		=> esc_attr__( 'Subheading', 'kidzieo' ),
				'type'		=> Controls_Manager::HEADING,
				'separator'	=> 'before',
			]
		);
		$this->add_control(
			'stitle_color',
			[
				'label'		=> esc_attr__( 'Color', 'kidzieo' ),
				'type'		=> Controls_Manager::COLOR,
				'default'	=> '',
				'selectors'	=> [
					'{{WRAPPER}} .pbmit-element-subtitle'		=> 'color: {{VALUE}};',
					'{{WRAPPER}} .pbmit-element-subtitle > a'	=> 'color: {{VALUE}};',
				]
			]
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'		=> 'stitle_typography',
				'selector'	=> '{{WRAPPER}} .pbmit-element-subtitle',
			]
		);
		$this->add_responsive_control(
			'stitle_bottom_space',
			[
				'label'		=> esc_attr__( 'Spacing', 'kidzieo' ),
				'type'		=> Controls_Manager::SLIDER,
				'range'		=> [
					'px' 		=> [
						'min' 	=> 0,
						'max' 	=> 100,
					],
				],
				'selectors'	=> [
					'{{WRAPPER}} .pbmit-element-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}};',
				],
			]
		);

		// Description
		$this->add_control(
			'heading_desc',
			[
				'label'		=> esc_attr__( 'Description', 'kidzieo' ),
				'type'		=> Controls_Manager::HEADING,
				'separator'	=> 'before',
			]
		);

		$this->add_control(
			'desc_color',
			[
				'label'		=> esc_attr__( 'Color', 'kidzieo' ),
				'type'		=> Controls_Manager::COLOR,
				'default'	=> '',
				'selectors'	=> [
					'{{WRAPPER}} .pbmit-heading-desc' => 'color: {{VALUE}};',
				]
			]
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'		=> 'desc_typography',
				'selector'	=> '{{WRAPPER}} .pbmit-heading-desc',
			]
		);
		$this->add_responsive_control(
			'desc_bottom_space',
			[
				'label'		=> esc_attr__( 'Spacing', 'kidzieo' ),
				'type'		=> Controls_Manager::SLIDER,
				'range'		=> [
					'px'		=> [
						'min'		=> 0,
						'max'		=> 100,
					],
				],
				'selectors'	=> [
					'{{WRAPPER}} .pbmit-heading-desc'	=> 'margin-bottom: {{SIZE}}{{UNIT}};',
				],
			]
		);

	$this->end_controls_section();

}

protected function render() {
	$settings = $this->get_settings_for_display();
	pbmit_heading_subheading($settings, true);
}

protected function content_template() {}
}
// After the Schedule class is defined, I must register the new widget class with Elementor:
Plugin::instance()->widgets_manager->register( new PBMIT_Heading() );