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/clone/wp-conte.../plugins/wordfenc.../lib/dashboar...
File: widget_notifications.php
<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?>
[0] Fix | Delete
<div class="wf-flex-row wf-flex-row-full-height wf-flex-row-vertical-xs">
[1] Fix | Delete
<div class="wf-flex-col-xs-100 <?php if (wfCentral::isSupported() && wfConfig::get('showWfCentralUI', false)): ?>wf-flex-col-lg-50 wf-col-lg-half-padding-right wf-dashboard-item-flex-wrapper<?php endif ?>">
[2] Fix | Delete
<div class="wf-dashboard-item active">
[3] Fix | Delete
<div class="wf-dashboard-item-inner">
[4] Fix | Delete
<div class="wf-dashboard-item-content">
[5] Fix | Delete
<div class="wf-dashboard-item-title">
[6] Fix | Delete
<strong><?php esc_html_e('Notifications', 'wordfence') ?></strong><span class="wf-dashboard-badge wf-notification-count-container wf-notification-count-value<?php echo (count($d->notifications) == 0 ? ' wf-hidden' : ''); ?>"><?php echo number_format_i18n(count($d->notifications)); ?></span>
[7] Fix | Delete
</div>
[8] Fix | Delete
<div class="wf-dashboard-item-action"><div class="wf-dashboard-item-action-disclosure"></div></div>
[9] Fix | Delete
</div>
[10] Fix | Delete
</div>
[11] Fix | Delete
<div class="wf-dashboard-item-extra">
[12] Fix | Delete
<ul class="wf-dashboard-item-list wf-dashboard-item-list-striped">
[13] Fix | Delete
<?php foreach ($d->notifications as $n): ?>
[14] Fix | Delete
<li class="wf-notification<?php if ($n->priority % 10 == 1) { echo ' wf-notification-critical'; } else if ($n->priority % 10 == 2) { echo ' wf-notification-warning'; } ?>" data-notification="<?php echo esc_html($n->id); ?>">
[15] Fix | Delete
<div class="wf-dashboard-item-list-title"><?php echo $n->html; ?></div>
[16] Fix | Delete
<?php foreach ($n->links as $l): ?>
[17] Fix | Delete
<div class="wf-dashboard-item-list-action"><a href="<?php echo esc_html($l['link']); ?>"<?php if (preg_match('/^https?:\/\//i', $l['link'])) { echo ' target="_blank" rel="noopener noreferrer"'; } ?>><?php echo esc_html($l['label']); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></div>
[18] Fix | Delete
<?php endforeach; ?>
[19] Fix | Delete
<div class="wf-dashboard-item-list-dismiss"><a href="#" class="wf-dismiss-notification" role="button"><i class="wf-fa wf-fa-times-circle" aria-hidden="true"></i></a></div>
[20] Fix | Delete
</li>
[21] Fix | Delete
<?php endforeach; ?>
[22] Fix | Delete
<?php if (count($d->notifications) == 0): ?>
[23] Fix | Delete
<li class="wf-notifications-empty"><?php esc_html_e('No notifications received', 'wordfence') ?></li>
[24] Fix | Delete
<?php endif; ?>
[25] Fix | Delete
</ul>
[26] Fix | Delete
</div>
[27] Fix | Delete
</div>
[28] Fix | Delete
</div>
[29] Fix | Delete
<?php if (wfCentral::isSupported() && wfConfig::get('showWfCentralUI', false)): ?>
[30] Fix | Delete
<div class="wf-flex-col-xs-100 wf-flex-col-lg-50 wf-col-lg-half-padding-left wf-dashboard-item-flex-wrapper wf-central-connected">
[31] Fix | Delete
<div class="wf-dashboard-item active wf-flex-row-1">
[32] Fix | Delete
<div class="wf-central-dashboard">
[33] Fix | Delete
<img class="wf-central-dashboard-logo" src="<?php echo wfUtils::getBaseURL() ?>images/wf-central-logo.svg" alt="Wordfence Central">
[34] Fix | Delete
<div class="wf-central-dashboard-copy">
[35] Fix | Delete
<p id="wf-central-status"><strong><?php esc_html_e('Wordfence Central Status', 'wordfence') ?></strong></p>
[36] Fix | Delete
<p><?php
[37] Fix | Delete
if ($d->wordfenceCentralConnected) {
[38] Fix | Delete
echo esc_html(sprintf(
[39] Fix | Delete
/* translators: 1. Email address. 2. Localized date. */
[40] Fix | Delete
__('Connected by %1$s on %2$s', 'wordfence'), $d->wordfenceCentralConnectEmail, date_i18n(get_option('date_format'), $d->wordfenceCentralConnectTime)));
[41] Fix | Delete
} elseif ($d->wordfenceCentralDisconnected) {
[42] Fix | Delete
echo esc_html(sprintf(
[43] Fix | Delete
/* translators: 1. Email address. 2. Localized date. */
[44] Fix | Delete
__('Disconnected by %1$s on %2$s', 'wordfence'), $d->wordfenceCentralDisconnectEmail, date_i18n(get_option('date_format'), $d->wordfenceCentralDisconnectTime)));
[45] Fix | Delete
} elseif (wfCentral::isPartialConnection()) {
[46] Fix | Delete
_e('It looks like you\'ve tried to connect this site to Wordfence Central, but the installation did not finish.', 'wordfence');
[47] Fix | Delete
} else {
[48] Fix | Delete
_e('Wordfence Central allows you to manage Wordfence on multiple sites from one location. It makes security monitoring and configuring Wordfence easier.', 'wordfence');
[49] Fix | Delete
}
[50] Fix | Delete
?></p>
[51] Fix | Delete
<div class="wf-flex-row">
[52] Fix | Delete
<?php if (wfCentral::isPartialConnection()): ?>
[53] Fix | Delete
<p>
[54] Fix | Delete
<a href="<?php echo WORDFENCE_CENTRAL_URL_SEC ?>/sites/connection-issues?complete-setup=<?php echo esc_attr(wfConfig::get('wordfenceCentralSiteID')) ?>"
[55] Fix | Delete
class="wf-central-resume wf-btn wf-btn-sm wf-btn-primary"
[56] Fix | Delete
><?php esc_html_e('Resume Installation', 'wordfence') ?></a>
[57] Fix | Delete
<a href="#" class="wf-central-disconnect wf-btn wf-btn-sm wf-btn-default" role="button"><strong><?php esc_html_e('Disconnect This Site', 'wordfence') ?></strong></a>
[58] Fix | Delete
</p>
[59] Fix | Delete
<?php else: ?>
[60] Fix | Delete
<p class="wf-flex-row-1">
[61] Fix | Delete
<?php if ($d->wordfenceCentralConnected): ?>
[62] Fix | Delete
<a href="#" class="wf-central-disconnect" role="button"><strong><?php esc_html_e('Disconnect This Site', 'wordfence') ?></strong></a>
[63] Fix | Delete
<?php else: ?>
[64] Fix | Delete
<a href="<?php echo WORDFENCE_CENTRAL_URL_SEC ?>?newsite=<?php echo esc_attr(home_url()) ?>"><strong><?php $d->wordfenceCentralDisconnected ? esc_html_e('Reconnect This Site', 'wordfence') : esc_html_e('Connect This Site', 'wordfence') ?></strong></a>
[65] Fix | Delete
<?php endif; ?>
[66] Fix | Delete
</p>
[67] Fix | Delete
<p class="wf-flex-row-1 wf-right wf-nowrap"><a href="<?php echo esc_url(WORDFENCE_CENTRAL_URL_SEC) ?>" target="_blank" rel="noopener noreferrer"><strong><?php esc_html_e('Visit Wordfence Central', 'wordfence') ?></strong><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></p>
[68] Fix | Delete
<?php endif ?>
[69] Fix | Delete
[70] Fix | Delete
</div>
[71] Fix | Delete
</div>
[72] Fix | Delete
</div>
[73] Fix | Delete
</div>
[74] Fix | Delete
</div>
[75] Fix | Delete
<?php endif ?>
[76] Fix | Delete
</div>
[77] Fix | Delete
<script type="application/javascript">
[78] Fix | Delete
(function($) {
[79] Fix | Delete
$('.wf-dismiss-notification').on('click', function(e) {
[80] Fix | Delete
e.preventDefault();
[81] Fix | Delete
e.stopPropagation();
[82] Fix | Delete
[83] Fix | Delete
var n = $(this).closest('.wf-notification');
[84] Fix | Delete
var id = n.data('notification');
[85] Fix | Delete
n.fadeOut(400, function() {
[86] Fix | Delete
n.remove();
[87] Fix | Delete
[88] Fix | Delete
var count = $('.wf-dismiss-notification').length;
[89] Fix | Delete
WFDash.updateNotificationCount(count);
[90] Fix | Delete
});
[91] Fix | Delete
[92] Fix | Delete
WFAD.ajax('wordfence_dismissNotification', {
[93] Fix | Delete
id: id
[94] Fix | Delete
}, function(res) {
[95] Fix | Delete
//Do nothing
[96] Fix | Delete
});
[97] Fix | Delete
});
[98] Fix | Delete
[99] Fix | Delete
$('.wf-central-disconnect').on('click', function(e) {
[100] Fix | Delete
e.preventDefault();
[101] Fix | Delete
[102] Fix | Delete
var prompt = $('#wfTmpl_wfCentralDisconnectPrompt').tmpl();
[103] Fix | Delete
var promptHTML = $("<div />").append(prompt).html();
[104] Fix | Delete
WFAD.colorboxHTML('400px', promptHTML, {
[105] Fix | Delete
overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
[106] Fix | Delete
$('#wf-central-prompt-cancel').on('click', function(e) {
[107] Fix | Delete
e.preventDefault();
[108] Fix | Delete
e.stopPropagation();
[109] Fix | Delete
[110] Fix | Delete
WFAD.colorboxClose();
[111] Fix | Delete
});
[112] Fix | Delete
[113] Fix | Delete
$('#wf-central-prompt-disconnect').on('click', function(e) {
[114] Fix | Delete
e.preventDefault();
[115] Fix | Delete
e.stopPropagation();
[116] Fix | Delete
WFAD.colorboxClose();
[117] Fix | Delete
WFAD.ajax('wordfence_wfcentral_disconnect', {}, function(response) {
[118] Fix | Delete
var onClosed = function() { window.location.reload(true); };
[119] Fix | Delete
if (response && response.success && response.message && response.title) {
[120] Fix | Delete
WFAD.colorboxModal(
[121] Fix | Delete
(self.isSmallScreen ? '300px' : '400px'),
[122] Fix | Delete
response.title,
[123] Fix | Delete
response.message,
[124] Fix | Delete
{
[125] Fix | Delete
onClosed: onClosed
[126] Fix | Delete
}
[127] Fix | Delete
);
[128] Fix | Delete
}
[129] Fix | Delete
else {
[130] Fix | Delete
onClosed();
[131] Fix | Delete
}
[132] Fix | Delete
});
[133] Fix | Delete
});
[134] Fix | Delete
}
[135] Fix | Delete
});
[136] Fix | Delete
[137] Fix | Delete
return false;
[138] Fix | Delete
});
[139] Fix | Delete
})(jQuery);
[140] Fix | Delete
</script>
[141] Fix | Delete
<script type="text/x-jquery-template" id="wfTmpl_wfCentralDisconnectPrompt">
[142] Fix | Delete
<?php
[143] Fix | Delete
echo wfView::create('common/modal-prompt', array(
[144] Fix | Delete
'title' => __('Confirm Disconnect', 'wordfence'),
[145] Fix | Delete
'message' => __('Are you sure you want to disconnect your site from Wordfence Central?', 'wordfence'),
[146] Fix | Delete
'primaryButton' => array('id' => 'wf-central-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
[147] Fix | Delete
'secondaryButtons' => array(array('id' => 'wf-central-prompt-disconnect', 'label' => __('Disconnect', 'wordfence'), 'link' => '#')),
[148] Fix | Delete
))->render();
[149] Fix | Delete
?>
[150] Fix | Delete
</script>
[151] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function