PluginProbe
The WP Remote WordPress Plugin / 4.79
The WP Remote WordPress Plugin v4.79
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | plugin.php +49 -102 5.724.79 View file →
@@ -4,9 +4,9 @@
4 4 Plugin URI: https://wpremote.com
5 5 Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>.
6 6 Author: WP Remote
7 7 Author URI: https://wpremote.com
8 -Version: 5.72
8 +Version: 4.79
9 9 Network: True
10 10 */
11 11
12 12 /* Copyright 2017 WP Remote (email : support@wpremote.com)
@@ -36,11 +36,8 @@
36 36 require_once dirname( __FILE__ ) . '/wp_api.php';
37 37 require_once dirname( __FILE__ ) . '/wp_actions.php';
38 38 require_once dirname( __FILE__ ) . '/info.php';
39 39 require_once dirname( __FILE__ ) . '/account.php';
40 -require_once dirname( __FILE__ ) . '/helper.php';
41 -require_once dirname( __FILE__ ) . '/wp_2fa/wp_2fa.php';
42 -
43 40 ##WPCACHEMODULE##
44 41
45 42
46 43 $bvsettings = new WPRWPSettings();
@@ -56,21 +53,18 @@
56 53 register_activation_hook(__FILE__, array($wp_action, 'activate'));
57 54 register_deactivation_hook(__FILE__, array($wp_action, 'deactivate'));
58 55
59 56 add_action('wp_footer', array($wp_action, 'footerHandler'), 100);
60 -add_action('wpr_clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
57 +add_action('clear_bv_services_config', array($wp_action, 'clear_bv_services_config'));
61 58 ##SOADDUNINSTALLACTION##
62 59
63 -##DISABLE_OTHER_OPTIMIZATION_PLUGINS##
64 -
65 60 ##WPCLIMODULE##
66 61 if (is_admin()) {
67 62 require_once dirname( __FILE__ ) . '/wp_admin.php';
68 63 $wpadmin = new WPRWPAdmin($bvsettings, $bvsiteinfo);
69 64 add_action('admin_init', array($wpadmin, 'initHandler'));
70 - add_filter('all_plugins', array($wpadmin, 'initWhitelabel'));
65 + add_filter('all_plugins', array($wpadmin, 'initBranding'));
71 66 add_filter('plugin_row_meta', array($wpadmin, 'hidePluginDetails'), 10, 2);
72 - add_filter('debug_information', array($wpadmin, 'handlePluginHealthInfo'), 10, 1);
73 67 if ($bvsiteinfo->isMultisite()) {
74 68 add_action('network_admin_menu', array($wpadmin, 'menu'));
75 69 } else {
76 70 add_action('admin_menu', array($wpadmin, 'menu'));
@@ -78,41 +72,16 @@
78 72 add_filter('plugin_action_links', array($wpadmin, 'settingsLink'), 10, 2);
79 73 add_action('admin_head', array($wpadmin, 'removeAdminNotices'), 3);
80 74 add_action('admin_notices', array($wpadmin, 'activateWarning'));
81 75 add_action('admin_enqueue_scripts', array($wpadmin, 'wprsecAdminMenu'));
82 - ##ALPURGECACHEFUNCTION##
83 - ##ALADMINMENU##
76 + ##SOADMINMENU##
84 77 }
85 78
79 +
86 80 if ((array_key_exists('bvreqmerge', $_POST)) || (array_key_exists('bvreqmerge', $_GET))) {
87 81 $_REQUEST = array_merge($_GET, $_POST);
88 82 }
89 83
90 -#Service active check
91 -if ($bvinfo->config != false) {
92 - add_action('wpr_remove_bv_preload_include', array($wp_action, 'removeBVPreload'));
93 -}
94 -
95 -require_once dirname( __FILE__ ) . '/php_error_monitoring/monitoring.php';
96 -WPRWPPHPErrorMonitoring::init();
97 -
98 -if ($bvinfo->hasValidDBVersion()) {
99 - if ($bvinfo->isServiceActive('activity_log')) {
100 - require_once dirname( __FILE__ ) . '/wp_actlog.php';
101 - $bvconfig = $bvinfo->config;
102 - $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']);
103 - $actlog->init();
104 - }
105 -
106 - if ($bvinfo->isServiceActive('maintenance_mode')) {
107 - require_once dirname( __FILE__ ). '/maintenance/wp_maintenance.php';
108 - $bvconfig = $bvinfo->config;
109 - $maintenance = new BVWPMaintenance($bvconfig['maintenance_mode']);
110 - $maintenance->init();
111 - }
112 -
113 -}
114 -
115 84 if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "wpremote")) {
116 85 require_once dirname( __FILE__ ) . '/callback/base.php';
117 86 require_once dirname( __FILE__ ) . '/callback/response.php';
118 87 require_once dirname( __FILE__ ) . '/callback/request.php';
@@ -125,82 +94,58 @@
125 94 } else {
126 95 $account = WPRAccount::find($bvsettings, $pubkey);
127 96 }
128 97
129 - $request = new BVCallbackRequest($account, $_REQUEST, $bvsettings);
98 + $request = new BVCallbackRequest($account, $_REQUEST);
130 99 $response = new BVCallbackResponse($request->bvb64cksize);
131 100
132 - if ($request->authenticate() === 1) {
133 - if (array_key_exists('bv_ignr_frm_cptch', $_REQUEST)) {
134 - #handling of Contact Forms 7
135 - add_filter('wpcf7_skip_spam_check', '__return_true', PHP_INT_MAX, 2);
101 + if ($account && (1 === $account->authenticate($request))) {
102 + define('WPRBASEPATH', plugin_dir_path(__FILE__));
136 103
137 - #handling of Formidable plugin
138 - add_filter('frm_is_field_hidden', '__return_true', PHP_INT_MAX, 3);
139 104
140 - #handling of WP Forms plugin
141 - add_filter('wpforms_process_bypass_captcha', '__return_true', PHP_INT_MAX, 3);
105 + require_once dirname( __FILE__ ) . '/callback/handler.php';
142 106
143 - #handling of Forminator plugin
144 - if (defined('WP_PLUGIN_DIR')) {
145 - $abstractFrontActionFilePath = WP_PLUGIN_DIR . '/forminator/library/abstracts/abstract-class-front-action.php';
146 - $frontActionFilePath = WP_PLUGIN_DIR . '/forminator/library/modules/custom-forms/front/front-action.php';
147 -
148 - if (file_exists($abstractFrontActionFilePath) && file_exists($frontActionFilePath)) {
149 - require_once $abstractFrontActionFilePath;
150 - require_once $frontActionFilePath;
151 - if (class_exists('Forminator_CForm_Front_Action')) {
152 - Forminator_CForm_Front_Action::$hidden_fields[] = "bv-stripe-";
153 - }
154 - }
155 - }
156 -
157 - #handling of CleanTalk Antispam plugin
158 - add_action('init', function() {
159 - global $apbct;
160 - if (isset($apbct) && is_object($apbct)) {
161 - $apbct->settings['forms__contact_forms_test'] = 0;
162 - }
163 - });
107 + $params = $request->processParams($_REQUEST);
108 + if ($params === false) {
109 + $resp = array(
110 + "account_info" => $account->info(),
111 + "request_info" => $request->info(),
112 + "bvinfo" => $bvinfo->info(),
113 + "statusmsg" => "BVPRMS_CORRUPTED"
114 + );
115 + $response->terminate($resp);
116 + }
117 + $request->params = $params;
118 + $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
119 + if ($request->is_afterload) {
120 + add_action('wp_loaded', array($callback_handler, 'execute'));
121 + } else if ($request->is_admin_ajax) {
122 + add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
123 + add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
164 124 } else {
165 - define('WPRBASEPATH', plugin_dir_path(__FILE__));
166 -
167 -
168 - require_once dirname( __FILE__ ) . '/callback/handler.php';
169 -
170 - $params = $request->processParams($_REQUEST);
171 - if ($params === false) {
172 - $response->terminate($request->corruptedParamsResp());
173 - }
174 - $request->params = $params;
175 - $callback_handler = new BVCallbackHandler($bvdb, $bvsettings, $bvsiteinfo, $request, $account, $response);
176 - if ($request->is_afterload) {
177 - add_action('wp_loaded', array($callback_handler, 'execute'));
178 - } else if ($request->is_admin_ajax) {
179 - add_action('wp_ajax_bvadm', array($callback_handler, 'bvAdmExecuteWithUser'));
180 - add_action('wp_ajax_nopriv_bvadm', array($callback_handler, 'bvAdmExecuteWithoutUser'));
181 - } else {
182 - $callback_handler->execute();
183 - }
125 + $callback_handler->execute();
184 126 }
185 127 } else {
186 - $response->terminate($request->authFailedResp());
128 + $resp = array(
129 + "account_info" => $account ? $account->info() : array("error" => "ACCOUNT_NOT_FOUND"),
130 + "request_info" => $request->info(),
131 + "bvinfo" => $bvinfo->info(),
132 + "statusmsg" => "FAILED_AUTH",
133 + "api_pubkey" => substr(WPRAccount::getApiPublicKey($bvsettings), 0, 8),
134 + "def_sigmatch" => substr(WPRAccount::getSigMatch($request, WPRRecover::getDefaultSecret($bvsettings)), 0, 8)
135 + );
136 + $response->terminate($resp);
187 137 }
188 138 } else {
189 139 if ($bvinfo->hasValidDBVersion()) {
190 140 if ($bvinfo->isProtectModuleEnabled()) {
191 - require_once dirname( __FILE__ ) . '/protect/protect.php';
192 - //For backward compatibility.
193 - WPRProtect_V572::$settings = new WPRWPSettings();
194 - WPRProtect_V572::$db = new WPRWPDb();
195 - WPRProtect_V572::$info = new WPRInfo(WPRProtect_V572::$settings);
196 -
197 - add_action('wpr_clear_pt_config', array('WPRProtect_V572', 'uninstall'));
198 -
199 - if ($bvinfo->isActivePlugin()) {
200 - WPRProtect_V572::init(WPRProtect_V572::MODE_WP);
201 - }
141 + require_once dirname( __FILE__ ) . '/protect/wp/protect.php';
142 + $bvprotect = new BVProtect($bvdb, $bvsettings);
143 + $bvprotect->init();
144 + if ($bvinfo->isActivePlugin() && !(defined( 'WP_CLI' ) && WP_CLI)) {
145 + $bvprotect->run();
202 146 }
147 + }
203 148
204 149 if ($bvinfo->isDynSyncModuleEnabled()) {
205 150 require_once dirname( __FILE__ ) . '/wp_dynsync.php';
206 151 $bvconfig = $bvinfo->config;
@@ -207,9 +152,16 @@
207 152 $dynsync = new BVWPDynSync($bvdb, $bvsettings, $bvconfig['dynsync']);
208 153 $dynsync->init();
209 154 }
210 155
156 + if ($bvinfo->isServiceActive('activity_log')) {
157 + require_once dirname( __FILE__ ) . '/wp_actlog.php';
158 + $bvconfig = $bvinfo->config;
159 + $actlog = new BVWPActLog($bvdb, $bvsettings, $bvinfo, $bvconfig['activity_log']);
160 + $actlog->init();
211 161 }
162 +
163 + }
212 164 $bv_site_settings = $bvsettings->getOption('bv_site_settings');
213 165 if (isset($bv_site_settings)) {
214 166 if (isset($bv_site_settings['wp_auto_updates'])) {
215 167 $wp_auto_updates = $bv_site_settings['wp_auto_updates'];
@@ -229,10 +181,5 @@
229 181 }
230 182 }
231 183 }
232 184
233 - if (is_admin()) {
234 - add_filter('site_transient_update_plugins', array($wpadmin, 'hidePluginUpdate'));
235 - }
236 -
237 - ##THIRDPARTYCACHINGMODULE##
238 185 }