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/manage
File: deactivate.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_LS_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* @var \WP_User $user The user being edited. Required.
[3] Fix | Delete
*/
[4] Fix | Delete
[5] Fix | Delete
$ownAccount = false;
[6] Fix | Delete
$ownUser = wp_get_current_user();
[7] Fix | Delete
if ($ownUser->ID == $user->ID) {
[8] Fix | Delete
$ownAccount = true;
[9] Fix | Delete
}
[10] Fix | Delete
?>
[11] Fix | Delete
<div class="wfls-block wfls-always-active wfls-flex-item-full-width">
[12] Fix | Delete
<div class="wfls-block-header wfls-block-header-border-bottom">
[13] Fix | Delete
<div class="wfls-block-header-content">
[14] Fix | Delete
<div class="wfls-block-title">
[15] Fix | Delete
<strong><?php esc_html_e('Wordfence 2FA Active', 'wordfence'); ?></strong>
[16] Fix | Delete
</div>
[17] Fix | Delete
</div>
[18] Fix | Delete
</div>
[19] Fix | Delete
<div class="wfls-block-content wfls-padding-add-bottom">
[20] Fix | Delete
<p><?php if ($ownAccount) { esc_html_e('Wordfence two-factor authentication is currently active on your account. You may deactivate it by clicking the button below.', 'wordfence'); } else { echo wp_kses(sprintf(__('Wordfence two-factor authentication is currently active on the account <strong>%s</strong>. You may deactivate it by clicking the button below.', 'wordfence'), esc_html($user->user_login)), array('strong'=>array())); } ?></p>
[21] Fix | Delete
<p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-deactivate" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Deactivate', 'wordfence'); ?></a></p>
[22] Fix | Delete
</div>
[23] Fix | Delete
</div>
[24] Fix | Delete
<script type="text/x-jquery-template" id="wfls-tmpl-deactivate-prompt">
[25] Fix | Delete
<?php
[26] Fix | Delete
echo \WordfenceLS\Model_View::create('common/modal-prompt', array(
[27] Fix | Delete
'title' => __('Deactivate 2FA', 'wordfence'),
[28] Fix | Delete
'message' => __('Are you sure you want to deactivate two-factor authentication?', 'wordfence'),
[29] Fix | Delete
'primaryButton' => array('id' => 'wfls-deactivate-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
[30] Fix | Delete
'secondaryButtons' => array(array('id' => 'wfls-deactivate-prompt-confirm', 'label' => __('Deactivate', 'wordfence'), 'link' => '#')),
[31] Fix | Delete
))->render();
[32] Fix | Delete
?>
[33] Fix | Delete
</script>
[34] Fix | Delete
<script type="application/javascript">
[35] Fix | Delete
(function($) {
[36] Fix | Delete
$(function() {
[37] Fix | Delete
$('#wfls-deactivate').on('click', function(e) {
[38] Fix | Delete
e.preventDefault();
[39] Fix | Delete
e.stopPropagation();
[40] Fix | Delete
[41] Fix | Delete
var prompt = $('#wfls-tmpl-deactivate-prompt').tmpl({});
[42] Fix | Delete
var promptHTML = $("<div />").append(prompt).html();
[43] Fix | Delete
WFLS.panelHTML((WFLS.screenSize(500) ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wfls-modal', onComplete: function() {
[44] Fix | Delete
$('#wfls-deactivate-prompt-cancel').on('click', function(e) {
[45] Fix | Delete
e.preventDefault();
[46] Fix | Delete
e.stopPropagation();
[47] Fix | Delete
[48] Fix | Delete
WFLS.panelClose();
[49] Fix | Delete
});
[50] Fix | Delete
[51] Fix | Delete
$('#wfls-deactivate-prompt-confirm').on('click', function(e) {
[52] Fix | Delete
e.preventDefault();
[53] Fix | Delete
e.stopPropagation();
[54] Fix | Delete
[55] Fix | Delete
var payload = {
[56] Fix | Delete
user: <?php echo (int) $user->ID; ?>,
[57] Fix | Delete
};
[58] Fix | Delete
[59] Fix | Delete
WFLS.ajax(
[60] Fix | Delete
'wordfence_ls_deactivate',
[61] Fix | Delete
payload,
[62] Fix | Delete
function(response) {
[63] Fix | Delete
if (response.error) {
[64] Fix | Delete
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence')); ?>', response.error);
[65] Fix | Delete
}
[66] Fix | Delete
else {
[67] Fix | Delete
$('#wfls-deactivation-controls').crossfade($('#wfls-activation-controls'));
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
WFLS.panelClose(); //The prompt
[71] Fix | Delete
},
[72] Fix | Delete
function(error) {
[73] Fix | Delete
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to deactivate two-factor authentication. Please try again.', 'wordfence')); ?>');
[74] Fix | Delete
WFLS.panelClose(); //The prompt
[75] Fix | Delete
}
[76] Fix | Delete
);
[77] Fix | Delete
});
[78] Fix | Delete
}});
[79] Fix | Delete
});
[80] Fix | Delete
});
[81] Fix | Delete
})(jQuery);
[82] Fix | Delete
</script>
[83] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function