HEX
Server: LiteSpeed
System: Linux melbournecleaninggroup 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www-data (33)
PHP: 7.3.33-1+focal
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/wp-content/plugins/backup-guard-platinum/com/core/notice/SGNoticeAdapterWordpress.php
<?php
require_once(dirname(__FILE__).'/SGINoticeAdapter.php');

class SGNoticeAdapterWordpress implements SGINoticeAdapter
{
	protected $notices = array();

	public function __construct()
	{
		$this->notices = array(
			SG_NOTICE_SUCCESS => array(),
			SG_NOTICE_WARNING => array(),
			SG_NOTICE_ERROR => array()
		);
	}

	public function addNotice($notice, $type, $dismissible = false, $id = '')
	{
		$this->notices[$type][] = array(
			'message' => $notice,
			'dismissible' => $dismissible,
			'id' => $id
		);
	}

	public function addNoticeFromTemplate($template, $type, $dismissible = false)
	{
		$path = SG_NOTICE_TEMPLATES_PATH.$template.'.php';

		ob_start();
		@include($path);
		$content = ob_get_clean();

		$this->addNotice($content, $type, $dismissible, $template);
	}

	public function renderAll()
	{
		foreach ($this->notices as $type => $notices) {
			foreach ($notices as $notice) {
				$class = 'notice notice-'.$type;
				if ($notice['dismissible']) {
					$class .= ' is-dismissible';
				}
				echo '<div data-notice-id="'.$notice['id'].'" class="'.$class.'"><p>'.$notice['message'].'</p></div>';
			}
		}

	}
}