Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/condoapp.info/wp-content/plugins/wordfence/modules/login-security/classes/model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/condoapp.info/wp-content/plugins/wordfence/modules/login-security/classes/model/notice.php
<?php

namespace WordfenceLS;

class Model_Notice {
	const SEVERITY_CRITICAL = 'critical';
	const SEVERITY_WARNING = 'warning';
	const SEVERITY_INFO = 'info';
	
	private $_id;
	private $_severity;
	private $_messageHTML;
	private $_category;
	private $_buttons;
	
	public function __construct($id, $severity, $messageHTML, $category, $buttons = array()) {
		$this->_id = $id;
		$this->_severity = $severity;
		$this->_messageHTML = $messageHTML;
		$this->_category = $category;
		$this->_buttons = $buttons;
	}
	
	public function display_notice() {
		$severityClass = 'notice-info';
		if ($this->_severity == self::SEVERITY_CRITICAL) {
			$severityClass = 'notice-error';
		}
		else if ($this->_severity == self::SEVERITY_WARNING) {
			$severityClass = 'notice-warning';
		}
		
		if (!preg_match('/^<p>/', $this->_messageHTML)) {
			$this->_messageHTML = '<p>' . $this->_messageHTML . '</p>';
		}
		
		echo '<div class="wfls-notice notice ' . $severityClass . '" data-notice-id="' . esc_attr($this->_id) . '" data-notice-type="' . esc_attr($this->_category) . '">' .
				$this->_messageHTML .
				'<p>' .
					implode('', array_map(function($b) { return sprintf('<a class="wfls-btn wfls-btn-default wfls-btn-sm" href="%1$s">%2$s</a>&nbsp;', esc_url($b['href']), esc_html($b['label'])); }, $this->_buttons)) .
					sprintf('<a class="wfls-btn wfls-btn-default wfls-btn-sm wfls-dismiss-link" href="#" onclick="GWFLS.dismiss_notice(\'%s\'); return false;">' . __('Dismiss', 'wordfence') . '</a>', esc_attr($this->_id)) .
				'</p>' .
			'</div>';
	}
}

Hry