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 : verify-addon.php
<?php
/* 
 * @author    ThemePunch <info@themepunch.com>
 * @link      https://www.themepunch.com/
 * @copyright 2024 ThemePunch
*/

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

class Revslider_Weather_Addon_Verify {
	
	private $notice = false,
			$min_rev_slider = '6.0',
			$addon_title = 'Weather',
			$text_domain = 'revslider-weather-addon',
			$notice_slug = 'revslider_weather_addon';
	
	public function __construct() {
		
		if(!class_exists('RevSliderFront')) {
			$this->notice = 'add_notice_plugin';
		}
		else if(!version_compare(RevSliderGlobals::SLIDER_REVISION, $this->min_rev_slider, '>=')) {
			$this->notice = 'add_notice_version';
		}
		else if(get_option('revslider-valid', 'false') == 'false') {
			$this->notice = 'add_notice_activation';
		}

		if($this->notice) {
			add_action('admin_enqueue_scripts', array($this, 'enqueue_notice_script'));
			add_action('admin_notices', array($this, 'add_notice'));
		}

	}
	
	public function is_verified() {
		
		return $this->notice === false;
		
	}
	
	public function enqueue_notice_script() {
	
		wp_enqueue_script($this->text_domain . '-notice', REV_ADDON_WEATHER_URL . 'admin/assets/js/dismiss-admin-notice.js', array('jquery'), REV_ADDON_WEATHER_VERSION, true);
	
	}
	
	public function add_notice() {
		
		switch($this->notice) {
				
			case 'add_notice_activation':
				$id = md5($this->notice_slug . '_add_notice_activation');
				$this->notice = 'The <a href="?page=revslider">' . $this->addon_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->notice_slug . '_add_notice_plugin');
				$this->notice = '<a href="//revolution.themepunch.com/" target="_blank">Slider Revolution</a> required to use the ' . $this->addon_title . ' Add-On';
			break;
			
			case 'add_notice_version':
				$id = md5($this->notice_slug . '_add_notice_version');
				$this->notice = 'The ' . $this->addon_title . ' Add-On requires Slider Revolution ' . $this->min_rev_slider . 
								' <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->text_domain); ?><span data-addon="<?php echo $this->text_domain; ?>-notice" data-noticeid="<?php echo $id; ?>" style="float: right; cursor: pointer" class="revaddon-dismiss-notice dashicons dashicons-dismiss"></span></p>
		</div>
		<?php
		
	}

}
?>
© 2025 XylotrechusZ