HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ubuntu-8gb-hel1-1 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.32
Disabled: NONE
Upload Files
File: /var/www/agighana.org_backup/simple_example.class.php
<?php

/**
 * @package Unlimited Elements
 * @author UniteCMS http://unitecms.net
 * @copyright Copyright (c) 2016 UniteCMS
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */

if ( ! defined( 'ABSPATH' ) ) exit;

class UCAdminNoticeSimpleExample extends UCAdminNoticeAbstract{

	/**
	 * get the notice identifier
	 */
	public function getId(){

		return 'simple-example';
	}

	/**
	 * get the notice html
	 */
	public function getHtml(){

		$heading = __('Example of a simple notice', 'unlimited-elements-for-elementor');
		$content = __('Here is the content of a simple notice.', 'unlimited-elements-for-elementor');

		$linkText = __('Link Text', 'unlimited-elements-for-elementor');
		$linkUrl = 'https://google.com';
		$linkVariant = UCAdminNoticeBuilder::ACTION_VARIANT_PRIMARY;
		$linkTarget = '_blank';

		$builder = $this->createBuilder();
		$builder->dismissible();
		$builder->withHeading($heading);
		$builder->withContent($content);
		$builder->withLinkAction($linkText, $linkUrl, $linkVariant, $linkTarget);

		$html = $builder->build();

		return $html;
	}

	/**
	 * initialize the notice
	 */
	protected function init(){

		$this->setLocation(self::LOCATION_PLUGIN);
		$this->setDuration(8760); // 365 days in hours
	}

}