Version Description
- Hiding bot protection dashboard from wp-admin
Download this release
Release Info
Developer | ritesh.soni36 |
Plugin | MalCare WordPress Security Plugin – Malware Scanner, Cleaner, Security Firewall |
Version | 4.33 |
Comparing to | |
See all releases |
Code changes from version 4.32 to 4.33
- info.php +2 -2
- malcare.php +2 -2
- readme.txt +3 -1
- wp_admin.php +41 -25
- wp_cli.php +1 -0
info.php
CHANGED
@@ -9,7 +9,7 @@ if (!class_exists('MCInfo')) :
|
|
9 |
public $badgeinfo = 'mcbadge';
|
10 |
public $ip_header_option = 'mcipheader';
|
11 |
public $brand_option = 'mcbrand';
|
12 |
-
public $version = '4.
|
13 |
public $webpage = 'https://www.malcare.com';
|
14 |
public $appurl = 'https://app.malcare.com';
|
15 |
public $slug = 'malcare-security/malcare.php';
|
@@ -103,4 +103,4 @@ if (MCWPSiteInfo::isCWServer() && !$bvinfo->isManualSignup()) {
|
|
103 |
);
|
104 |
}
|
105 |
}
|
106 |
-
endif;
|
9 |
public $badgeinfo = 'mcbadge';
|
10 |
public $ip_header_option = 'mcipheader';
|
11 |
public $brand_option = 'mcbrand';
|
12 |
+
public $version = '4.33';
|
13 |
public $webpage = 'https://www.malcare.com';
|
14 |
public $appurl = 'https://app.malcare.com';
|
15 |
public $slug = 'malcare-security/malcare.php';
|
103 |
);
|
104 |
}
|
105 |
}
|
106 |
+
endif;
|
malcare.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.malcare.com
|
|
5 |
Description: MalCare Security - Free Malware Scanner, Protection & Security for WordPress
|
6 |
Author: MalCare Security
|
7 |
Author URI: https://www.malcare.com
|
8 |
-
Version: 4.
|
9 |
Network: True
|
10 |
*/
|
11 |
|
@@ -142,4 +142,4 @@ if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "
|
|
142 |
}
|
143 |
|
144 |
##DYNSYNCMODULE##
|
145 |
-
}
|
5 |
Description: MalCare Security - Free Malware Scanner, Protection & Security for WordPress
|
6 |
Author: MalCare Security
|
7 |
Author URI: https://www.malcare.com
|
8 |
+
Version: 4.33
|
9 |
Network: True
|
10 |
*/
|
11 |
|
142 |
}
|
143 |
|
144 |
##DYNSYNCMODULE##
|
145 |
+
}
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://www.malcare.com
|
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.4
|
8 |
Requires PHP: 5.4.0
|
9 |
-
Stable tag: 4.
|
10 |
License: GPLv2 or later
|
11 |
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
|
12 |
|
@@ -390,6 +390,8 @@ FTP details input into MalCare is processed on our servers. We need your FTP cre
|
|
390 |
8. MalCare’s Uptime Monitoring notifies if a website goes down so that you can handle the situation before starting to lose visitors.
|
391 |
|
392 |
== CHANGELOG ==
|
|
|
|
|
393 |
|
394 |
= 4.32 =
|
395 |
* updating plugin name for cloudways server
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.4
|
8 |
Requires PHP: 5.4.0
|
9 |
+
Stable tag: 4.33
|
10 |
License: GPLv2 or later
|
11 |
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
|
12 |
|
390 |
8. MalCare’s Uptime Monitoring notifies if a website goes down so that you can handle the situation before starting to lose visitors.
|
391 |
|
392 |
== CHANGELOG ==
|
393 |
+
= 4.33 =
|
394 |
+
* Hiding bot protection dashboard from wp-admin
|
395 |
|
396 |
= 4.32 =
|
397 |
* updating plugin name for cloudways server
|
wp_admin.php
CHANGED
@@ -67,12 +67,13 @@ class MCWPAdmin {
|
|
67 |
}
|
68 |
if ($this->bvinfo->isActivateRedirectSet()) {
|
69 |
$this->settings->updateOption($this->bvinfo->plug_redirect, 'no');
|
|
|
70 |
wp_redirect($this->mainUrl());
|
71 |
}
|
72 |
}
|
73 |
|
74 |
public function mcsecAdminMenu($hook) {
|
75 |
-
if ($hook === 'toplevel_page_malcare') {
|
76 |
wp_enqueue_style( 'mcsurface', plugins_url('css/bvmui.min.css', __FILE__));
|
77 |
wp_enqueue_style( 'bvnew', plugins_url('css/bvnew.min.css', __FILE__));
|
78 |
}
|
@@ -99,21 +100,23 @@ class MCWPAdmin {
|
|
99 |
}
|
100 |
|
101 |
public function menu() {
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$
|
106 |
-
$bname = $brandinfo["menuname"];
|
107 |
-
$icon = $brandinfo["brand_icon"];
|
108 |
-
}
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
$
|
113 |
-
}
|
114 |
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
116 |
array($this, 'adminPage'), plugins_url($icon, __FILE__ ));
|
|
|
117 |
}
|
118 |
|
119 |
public function hidePluginDetails($plugin_metas, $slug) {
|
@@ -134,10 +137,12 @@ class MCWPAdmin {
|
|
134 |
public function settingsLink($links, $file) {
|
135 |
#XNOTE: Fix this
|
136 |
if ( $file == plugin_basename( dirname(__FILE__).'/malcare.php' ) ) {
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
141 |
}
|
142 |
return $links;
|
143 |
}
|
@@ -182,6 +187,20 @@ class MCWPAdmin {
|
|
182 |
}
|
183 |
}
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
public function adminPage() {
|
186 |
if (isset($_REQUEST['bvnonce']) && wp_verify_nonce( $_REQUEST['bvnonce'], 'bvnonce' )) {
|
187 |
$info = array();
|
@@ -189,18 +208,15 @@ class MCWPAdmin {
|
|
189 |
$this->bvapi->pingbv('/bvapi/disconnect', $info, $_REQUEST['pubkey']);
|
190 |
MCAccount::remove($this->settings, $_REQUEST['pubkey']);
|
191 |
}
|
|
|
192 |
if (isset($_REQUEST['account_details'])) {
|
193 |
-
|
194 |
} else if (isset($_REQUEST['add_account'])) {
|
195 |
-
$this->
|
196 |
-
$this->enqueueBootstrapCSS();
|
197 |
-
require_once dirname( __FILE__ ) . "/admin/registration.php";
|
198 |
} else if(MCAccount::isConfigured($this->settings)) {
|
199 |
-
|
200 |
} else {
|
201 |
-
$this->
|
202 |
-
$this->enqueueBootstrapCSS();
|
203 |
-
require_once dirname( __FILE__ ) . "/admin/registration.php";
|
204 |
}
|
205 |
}
|
206 |
|
67 |
}
|
68 |
if ($this->bvinfo->isActivateRedirectSet()) {
|
69 |
$this->settings->updateOption($this->bvinfo->plug_redirect, 'no');
|
70 |
+
$this->settings->updateOption('bvmanualsignup', true);
|
71 |
wp_redirect($this->mainUrl());
|
72 |
}
|
73 |
}
|
74 |
|
75 |
public function mcsecAdminMenu($hook) {
|
76 |
+
if ($hook === 'toplevel_page_malcare' || preg_match("/bv_add_account$/", $hook) || preg_match("/bv_account_details$/", $hook)) {
|
77 |
wp_enqueue_style( 'mcsurface', plugins_url('css/bvmui.min.css', __FILE__));
|
78 |
wp_enqueue_style( 'bvnew', plugins_url('css/bvnew.min.css', __FILE__));
|
79 |
}
|
100 |
}
|
101 |
|
102 |
public function menu() {
|
103 |
+
add_submenu_page(null, 'Malcare', 'Malcare', 'manage_options', 'bv_add_account',
|
104 |
+
array($this, 'showAddAccountPage'));
|
105 |
+
add_submenu_page(null, 'Malcare', 'Malcare', 'manage_options', 'bv_account_details',
|
106 |
+
array($this, 'showAccountDetailsPage'));
|
|
|
|
|
|
|
107 |
|
108 |
+
if (!MCWPSiteInfo::isCWServer() || $this->bvinfo->isManualSignup()) {
|
109 |
+
$bname = $this->bvinfo->getBrandName();
|
110 |
+
$icon = $this->bvinfo->getBrandIcon();
|
|
|
111 |
|
112 |
+
$pub_key = MCAccount::getApiPublicKey($this->settings);
|
113 |
+
if ($pub_key && isset($pub_key)) {
|
114 |
+
$this->account = MCAccount::find($this->settings, $pub_key);
|
115 |
+
}
|
116 |
+
|
117 |
+
add_menu_page($bname, $bname, 'manage_options', $this->bvinfo->plugname,
|
118 |
array($this, 'adminPage'), plugins_url($icon, __FILE__ ));
|
119 |
+
}
|
120 |
}
|
121 |
|
122 |
public function hidePluginDetails($plugin_metas, $slug) {
|
137 |
public function settingsLink($links, $file) {
|
138 |
#XNOTE: Fix this
|
139 |
if ( $file == plugin_basename( dirname(__FILE__).'/malcare.php' ) ) {
|
140 |
+
if (!MCWPSiteInfo::isCWServer() || $this->bvinfo->isManualSignup()) {
|
141 |
+
$settings_link = '<a href="'.$this->mainUrl().'">'.__( 'Settings' ).'</a>';
|
142 |
+
array_unshift($links, $settings_link);
|
143 |
+
$account_details = '<a href="'.$this->mainUrl('&account_details=true').'">'.__( 'Account Details' ).'</a>';
|
144 |
+
array_unshift($links, $account_details);
|
145 |
+
}
|
146 |
}
|
147 |
return $links;
|
148 |
}
|
187 |
}
|
188 |
}
|
189 |
|
190 |
+
public function showAddAccountPage() {
|
191 |
+
$this->settings->updateOption('bvmanualsignup', true);
|
192 |
+
$this->enqueueBootstrapCSS();
|
193 |
+
require_once dirname( __FILE__ ) . "/admin/registration.php";
|
194 |
+
}
|
195 |
+
|
196 |
+
public function showAccountDetailsPage() {
|
197 |
+
require_once dirname( __FILE__ ) . "/admin/account_details.php";
|
198 |
+
}
|
199 |
+
|
200 |
+
public function showDashboard() {
|
201 |
+
require_once dirname( __FILE__ ) . "/admin/dashboard.php";
|
202 |
+
}
|
203 |
+
|
204 |
public function adminPage() {
|
205 |
if (isset($_REQUEST['bvnonce']) && wp_verify_nonce( $_REQUEST['bvnonce'], 'bvnonce' )) {
|
206 |
$info = array();
|
208 |
$this->bvapi->pingbv('/bvapi/disconnect', $info, $_REQUEST['pubkey']);
|
209 |
MCAccount::remove($this->settings, $_REQUEST['pubkey']);
|
210 |
}
|
211 |
+
|
212 |
if (isset($_REQUEST['account_details'])) {
|
213 |
+
$this->showAccountDetailsPage();
|
214 |
} else if (isset($_REQUEST['add_account'])) {
|
215 |
+
$this->showAddAccountPage();
|
|
|
|
|
216 |
} else if(MCAccount::isConfigured($this->settings)) {
|
217 |
+
$this->showDashboard();
|
218 |
} else {
|
219 |
+
$this->showAddAccountPage();
|
|
|
|
|
220 |
}
|
221 |
}
|
222 |
|
wp_cli.php
CHANGED
@@ -18,6 +18,7 @@ class MCWPCli {
|
|
18 |
}
|
19 |
|
20 |
public function create($args, $params) {
|
|
|
21 |
$request_params = array_merge($this->siteinfo->info(), $this->bvinfo->info());
|
22 |
$request_params['bvpublic'] = MCAccount::getApiPublicKey($this->settings);
|
23 |
$request_params['bvsecret'] = MCRecover::defaultSecret($this->settings);
|
18 |
}
|
19 |
|
20 |
public function create($args, $params) {
|
21 |
+
$this->settings->updateOption($this->bvinfo->plug_redirect, 'no');
|
22 |
$request_params = array_merge($this->siteinfo->info(), $this->bvinfo->info());
|
23 |
$request_params['bvpublic'] = MCAccount::getApiPublicKey($this->settings);
|
24 |
$request_params['bvsecret'] = MCRecover::defaultSecret($this->settings);
|