Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordfenc.../modules/login-se.../classes/model
File: notice.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace WordfenceLS;
[2] Fix | Delete
[3] Fix | Delete
class Model_Notice {
[4] Fix | Delete
const SEVERITY_CRITICAL = 'critical';
[5] Fix | Delete
const SEVERITY_WARNING = 'warning';
[6] Fix | Delete
const SEVERITY_INFO = 'info';
[7] Fix | Delete
[8] Fix | Delete
private $_id;
[9] Fix | Delete
private $_severity;
[10] Fix | Delete
private $_messageHTML;
[11] Fix | Delete
private $_category;
[12] Fix | Delete
[13] Fix | Delete
public function __construct($id, $severity, $messageHTML, $category) {
[14] Fix | Delete
$this->_id = $id;
[15] Fix | Delete
$this->_severity = $severity;
[16] Fix | Delete
$this->_messageHTML = $messageHTML;
[17] Fix | Delete
$this->_category = $category;
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
public function display_notice() {
[21] Fix | Delete
$severityClass = 'notice-info';
[22] Fix | Delete
if ($this->_severity == self::SEVERITY_CRITICAL) {
[23] Fix | Delete
$severityClass = 'notice-error';
[24] Fix | Delete
}
[25] Fix | Delete
else if ($this->_severity == self::SEVERITY_WARNING) {
[26] Fix | Delete
$severityClass = 'notice-warning';
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
echo '<div class="wfls-notice notice ' . $severityClass . '" data-notice-id="' . esc_attr($this->_id) . '" data-notice-type="' . esc_attr($this->_category) . '"><p>' . $this->_messageHTML . '</p><p>' . sprintf(__('<a class="wfls-btn wfls-btn-default wfls-btn-sm wfls-dismiss-link" href="#" onclick="GWFLS.dismiss_notice(\'%s\'); return false;">Dismiss</a>', 'wordfence'), esc_attr($this->_id)) . '</p></div>';
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function