PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 8.2.2
Wordfence Security – Firewall, Malware Scan, and Login Security v8.2.2
8.2.2 8.2.1 8.2.0 3.7.1 3.7.2 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.9.1 4.0.1 4.0.2 4.0.3 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.1 5.1.2 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.1 5.3.10 5.3.11 5.3.12 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 6.0.1 6.0.10 6.0.11 6.0.12 6.0.14 6.0.15 6.0.16 6.0.17 6.0.18 6.0.19 6.0.2 6.0.20 6.0.21 6.0.22 6.0.23 6.0.24 6.0.25 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.1 6.1.10 6.1.11 6.1.12 6.1.14 6.1.15 6.1.16 6.1.17 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.1.9 6.2.0 6.2.1 6.2.10 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.3.0 6.3.1 6.3.10 6.3.11 6.3.12 6.3.14 6.3.15 6.3.16 6.3.17 6.3.18 6.3.19 6.3.2 6.3.20 6.3.21 6.3.22 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1.0 7.1.1 7.1.10 7.1.11 7.1.12 7.1.14 7.1.15 7.1.16 7.1.17 7.1.18 7.1.19 7.1.2 7.1.20 7.1.3 7.1.4 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.10.0 7.10.1 7.10.2 7.10.3 7.10.4 7.10.5 7.10.6 7.10.7 7.11.0 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.11.6 7.11.7 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.4.0 7.4.1 7.4.10 7.4.11 7.4.12 7.4.14 7.4.2 7.4.3 trunk 7.4.4 1.1 7.4.5 1.2 7.4.6 1.3 7.4.7 1.3.1 7.4.8 1.3.2 7.4.9 1.3.3 7.5.0 1.4.2 7.5.1 1.4.3 7.5.10 1.4.4 7.5.11 1.4.5 7.5.2 1.4.6 7.5.3 1.4.7 7.5.4 1.4.8 7.5.5 1.5.1 7.5.6 1.5.2 7.5.7 1.5.3 7.5.8 1.5.4 7.5.9 1.5.5 7.6.0 1.5.6 7.6.1 2.0.1 7.6.2 2.0.2 7.7.0 2.0.3 7.7.1 2.0.5 7.8.0 2.0.6 7.8.1 2.0.7 7.8.2 2.1.0 7.9.0 2.1.1 7.9.1 2.1.2 7.9.2 2.1.3 7.9.3 2.1.4 8.0.0 2.1.5 8.0.1 3.0.2 8.0.2 3.0.3 8.0.3 3.0.4 8.0.4 3.0.5 8.0.5 3.0.6 8.1.0 3.0.7 8.1.1 3.0.8 8.1.2 3.0.9 8.1.3 3.1.0 8.1.4 3.1.1 v1.4.1 3.1.2 3.1.4 3.1.6 3.2.1 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.1 3.4.4 3.4.5 3.5.1 3.5.2 3.6.1 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
wordfence / wordfence.php
wordfence Last commit date
crypto 1 month ago css 3 weeks ago fonts 4 years ago images 1 month ago js 3 weeks ago languages 3 weeks ago lib 3 weeks ago models 1 month ago modules 3 weeks ago tmp 4 years ago vendor 1 month ago views 1 month ago waf 6 months ago index.php 13 years ago license.txt 4 years ago readme.txt 3 weeks ago wordfence.php 3 weeks ago
wordfence.php
148 lines
1 <?php
2 /*
3 Plugin Name: Wordfence Security
4 Plugin URI: https://www.wordfence.com/
5 Description: Wordfence Security - Anti-virus, Firewall and Malware Scan
6 Author: Wordfence
7 Version: 8.2.2
8 Author URI: https://www.wordfence.com/
9 Text Domain: wordfence
10 Domain Path: /languages
11 Network: true
12 Requires at least: 4.7
13 Requires PHP: 7.0
14 License: GPLv3
15 License URI: https://www.gnu.org/licenses/gpl-3.0.html
16
17 @copyright Copyright (C) 2012-2026 Defiant Inc.
18 @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher
19
20 This program is free software: you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation, either version 3 of the License, or
23 (at your option) any later version.
24
25 This program is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
29
30 You should have received a copy of the GNU General Public License
31 along with this program. If not, see <https://www.gnu.org/licenses/>.
32
33 */
34 if(defined('WP_INSTALLING') && WP_INSTALLING){
35 return;
36 }
37
38 if (!defined('ABSPATH')) {
39 exit;
40 }
41 define('WORDFENCE_VERSION', '8.2.2');
42 define('WORDFENCE_BUILD_NUMBER', '1778685035');
43 define('WORDFENCE_BASENAME', function_exists('plugin_basename') ? plugin_basename(__FILE__) :
44 basename(dirname(__FILE__)) . '/' . basename(__FILE__));
45
46 global $wp_plugin_paths;
47 foreach ($wp_plugin_paths as $dir => $realdir) {
48 if (strpos(__FILE__, $realdir) === 0) {
49 define('WORDFENCE_FCPATH', $dir . '/' . basename(__FILE__));
50 define('WORDFENCE_PATH', trailingslashit($dir));
51 break;
52 }
53 }
54 if (!defined('WORDFENCE_FCPATH')) {
55 /** @noinspection PhpConstantReassignmentInspection */
56 define('WORDFENCE_FCPATH', __FILE__);
57 /** @noinspection PhpConstantReassignmentInspection */
58 define('WORDFENCE_PATH', trailingslashit(dirname(WORDFENCE_FCPATH)));
59 }
60 if (!defined('WF_IS_WP_ENGINE')) {
61 define('WF_IS_WP_ENGINE', isset($_SERVER['IS_WPE']));
62 }
63 if (!defined('WF_IS_FLYWHEEL')) {
64 define('WF_IS_FLYWHEEL', isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Flywheel/') === 0);
65 }
66 if (!defined('WF_IS_PRESSABLE')) {
67 define('WF_IS_PRESSABLE', (defined('IS_ATOMIC') && IS_ATOMIC) || (defined('IS_PRESSABLE') && IS_PRESSABLE));
68 }
69
70 require(dirname(__FILE__) . '/lib/wfVersionSupport.php');
71 /**
72 * @var string $wfPHPDeprecatingVersion
73 * @var string $wfPHPMinimumVersion
74 * @var string $wfWordPressDeprecatingVersion
75 * @var string $wfWordPressMinimumVersion
76 */
77
78 if (!defined('WF_PHP_UNSUPPORTED')) {
79 define('WF_PHP_UNSUPPORTED', version_compare(PHP_VERSION, $wfPHPMinimumVersion, '<'));
80 }
81
82 if (WF_PHP_UNSUPPORTED) {
83 add_action('all_admin_notices', 'wfUnsupportedPHPOverlay');
84
85 function wfUnsupportedPHPOverlay() {
86 include "views/unsupported-php/admin-message.php";
87 }
88 return;
89 }
90
91 if (!defined('WF_WP_UNSUPPORTED')) {
92 require(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */
93 define('WF_WP_UNSUPPORTED', version_compare($wp_version, $wfWordPressMinimumVersion, '<'));
94 }
95
96 if (WF_WP_UNSUPPORTED) {
97 add_action('all_admin_notices', 'wfUnsupportedWPOverlay');
98
99 function wfUnsupportedWPOverlay() {
100 include "views/unsupported-wp/admin-message.php";
101 }
102 return;
103 }
104
105 if(get_option('wordfenceActivated') != 1){
106 add_action('activated_plugin','wordfence_save_activation_error'); function wordfence_save_activation_error(){ update_option('wf_plugin_act_error', ob_get_contents()); }
107 }
108 if(! defined('WORDFENCE_VERSIONONLY_MODE')){ //Used to get version from file.
109 //Duplicate block of wfUtils::memoryLimit(), copied here to avoid needing to include the class at this point of execution
110 $maxMemory = ini_get('memory_limit');
111 if (!(is_string($maxMemory) || is_numeric($maxMemory)) || !preg_match('/^\s*\d+[GMK]?\s*$/i', $maxMemory)) { $maxMemory = '128M'; } //Invalid or unreadable value, default to our minimum
112 $last = strtolower(substr($maxMemory, -1));
113 $maxMemory = (int) $maxMemory;
114
115 if ($last == 'g') { $maxMemory = $maxMemory * 1024 * 1024 * 1024; }
116 else if ($last == 'm') { $maxMemory = $maxMemory * 1024 * 1024; }
117 else if ($last == 'k') { $maxMemory = $maxMemory * 1024; }
118
119 if ($maxMemory < 134217728 /* 128 MB */ && $maxMemory > 0 /* Unlimited */) {
120 $disabled = ini_get('disable_functions');
121 if (!is_string($disabled) || strpos(ini_get('disable_functions'), 'ini_set') === false) {
122 @ini_set('memory_limit', '128M'); //Some hosts have ini set at as little as 32 megs. 128 is the min sane amount of memory.
123 }
124 }
125
126 /**
127 * Constant to determine if Wordfence is installed on another WordPress site one or more directories up in
128 * auto_prepend_file mode.
129 */
130 define('WFWAF_SUBDIRECTORY_INSTALL', class_exists('wfWAF') &&
131 !in_array(realpath(dirname(__FILE__) . '/vendor/wordfence/wf-waf/src/init.php'), get_included_files()));
132 if (!WFWAF_SUBDIRECTORY_INSTALL) {
133 require_once(dirname(__FILE__) . '/vendor/wordfence/wf-waf/src/init.php');
134 if (!wfWAF::getInstance()) {
135 define('WFWAF_AUTO_PREPEND', false);
136 require_once(dirname(__FILE__) . '/waf/bootstrap.php');
137 }
138 }
139
140 //Modules
141
142 //Load
143 require_once(dirname(__FILE__) . '/lib/wordfenceConstants.php');
144 require_once(dirname(__FILE__) . '/lib/wfI18n.php');
145 require_once(dirname(__FILE__) . '/lib/wordfenceClass.php');
146 wordfence::install_actions();
147 }
148