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...
File: wordfence.php
<?php
[0] Fix | Delete
/*
[1] Fix | Delete
Plugin Name: Wordfence Security
[2] Fix | Delete
Plugin URI: https://www.wordfence.com/
[3] Fix | Delete
Description: Wordfence Security - Anti-virus, Firewall and Malware Scan
[4] Fix | Delete
Author: Wordfence
[5] Fix | Delete
Version: 7.11.7
[6] Fix | Delete
Author URI: https://www.wordfence.com/
[7] Fix | Delete
Text Domain: wordfence
[8] Fix | Delete
Domain Path: /languages
[9] Fix | Delete
Network: true
[10] Fix | Delete
Requires at least: 3.9
[11] Fix | Delete
Requires PHP: 5.5
[12] Fix | Delete
License: GPLv3
[13] Fix | Delete
License URI: https://www.gnu.org/licenses/gpl-3.0.html
[14] Fix | Delete
[15] Fix | Delete
@copyright Copyright (C) 2012-2023 Defiant Inc.
[16] Fix | Delete
@license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher
[17] Fix | Delete
[18] Fix | Delete
This program is free software: you can redistribute it and/or modify
[19] Fix | Delete
it under the terms of the GNU General Public License as published by
[20] Fix | Delete
the Free Software Foundation, either version 3 of the License, or
[21] Fix | Delete
(at your option) any later version.
[22] Fix | Delete
[23] Fix | Delete
This program is distributed in the hope that it will be useful,
[24] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[25] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[26] Fix | Delete
GNU General Public License for more details.
[27] Fix | Delete
[28] Fix | Delete
You should have received a copy of the GNU General Public License
[29] Fix | Delete
along with this program. If not, see <https://www.gnu.org/licenses/>.
[30] Fix | Delete
[31] Fix | Delete
*/
[32] Fix | Delete
if(defined('WP_INSTALLING') && WP_INSTALLING){
[33] Fix | Delete
return;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
if (!defined('ABSPATH')) {
[37] Fix | Delete
exit;
[38] Fix | Delete
}
[39] Fix | Delete
define('WORDFENCE_VERSION', '7.11.7');
[40] Fix | Delete
define('WORDFENCE_BUILD_NUMBER', '1722265817');
[41] Fix | Delete
define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
[42] Fix | Delete
basename(dirname(__FILE__)) . '/' . basename(__FILE__));
[43] Fix | Delete
[44] Fix | Delete
global $wp_plugin_paths;
[45] Fix | Delete
foreach ($wp_plugin_paths as $dir => $realdir) {
[46] Fix | Delete
if (strpos(__FILE__, $realdir) === 0) {
[47] Fix | Delete
define('WORDFENCE_FCPATH', $dir . '/' . basename(__FILE__));
[48] Fix | Delete
define('WORDFENCE_PATH', trailingslashit($dir));
[49] Fix | Delete
break;
[50] Fix | Delete
}
[51] Fix | Delete
}
[52] Fix | Delete
if (!defined('WORDFENCE_FCPATH')) {
[53] Fix | Delete
/** @noinspection PhpConstantReassignmentInspection */
[54] Fix | Delete
define('WORDFENCE_FCPATH', __FILE__);
[55] Fix | Delete
/** @noinspection PhpConstantReassignmentInspection */
[56] Fix | Delete
define('WORDFENCE_PATH', trailingslashit(dirname(WORDFENCE_FCPATH)));
[57] Fix | Delete
}
[58] Fix | Delete
if (!defined('WF_IS_WP_ENGINE')) {
[59] Fix | Delete
define('WF_IS_WP_ENGINE', isset($_SERVER['IS_WPE']));
[60] Fix | Delete
}
[61] Fix | Delete
if (!defined('WF_IS_FLYWHEEL')) {
[62] Fix | Delete
define('WF_IS_FLYWHEEL', isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Flywheel/') === 0);
[63] Fix | Delete
}
[64] Fix | Delete
if (!defined('WF_IS_PRESSABLE')) {
[65] Fix | Delete
define('WF_IS_PRESSABLE', (defined('IS_ATOMIC') && IS_ATOMIC) || (defined('IS_PRESSABLE') && IS_PRESSABLE));
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
require(dirname(__FILE__) . '/lib/wfVersionSupport.php');
[69] Fix | Delete
/**
[70] Fix | Delete
* @var string $wfPHPDeprecatingVersion
[71] Fix | Delete
* @var string $wfPHPMinimumVersion
[72] Fix | Delete
*/
[73] Fix | Delete
[74] Fix | Delete
if (!defined('WF_PHP_UNSUPPORTED')) {
[75] Fix | Delete
define('WF_PHP_UNSUPPORTED', version_compare(PHP_VERSION, $wfPHPMinimumVersion, '<'));
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
if (WF_PHP_UNSUPPORTED) {
[79] Fix | Delete
add_action('all_admin_notices', 'wfUnsupportedPHPOverlay');
[80] Fix | Delete
[81] Fix | Delete
function wfUnsupportedPHPOverlay() {
[82] Fix | Delete
include "views/unsupported-php/admin-message.php";
[83] Fix | Delete
}
[84] Fix | Delete
return;
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
if(get_option('wordfenceActivated') != 1){
[88] Fix | Delete
add_action('activated_plugin','wordfence_save_activation_error'); function wordfence_save_activation_error(){ update_option('wf_plugin_act_error', ob_get_contents()); }
[89] Fix | Delete
}
[90] Fix | Delete
if(! defined('WORDFENCE_VERSIONONLY_MODE')){ //Used to get version from file.
[91] Fix | Delete
$maxMemory = @ini_get('memory_limit');
[92] Fix | Delete
$last = strtolower(substr($maxMemory, -1));
[93] Fix | Delete
$maxMemory = (int) $maxMemory;
[94] Fix | Delete
[95] Fix | Delete
if ($last == 'g') { $maxMemory = $maxMemory * 1024 * 1024 * 1024; }
[96] Fix | Delete
else if ($last == 'm') { $maxMemory = $maxMemory * 1024 * 1024; }
[97] Fix | Delete
else if ($last == 'k') { $maxMemory = $maxMemory * 1024; }
[98] Fix | Delete
[99] Fix | Delete
if ($maxMemory < 134217728 /* 128 MB */ && $maxMemory > 0 /* Unlimited */) {
[100] Fix | Delete
if (strpos(ini_get('disable_functions'), 'ini_set') === false) {
[101] Fix | Delete
@ini_set('memory_limit', '128M'); //Some hosts have ini set at as little as 32 megs. 128 is the min sane amount of memory.
[102] Fix | Delete
}
[103] Fix | Delete
}
[104] Fix | Delete
[105] Fix | Delete
/**
[106] Fix | Delete
* Constant to determine if Wordfence is installed on another WordPress site one or more directories up in
[107] Fix | Delete
* auto_prepend_file mode.
[108] Fix | Delete
*/
[109] Fix | Delete
define('WFWAF_SUBDIRECTORY_INSTALL', class_exists('wfWAF') &&
[110] Fix | Delete
!in_array(realpath(dirname(__FILE__) . '/vendor/wordfence/wf-waf/src/init.php'), get_included_files()));
[111] Fix | Delete
if (!WFWAF_SUBDIRECTORY_INSTALL) {
[112] Fix | Delete
require_once(dirname(__FILE__) . '/vendor/wordfence/wf-waf/src/init.php');
[113] Fix | Delete
if (!wfWAF::getInstance()) {
[114] Fix | Delete
define('WFWAF_AUTO_PREPEND', false);
[115] Fix | Delete
require_once(dirname(__FILE__) . '/waf/bootstrap.php');
[116] Fix | Delete
}
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
//Modules
[120] Fix | Delete
[121] Fix | Delete
//Load
[122] Fix | Delete
require_once(dirname(__FILE__) . '/lib/wordfenceConstants.php');
[123] Fix | Delete
require_once(dirname(__FILE__) . '/lib/wordfenceClass.php');
[124] Fix | Delete
wordfence::install_actions();
[125] Fix | Delete
}
[126] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function