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_logins.php
<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?>
[0] Fix | Delete
<?php //$d is defined here as a wfDashboard instance ?>
[1] Fix | Delete
<div class="wf-row">
[2] Fix | Delete
<div class="wf-col-xs-12">
[3] Fix | Delete
<div class="wf-dashboard-item active">
[4] Fix | Delete
<div class="wf-dashboard-item-inner">
[5] Fix | Delete
<div class="wf-dashboard-item-content">
[6] Fix | Delete
<div class="wf-dashboard-item-title">
[7] Fix | Delete
<strong><?php esc_html_e('Login Attempts', 'wordfence') ?></strong>
[8] Fix | Delete
</div>
[9] Fix | Delete
<div class="wf-dashboard-item-action"><div class="wf-dashboard-item-action-disclosure"></div></div>
[10] Fix | Delete
</div>
[11] Fix | Delete
</div>
[12] Fix | Delete
<div class="wf-dashboard-item-extra">
[13] Fix | Delete
<ul class="wf-dashboard-item-list">
[14] Fix | Delete
<li>
[15] Fix | Delete
<div>
[16] Fix | Delete
<div class="wf-dashboard-toggle-btns">
[17] Fix | Delete
<ul class="wf-pagination wf-pagination-sm">
[18] Fix | Delete
<li class="wf-active"><a href="#" class="wf-dashboard-login-attempts" data-grouping="success" role="button"><?php esc_html_e('Successful', 'wordfence') ?></a></li>
[19] Fix | Delete
<li><a href="#" class="wf-dashboard-login-attempts" data-grouping="fail" role="button"><?php esc_html_e('Failed', 'wordfence') ?></a></li>
[20] Fix | Delete
</ul>
[21] Fix | Delete
</div>
[22] Fix | Delete
<div class="wf-recent-logins wf-recent-logins-success">
[23] Fix | Delete
<?php if (count($d->loginsSuccess) == 0): ?>
[24] Fix | Delete
<div class="wf-dashboard-item-list-text"><p><em><?php esc_html_e('No successful logins have been recorded.', 'wordfence') ?></em></p></div>
[25] Fix | Delete
<?php else: ?>
[26] Fix | Delete
<?php $data = array_slice($d->loginsSuccess, 0, min(10, count($d->loginsSuccess)), true); include(dirname(__FILE__) . '/widget_content_logins.php'); ?>
[27] Fix | Delete
<?php if (count($d->loginsSuccess) > 10): ?>
[28] Fix | Delete
<div class="wf-dashboard-item-list-text"><div class="wf-dashboard-show-more" data-grouping="logins" data-period="success"><a href="#" role="button"><?php esc_html_e('Show more', 'wordfence') ?></a></div></div>
[29] Fix | Delete
<?php endif; ?>
[30] Fix | Delete
<?php endif; ?>
[31] Fix | Delete
</div>
[32] Fix | Delete
<div class="wf-recent-logins wf-recent-logins-fail wf-hidden">
[33] Fix | Delete
<?php if (count($d->loginsFail) == 0): ?>
[34] Fix | Delete
<div class="wf-dashboard-item-list-text"><p><em><?php esc_html_e('No failed logins have been recorded.', 'wordfence') ?></em></p></div>
[35] Fix | Delete
<?php else: ?>
[36] Fix | Delete
<?php $data = array_slice($d->loginsFail, 0, min(10, count($d->loginsFail)), true); include(dirname(__FILE__) . '/widget_content_logins.php'); ?>
[37] Fix | Delete
<?php if (count($d->loginsFail) > 10): ?>
[38] Fix | Delete
<div class="wf-dashboard-item-list-text"><div class="wf-dashboard-show-more" data-grouping="logins" data-period="fail"><a href="#" role="button"><?php esc_html_e('Show more', 'wordfence') ?></a></div></div>
[39] Fix | Delete
<?php endif; ?>
[40] Fix | Delete
<?php endif; ?>
[41] Fix | Delete
</div>
[42] Fix | Delete
<script type="application/javascript">
[43] Fix | Delete
(function($) {
[44] Fix | Delete
$('.wf-dashboard-login-attempts').on('click', function(e) {
[45] Fix | Delete
e.preventDefault();
[46] Fix | Delete
e.stopPropagation();
[47] Fix | Delete
[48] Fix | Delete
$(this).closest('ul').find('li').removeClass('wf-active');
[49] Fix | Delete
$(this).closest('li').addClass('wf-active');
[50] Fix | Delete
[51] Fix | Delete
$('.wf-recent-logins').addClass('wf-hidden');
[52] Fix | Delete
$('.wf-recent-logins-' + $(this).data('grouping')).removeClass('wf-hidden');
[53] Fix | Delete
});
[54] Fix | Delete
[55] Fix | Delete
$('.wf-recent-logins .wf-dashboard-show-more a').on('click', function(e) {
[56] Fix | Delete
e.preventDefault();
[57] Fix | Delete
e.stopPropagation();
[58] Fix | Delete
[59] Fix | Delete
var grouping = $(this).parent().data('grouping');
[60] Fix | Delete
var period = $(this).parent().data('period');
[61] Fix | Delete
[62] Fix | Delete
$(this).closest('.wf-dashboard-item-list-text').fadeOut();
[63] Fix | Delete
[64] Fix | Delete
var self = this;
[65] Fix | Delete
WFAD.ajax('wordfence_dashboardShowMore', {
[66] Fix | Delete
grouping: grouping,
[67] Fix | Delete
period: period
[68] Fix | Delete
}, function(res) {
[69] Fix | Delete
if (res.ok) {
[70] Fix | Delete
var table = $('#logins-data-template').tmpl(res);
[71] Fix | Delete
$(self).closest('.wf-recent-logins').css('overflow-y', 'auto');
[72] Fix | Delete
$(self).closest('.wf-recent-logins').find('table').replaceWith(table);
[73] Fix | Delete
}
[74] Fix | Delete
else {
[75] Fix | Delete
WFAD.colorboxModal('300px', <?php echo json_encode(__('An error occurred', 'wordfence')) ?>, <?php echo json_encode(__('We encountered an error trying load more data.', 'wordfence')) ?>);
[76] Fix | Delete
$(this).closest('.wf-dashboard-item-list-text').fadeIn();
[77] Fix | Delete
}
[78] Fix | Delete
});
[79] Fix | Delete
});
[80] Fix | Delete
})(jQuery);
[81] Fix | Delete
</script>
[82] Fix | Delete
</div>
[83] Fix | Delete
</li>
[84] Fix | Delete
</ul>
[85] Fix | Delete
</div>
[86] Fix | Delete
</div>
[87] Fix | Delete
</div>
[88] Fix | Delete
</div>
[89] Fix | Delete
<script type="text/x-jquery-template" id="logins-data-template">
[90] Fix | Delete
<table class="wf-table wf-table-hover">
[91] Fix | Delete
<thead>
[92] Fix | Delete
<tr>
[93] Fix | Delete
<th><?php esc_html_e('Username', 'wordfence') ?></th>
[94] Fix | Delete
<th><?php esc_html_e('IP', 'wordfence') ?></th>
[95] Fix | Delete
<th><?php esc_html_e('Date', 'wordfence') ?></th>
[96] Fix | Delete
</tr>
[97] Fix | Delete
</thead>
[98] Fix | Delete
<tbody>
[99] Fix | Delete
{{each(idx, d) data}}
[100] Fix | Delete
<tr>
[101] Fix | Delete
<td>${d.name}</td>
[102] Fix | Delete
<td>${d.ip}</td>
[103] Fix | Delete
<td>${d.t}</td>
[104] Fix | Delete
</tr>
[105] Fix | Delete
{{/each}}
[106] Fix | Delete
</tbody>
[107] Fix | Delete
</table>
[108] Fix | Delete
</script>
[109] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function