<?php
/**
 * HappyFenceNG Total Enterprise Security Plugin
 * HAPPYWPRESS is a RazorVue Trademark.
 *
 * @package     HappyFenceNG
 * @developer   Simonluca Scillitani
 * @copyright   2025 RazorVue di Scillitani Simonluca
 * @link        https://razorvue.it
 * @author      RazorVue di Scillitani Simonluca
 * @brand       HappyWPress
 * @uri         https://happywpress.com
 * @set all
 */

defined( 'ABSPATH' ) || exit;
/**PHPCS -> code compliance: we put useful comments where needed.. */
class HappyFenceNGAdmin extends HappyFenceNGSystem {

	/**PHPCS -> code compliance: we put useful comments where needed.. */
	public function init() {

			HappyFenceNGLOGCORE::logcore(
				static::class . ' (INIT MENUS)',
				HappyFenceNGSyslogFacility::INIT,
				HappyFenceNGSyslogSeverity::AUDIT
			);

			HappyFenceNGMControl::get_instance()->init();

			add_action( 'admin_notices', array( $this, 'happyfenceng_int_adm_init' ) );

		HappyFenceNGLOGCORE::logcore(
			static::class . ' (INIT MENUS COMPLETED)',
			HappyFenceNGSyslogFacility::INIT,
			HappyFenceNGSyslogSeverity::AUDIT
		);
	}

	/**PHPCS -> code compliance: we put useful comments where needed.. */
	public function happyfenceng_int_adm_init() {
		$msg = get_transient( 'happyfenceng_last_error' );
		if ( $msg ) {
			echo '<div class="notice notice-error"><p>' . esc_html( $msg ) . '</p></div>';
			delete_transient( 'happyfenceng_last_error' );
		}
	}
}
/**PHPCS -> code compliance: we put useful comments where needed.. */
HappyFenceNGRuntimeExceptions::__constructor( HappyFenceNGAdmin::class );
