HEX
Server: LiteSpeed
System: Linux server107.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: iddeczhh (1154)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/iddeczhh/public_html/wp-content/plugins/the-post-grid/app/Controllers/WidgetController.php
<?php
/**
 * Widget Controller class.
 *
 * @package RT_TPG
 */

namespace RT\ThePostGrid\Controllers;

use RT\ThePostGrid\Widgets\TPGWidget;

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'This script cannot be accessed directly.' );
}

/**
 * Widget Controller class.
 */
class WidgetController {
	/**
	 * Class construct
	 */
	public function __construct() {
		add_action( 'widgets_init', [ $this, 'initWidget' ] );
	}

	/**
	 * Widgets
	 *
	 * @return void
	 */
	public function initWidget() {
		register_widget( TPGWidget::class );
	}
}