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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordfenc.../modules/login-se.../classes/controll...
File: ajax.php
[500] Fix | Delete
$preview = Model_Request::current()->detected_ip_preview($source, $trusted_proxies);
[501] Fix | Delete
$ip = Model_Request::current()->ip_for_field($source, $trusted_proxies);
[502] Fix | Delete
self::send_json(array('ip' => $ip[0], 'preview' => $preview));
[503] Fix | Delete
}
[504] Fix | Delete
[505] Fix | Delete
public function _ajax_dismiss_notice_callback() {
[506] Fix | Delete
Controller_Notices::shared()->remove_notice($_POST['id'], false, wp_get_current_user());
[507] Fix | Delete
}
[508] Fix | Delete
[509] Fix | Delete
public function _ajax_reset_recaptcha_stats_callback() {
[510] Fix | Delete
Controller_Settings::shared()->set_array(Controller_Settings::OPTION_CAPTCHA_STATS, array('counts' => array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 'avg' => 0));
[511] Fix | Delete
$response = array('success' => true);
[512] Fix | Delete
self::send_json($response);
[513] Fix | Delete
}
[514] Fix | Delete
[515] Fix | Delete
public function _ajax_reset_2fa_grace_period_callback() {
[516] Fix | Delete
$userId = (int) $_POST['user_id'];
[517] Fix | Delete
$gracePeriodOverride = array_key_exists('grace_period_override', $_POST) ? (int) $_POST['grace_period_override'] : null;
[518] Fix | Delete
$user = get_userdata($userId);
[519] Fix | Delete
if ($user === false)
[520] Fix | Delete
self::send_json(array('error' => esc_html__('Invalid user specified', 'wordfence')));
[521] Fix | Delete
if ($gracePeriodOverride < 0 || $gracePeriodOverride > Controller_Settings::MAX_REQUIRE_2FA_USER_GRACE_PERIOD)
[522] Fix | Delete
self::send_json(array('error' => esc_html__('Invalid grace period override', 'wordfence')));
[523] Fix | Delete
$gracePeriodAllowed = Controller_Users::shared()->get_grace_period_allowed_flag($userId);
[524] Fix | Delete
if (!$gracePeriodAllowed)
[525] Fix | Delete
Controller_Users::shared()->allow_grace_period($userId);
[526] Fix | Delete
if (!Controller_Users::shared()->reset_2fa_grace_period($user, $gracePeriodOverride))
[527] Fix | Delete
self::send_json(array('error' => esc_html__('Failed to reset grace period', 'wordfence')));
[528] Fix | Delete
self::send_json(array('success' => true));
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
public function _ajax_revoke_2fa_grace_period_callback() {
[532] Fix | Delete
$user = get_userdata((int) $_POST['user_id']);
[533] Fix | Delete
if ($user === false)
[534] Fix | Delete
self::send_json(array('error' => esc_html__('Invalid user specified', 'wordfence')));
[535] Fix | Delete
Controller_Users::shared()->revoke_grace_period($user);
[536] Fix | Delete
self::send_json(array('success' => true));
[537] Fix | Delete
}
[538] Fix | Delete
[539] Fix | Delete
public function _ajax_reset_ntp_failure_count_callback() {
[540] Fix | Delete
Controller_Settings::shared()->reset_ntp_failure_count();
[541] Fix | Delete
}
[542] Fix | Delete
[543] Fix | Delete
public function _ajax_disable_ntp_callback() {
[544] Fix | Delete
Controller_Settings::shared()->disable_ntp_cron();
[545] Fix | Delete
}
[546] Fix | Delete
[547] Fix | Delete
public function _ajax_dismiss_persistent_notice_callback() {
[548] Fix | Delete
$userId = get_current_user_id();
[549] Fix | Delete
$noticeId = $_POST['notice_id'];
[550] Fix | Delete
if ($userId !== 0 && Controller_Notices::shared()->dismiss_persistent_notice($userId, $noticeId))
[551] Fix | Delete
self::send_json(array('success' => true));
[552] Fix | Delete
self::send_json(array(
[553] Fix | Delete
'error' => esc_html__('Unable to dismiss notice', 'wordfence')
[554] Fix | Delete
));
[555] Fix | Delete
}
[556] Fix | Delete
}
[557] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function