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.../modules/login-se.../views/options
File: option-ntp.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_LS_VERSION')) { exit; }
[1] Fix | Delete
$maxFailures = (int) \WordfenceLS\Controller_Time::FAILURE_LIMIT;
[2] Fix | Delete
$cronDisabled = \WordfenceLS\Controller_Settings::shared()->is_ntp_cron_disabled($failureCount);
[3] Fix | Delete
$id = 'wfls-option-ntp';
[4] Fix | Delete
?>
[5] Fix | Delete
<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-flex-vertical wfls-flex-align-left">
[6] Fix | Delete
<li class="wfls-option-title"><strong><?php esc_html_e('NTP', 'wordfence') ?></strong></li>
[7] Fix | Delete
<li class="wfls-option-content">
[8] Fix | Delete
<p><?php esc_html_e('NTP is a protocol that allows for remote time synchronization. Wordfence Login Security uses this protocol to ensure that it has the most accurate time which is necessary for TOTP-based two-factor authentication.', 'wordfence') ?></p>
[9] Fix | Delete
<?php if (\WordfenceLS\Controller_Settings::shared()->is_ntp_disabled_via_constant()): ?>
[10] Fix | Delete
<p><?php esc_html_e('The constant WORDFENCE_LS_DISABLE_NTP is defined which disables NTP entirely. Remove this constant or set it to a falsy value to enable NTP.', 'wordfence') ?></p>
[11] Fix | Delete
<?php elseif ($cronDisabled): ?>
[12] Fix | Delete
<?php if ($failureCount > 0): ?>
[13] Fix | Delete
<p><strong><?php echo sprintf(esc_html__('NTP is currently disabled as %d subsequent attempts have failed.', 'wordfence'), $maxFailures) ?></strong></p>
[14] Fix | Delete
<?php else: ?>
[15] Fix | Delete
<p><?php esc_html_e('NTP was manually disabled.', 'wordfence') ?></p>
[16] Fix | Delete
<?php endif ?>
[17] Fix | Delete
<button id="wfls-reset-ntp-failure-count" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Reset', 'wordfence') ?></button>
[18] Fix | Delete
<?php else: ?>
[19] Fix | Delete
<p><?php echo wp_kses(__('NTP is currently <strong>enabled</strong>.', 'wordfence'), array('strong'=>array())); ?></p>
[20] Fix | Delete
<?php if ($failureCount > 0): ?>
[21] Fix | Delete
<?php $remainingAttempts = $maxFailures - $failureCount; ?>
[22] Fix | Delete
<p>
[23] Fix | Delete
<strong><?php esc_html_e('NTP updates are currently failing.', 'wordfence') ?></strong>
[24] Fix | Delete
<?php echo $remainingAttempts > 0 ? sprintf(esc_html__('NTP will be automatically disabled after %d more attempts.', 'wordfence'), $remainingAttempts) : esc_html__('NTP will be automatically disabled after 1 more attempt.', 'wordfence') ?>
[25] Fix | Delete
</p>
[26] Fix | Delete
<?php endif ?>
[27] Fix | Delete
<button id="wfls-disable-ntp" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Disable', 'wordfence') ?></button>
[28] Fix | Delete
<?php endif ?>
[29] Fix | Delete
</li>
[30] Fix | Delete
</ul>
[31] Fix | Delete
<script>
[32] Fix | Delete
(function($) {
[33] Fix | Delete
$(function() {
[34] Fix | Delete
$('#wfls-reset-ntp-failure-count').on('click', function(e) {
[35] Fix | Delete
e.preventDefault();
[36] Fix | Delete
e.stopPropagation();
[37] Fix | Delete
[38] Fix | Delete
function handleError(message) {
[39] Fix | Delete
WFLS.panelModal(
[40] Fix | Delete
(WFLS.screenSize(500) ? '300px' : '400px'),
[41] Fix | Delete
'<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Resetting NTP', 'wordfence')); ?>',
[42] Fix | Delete
typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to reset the NTP state. Please try again.', 'wordfence')); ?>' : message
[43] Fix | Delete
);
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
WFLS.ajax('wordfence_ls_reset_ntp_failure_count', [],
[47] Fix | Delete
function(response) {
[48] Fix | Delete
if (response.error) {
[49] Fix | Delete
handleError(response.error);
[50] Fix | Delete
}
[51] Fix | Delete
else {
[52] Fix | Delete
window.location.reload();
[53] Fix | Delete
}
[54] Fix | Delete
},
[55] Fix | Delete
function (error) {
[56] Fix | Delete
handleError();
[57] Fix | Delete
});
[58] Fix | Delete
});
[59] Fix | Delete
$('#wfls-disable-ntp').on('click', function(e) {
[60] Fix | Delete
e.preventDefault();
[61] Fix | Delete
e.stopPropagation();
[62] Fix | Delete
[63] Fix | Delete
function handleError(message) {
[64] Fix | Delete
WFLS.panelModal(
[65] Fix | Delete
(WFLS.screenSize(500) ? '300px' : '400px'),
[66] Fix | Delete
'<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Disabling NTP', 'wordfence')); ?>',
[67] Fix | Delete
typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to disable NTP. Please try again.', 'wordfence')); ?>' : message
[68] Fix | Delete
);
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
WFLS.ajax('wordfence_ls_disable_ntp', [],
[72] Fix | Delete
function(response) {
[73] Fix | Delete
if (response.error) {
[74] Fix | Delete
handleError(response.error);
[75] Fix | Delete
}
[76] Fix | Delete
else {
[77] Fix | Delete
window.location.reload();
[78] Fix | Delete
}
[79] Fix | Delete
},
[80] Fix | Delete
function (error) {
[81] Fix | Delete
handleError();
[82] Fix | Delete
});
[83] Fix | Delete
});
[84] Fix | Delete
});
[85] Fix | Delete
})(jQuery);
[86] Fix | Delete
</script>
[87] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function