<?php
/**
 * Class: Post_Title
 *
 * @return affiche le titre de l'article
 * @since 2.0.2
 */

namespace EACCustomWidgets\Includes\Elementor\DynamicTags\Tags;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

use Elementor\Core\DynamicTags\Tag;
use Elementor\Modules\DynamicTags\Module as TagsModule;

class Post_Title extends Tag {
	public function get_name(): string {
		return 'eac-addon-post-title';
	}

	public function get_title(): string {
		return esc_html__( 'Title', 'eac-components' );
	}

	public function get_group(): array {
		return array( 'eac-post' );
	}

	public function get_categories(): array {
		return array( TagsModule::TEXT_CATEGORY );
	}

	public function render(): void {
		echo esc_html( get_the_title() );
	}
}
