Uname: Linux premium72.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.2.29 [ PHP INFO ] PHP os: Linux
Server Ip: 198.54.125.95
Your Ip: 216.73.216.164
User: matican (532) | Group: matican (531)
Safe Mode: OFF
Disable Function:
NONE

name : notices.class.php
<?php
/* 
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.themepunch.com/
 * @copyright 2024 ThemePunch
*/

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

class RsAddOnSliceyNotice {
	
	private $title,
			$notice,
			$version,
			$txtDomain,
			$noticeSlug;
	
	public function __construct($notice, $title, $version) {
		
		$this->notice = $notice;
		$this->version = $version;
		$this->title = ucfirst($title);
		$this->txtDomain = 'rs_' . $title;
		$this->noticeSlug = 'revslider_' . $title . '_addon';
		
		add_action('admin_enqueue_scripts', array($this, 'enqueue_notice_script'));
		add_action('admin_notices', array($this, 'add_notice'));
	
	}
	
	public function enqueue_notice_script() {
	
		wp_enqueue_script($this->txtDomain . '-notice', RS_SLICEY_PLUGIN_URL . 'admin/assets/js/dismiss-admin-notice.js', array('jquery'), $this->version, true);
	
	}
	
	/**
	 * Add notice
	 **/
	public function add_notice() {
		
		switch($this->notice) {
				
			case 'add_notice_activation':
				$id = md5($this->noticeSlug . '_add_notice_activation');
				$this->notice = 'The <a href="?page=revslider">' . $this->title . ' Add-On</a> requires an active ' . 
						   '<a href="//www.themepunch.com/slider-revolution/install-activate-and-update/#register-purchase-code" target="_blank">Purchase Code Registration</a>';
			break;
			
			case 'add_notice_plugin':
				$id = md5($this->noticeSlug . '_add_notice_activation');
				$this->notice = '<a href="//revolution.themepunch.com/" target="_blank">Slider Revolution</a> required to use the ' . $this->title . ' Add-On';
			break;
			
			case 'add_notice_version':
				$id = md5($this->noticeSlug . '_add_notice_activation');
				$this->notice = 'The ' . $this->title . ' Add-On requires Slider Revolution ' . RsAddOnSliceyBase::MINIMUM_VERSION . 
						   '  <a href="//www.themepunch.com/slider-revolution/install-activate-and-update/#plugin-updates" target="_blank">Update Slider Revolution</a>';
			break;
			
			default:
				$id = '';
				$this->notice = '';
			// end default
			
		}
		
		?>
		<div class="error below-h2 soc-notice-wrap revaddon-notice" style="display: none">
			<p><?php _e($this->notice, $this->txtDomain); ?><span data-addon="<?php echo $this->txtDomain; ?>-notice" data-noticeid="<?php echo $id; ?>" style="float: right; cursor: pointer" class="revaddon-dismiss-notice dashicons dashicons-dismiss"></span></p>
		</div>
		<?php
		
	}
	
}

?>
© 2025 XylotrechusZ