MalCare WordPress Security Plugin – Malware Scanner, Cleaner, Security Firewall - Version 4.31

Version Description

  • Fetching Mysql Version
  • Robust data fetch APIs
  • Core plugin changes
  • Sanitizing incoming params
Download this release

Release Info

Developer ritesh.soni36
Plugin Icon 128x128 MalCare WordPress Security Plugin – Malware Scanner, Cleaner, Security Firewall
Version 4.31
Comparing to
See all releases

Code changes from version 4.27 to 4.31

callback/wings/db.php CHANGED
@@ -69,7 +69,7 @@ class BVDBCallback extends BVCallbackBase {
69
  $params = $request->params;
70
  $stream_init_info = BVStream::startStream($this->account, $request);
71
 
72
- if(MCWPSiteInfo::isCWServer() && !$this->bvinfo->canOverrideCW()) {
73
  $bv_table = $params['table'];
74
  if (!empty($bv_table)) {
75
  $allowed = false;
69
  $params = $request->params;
70
  $stream_init_info = BVStream::startStream($this->account, $request);
71
 
72
+ if(MCWPSiteInfo::isCWServer() && !$this->bvinfo->isManualSignup()) {
73
  $bv_table = $params['table'];
74
  if (!empty($bv_table)) {
75
  $allowed = false;
callback/wings/fs_write.php CHANGED
@@ -5,7 +5,7 @@ if (!class_exists('BVFSWriteCallback')) :
5
 
6
  class BVFSWriteCallback extends BVCallbackBase {
7
 
8
- const MEGABYTE = 1024 * 1024;
9
 
10
  public function __construct() {
11
  }
5
 
6
  class BVFSWriteCallback extends BVCallbackBase {
7
 
8
+ const MEGABYTE = 1048576;
9
 
10
  public function __construct() {
11
  }
callback/wings/misc.php CHANGED
@@ -94,6 +94,9 @@ class BVMiscCallback extends BVCallbackBase {
94
  case "dlttrsnt":
95
  $resp = array("dlttrsnt" => $settings->deleteTransient($params['key']));
96
  break;
 
 
 
97
  default:
98
  $resp = false;
99
  }
94
  case "dlttrsnt":
95
  $resp = array("dlttrsnt" => $settings->deleteTransient($params['key']));
96
  break;
97
+ case "setmanulsignup":
98
+ $resp = array("setmanulsignup" => $settings->updateOption("bvmanualsignup", true));
99
+ break;
100
  default:
101
  $resp = false;
102
  }
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.27';
13
  public $webpage = 'https://www.malcare.com';
14
  public $appurl = 'https://app.malcare.com';
15
  public $slug = 'malcare-security/malcare.php';
@@ -21,8 +21,8 @@ if (!class_exists('MCInfo')) :
21
  $this->settings = $settings;
22
  }
23
 
24
- public function canOverrideCW() {
25
- $scanOption = $this->settings->getOption('bvoverridecw');
26
  return (isset($scanOption) && $scanOption == 1);
27
  }
28
 
@@ -36,7 +36,7 @@ if (!class_exists('MCInfo')) :
36
  return $brand['menuname'];
37
  }
38
  $bvinfo = new MCInfo($this->settings);
39
- if (MCWPSiteInfo::isCWServer() && !$bvinfo->canOverrideCW()) {
40
  return "Cloudways";
41
  }
42
 
9
  public $badgeinfo = 'mcbadge';
10
  public $ip_header_option = 'mcipheader';
11
  public $brand_option = 'mcbrand';
12
+ public $version = '4.31';
13
  public $webpage = 'https://www.malcare.com';
14
  public $appurl = 'https://app.malcare.com';
15
  public $slug = 'malcare-security/malcare.php';
21
  $this->settings = $settings;
22
  }
23
 
24
+ public function isManualSignup() {
25
+ $scanOption = $this->settings->getOption('bvmanualsignup');
26
  return (isset($scanOption) && $scanOption == 1);
27
  }
28
 
36
  return $brand['menuname'];
37
  }
38
  $bvinfo = new MCInfo($this->settings);
39
+ if (MCWPSiteInfo::isCWServer() && !$bvinfo->isManualSignup()) {
40
  return "Cloudways";
41
  }
42
 
malcare.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
- Plugin Name: MalCare WordPress Security, Firewall & Malware Scanner
4
  Plugin URI: https://www.malcare.com
5
- Description: WordPress Security, Firewall and Malware Scanner
6
  Author: MalCare Security
7
  Author URI: https://www.malcare.com
8
- Version: 4.27
9
  Network: True
10
  */
11
 
@@ -142,4 +142,4 @@ if ((array_key_exists('bvplugname', $_REQUEST)) && ($_REQUEST['bvplugname'] == "
142
  }
143
 
144
  ##DYNSYNCMODULE##
145
- }
1
  <?php
2
  /*
3
+ Plugin Name: MalCare Security - Free Malware Scanner, Protection & Security for WordPress
4
  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.31
9
  Network: True
10
  */
11
 
142
  }
143
 
144
  ##DYNSYNCMODULE##
145
+ }
readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- === MalCare - Free Malware Scanner & Security for WordPress ===
2
  Contributors: malcare security, akshatc
3
  Tags: security, wordpress security, security plugin, firewall, malware scanner, login security, automatic malware removal, improve security
4
  Plugin URI: https://www.malcare.com
@@ -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.27
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
 
@@ -16,10 +16,16 @@ Get Bulletproof Security for your site. Most friendly security plugin. No impact
16
 
17
  ### MALCARE SECURITY SERVICES
18
 
19
- WordPress Security Plugin For WordPress
20
  ★★★★★
21
 
22
- A WordPress security plugin ensures that your website remains completely safe and secure, always. [We created MalCare Security Plugin](https://www.malcare.com/) to help website owners worry less about their site security, achieve peace of mind and focus all their energies on growing their business or website.
 
 
 
 
 
 
23
 
24
  [youtube https://www.youtube.com/watch?v=rBuYh2dIadk]
25
  <br/>
@@ -40,59 +46,101 @@ MalCare offers a premium **White-Label** solution that lets agencies provide bet
40
 
41
  == Why Choose MalCare? ==
42
 
43
- * **WordPress Malware Scanner**
 
 
44
  * Detects malware BEFORE it’s too late
45
  * NO impact on your website
46
  * Finds ALL types of malware, even new & complex ones
47
 
48
- * **WordPress Malware Removal**
 
49
  * Cleans your site INSTANTLY, in less than 60 Secs
50
  * Removes ALL traces of malware
51
- * UNLIMITED cleanups
52
 
53
- * **WordPress Website Protection**
54
  * Blocks hacker BOTS from attacking login page
55
  * Identifies & blocks MALICIOUS traffic
56
  * Enables users to HARDEN their sites
57
  * Enables users to block ENTIRE countries
58
 
59
- * **Easy to Use**
60
  * Set up an account in 60 secs
61
  * Configure security once & never look at it again
62
 
63
- * **Support**
64
  * Agile & responsive customer support
65
 
66
  == Why Is MalCare Such a Game-Changer? ==
67
 
68
- 1. **Cloud-Based Malware Scanning (Free)**
69
- MalCare’s Cloud-based Scanning ensures no impact on your website ever. Moreover, it detects Complex Malware missed by other popular plugins
70
 
71
- 2. **Industry-First Instant Malware Removal (Paid)**
72
- Clean your hacked site instantly in less than 60 secs with MalCare’s 1-Click Cleaner. Clean your website before Google blacklists it or your web host takes it down.
 
 
73
 
74
- 3. **Web-Application WordPress Firewall (Free)**
75
  Get Real-Time Protection for your WordPress website against the latest threats with MalCare's Smart Firewall. Block hackers & bots before they harm your site.
76
 
77
- 4. **CAPTCHA-Based Login Protection (Free)**
78
  Automatically prevent brute force attacks with MalCare’s Smart Captcha-Based Login Protection. Round-the-clock protection against malicious traffic.
79
 
80
- 5. **WordPress Recommended Website Hardening (Paid)**
 
 
 
 
 
 
 
 
81
  Easily configure WordPress recommended best security practices with just 1-Click from right within MalCare’s dashboard. No technical knowledge needed.
82
 
83
- 6. **Geo-blocking (Paid)**
84
  Restrict access to users based on their geographical location. Easily block all visitors from certain countries to mitigate the risk of being hacked.
85
 
86
- 7. **Uptime Monitoring (Paid)**
87
  With MalCare's Uptime Monitoring keep a steady eye on your website. It ensures that you are not oblivious to website downtime.
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  == MalCare Free vs. MalCare Premium ==
90
 
91
- 1. **Malware Scanner (FREE)**
92
  * Cloud-Based Malware Scanning **(Free)**
93
  * Deep Malware Scanning - Files & Database **(Free)**
94
 
95
- 2. **Web Application (FREE)**
 
96
  * Plugin Based Firewall **(Free)**
97
  * Rules update every 7 days **(Free)**
98
  * Login Protection **(Free)**
@@ -101,13 +149,15 @@ MalCare offers a premium **White-Label** solution that lets agencies provide bet
101
  * Geo-Blocking **(Paid)**
102
  * Website Hardening **(Paid)**
103
 
104
- 3. **Malware Cleaning (PAID)**
105
  * View Malware Insights **(Paid)**
106
  * Instant One-Click Clean Ups **(Paid)**
107
  * Automatic Clean-Ups **(Paid)**
108
  * Unlimited Clean-Ups **(Paid)**
109
 
110
- 4. **Personalized Customer Support (Paid)**
 
 
111
 
112
  == Who Can Benefit From MalCare? ==
113
 
@@ -135,17 +185,19 @@ MalCare is perfect for:
135
 
136
  == MalCare Full Features List ==
137
 
138
- * **Malware Scanner**
139
  * Daily Scan Frequency
140
  * On-demand Site Scans
141
  * Scan Non-WP Files
 
142
 
143
- * **Malware Removal**
 
144
  * Instant Automatic Malware Removal
145
  * Removal of Unknown & New Malware
146
  * Unlimited Malware Removal
147
 
148
- * **Malware Protection**
149
  * Web Application Firewall
150
  * IP Whitelisting
151
  * CAPTCHA-based Login Protection
@@ -154,14 +206,14 @@ MalCare is perfect for:
154
  * Geo-Blocking
155
  * Alerts for Suspicious Logins
156
 
157
- * **Website Hardening**
158
  * Block PHP Execution in Untrusted Folders
159
  * Disable Files Editor
160
  * Block Plugin or Theme Installation
161
  * Change Security Keys
162
  * Reset All Passwords
163
 
164
- * **Website Management**
165
  * Centralized Dashboard
166
  * Plugins & Themes Management & Update
167
  * User Management
@@ -174,7 +226,7 @@ MalCare is perfect for:
174
  * Blacklist Alarm
175
  * Slack Integration
176
 
177
- * **Support**
178
  * Email
179
  * Chat
180
  * Social Media
@@ -187,7 +239,6 @@ MalCare is perfect for:
187
  * [MalCare Review on WPWhiteSecurity](https://www.wpwhitesecurity.com/malcare-wordpress-site-security-service-reviewed/)
188
  * [MalCare Reviews by WordPress Influencer Adam Preiser (Plus Real Malware Removal Demo)](https://www.youtube.com/watch?v=2yNIb4Pc_ig)
189
 
190
-
191
  == Connect With Our Team of Security Experts ==
192
 
193
  [Join MalCare's Facebook Community](https://www.facebook.com/groups/WordPressForWebCreators/) - The purpose of the group is to enable Web Creators to gain valuable insights and help from community members which will be valuable to their business. So, if you are a WordPress user & want to keep up with the latest industry news and get help for your business, [join us](https://www.facebook.com/groups/WordPressForWebCreators/)!
@@ -339,6 +390,15 @@ FTP details input into MalCare is processed on our servers. We need your FTP cre
339
  8. MalCare’s Uptime Monitoring notifies if a website goes down so that you can handle the situation before starting to lose visitors.
340
 
341
  == CHANGELOG ==
 
 
 
 
 
 
 
 
 
342
 
343
  = 4.27 =
344
  * Improved CSS
1
+ === MalCare Security - Free Malware Scanner, Protection & Security for WordPress ===
2
  Contributors: malcare security, akshatc
3
  Tags: security, wordpress security, security plugin, firewall, malware scanner, login security, automatic malware removal, improve security
4
  Plugin URI: 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.31
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
 
16
 
17
  ### MALCARE SECURITY SERVICES
18
 
19
+ WordPress Security Plugin For WordPress Websites
20
  ★★★★★
21
 
22
+ A WordPress security plugin ensures that your website remains completely safe and secure, always. We created [MalCare Security Plugin](https://www.malcare.com/) to help website owners worry less about their site security, achieve peace of mind and focus all their energies on growing their business or website.
23
+
24
+ **Difference Between MalCare Free vs Premium**
25
+
26
+ [youtube https://www.youtube.com/watch?v=90NVxDYG8N0]
27
+
28
+ **MalCare in 1 Minute - Overview**
29
 
30
  [youtube https://www.youtube.com/watch?v=rBuYh2dIadk]
31
  <br/>
46
 
47
  == Why Choose MalCare? ==
48
 
49
+ * #### WordPress Malware Scanner
50
+ * Cloud Based Deep malware scanner
51
+ * Doesn’t Slow down your website
52
  * Detects malware BEFORE it’s too late
53
  * NO impact on your website
54
  * Finds ALL types of malware, even new & complex ones
55
 
56
+ * #### WordPress Malware Removal
57
+ * View hacked file details
58
  * Cleans your site INSTANTLY, in less than 60 Secs
59
  * Removes ALL traces of malware
60
+ * UNLIMITED hack cleanups
61
 
62
+ * #### WordPress Website Protection
63
  * Blocks hacker BOTS from attacking login page
64
  * Identifies & blocks MALICIOUS traffic
65
  * Enables users to HARDEN their sites
66
  * Enables users to block ENTIRE countries
67
 
68
+ * #### Easy to Use
69
  * Set up an account in 60 secs
70
  * Configure security once & never look at it again
71
 
72
+ * #### Support
73
  * Agile & responsive customer support
74
 
75
  == Why Is MalCare Such a Game-Changer? ==
76
 
77
+ MalCare offers unparalleled security services. Some services are free and others are paid.
 
78
 
79
+ #### MalCare’s FREE Services -
80
+
81
+ 1. #### Cloud-Based Malware Scanning (Free)
82
+ MalCare’s Cloud-based Scanning ensures no impact on your website ever. Moreover, it detects Complex Malware missed by other popular plugins
83
 
84
+ 2. #### Web-Application WordPress Firewall (Free)
85
  Get Real-Time Protection for your WordPress website against the latest threats with MalCare's Smart Firewall. Block hackers & bots before they harm your site.
86
 
87
+ 3. #### CAPTCHA-Based Login Protection (Free)
88
  Automatically prevent brute force attacks with MalCare’s Smart Captcha-Based Login Protection. Round-the-clock protection against malicious traffic.
89
 
90
+ #### MalCare’s PAID Services -
91
+
92
+ 1. #### Viewing Hacked Files (Paid)
93
+ View the infected files present on your WordPress website. Learn which themes or plugins or files or folders were infected by hackers.
94
+
95
+ 2. #### Industry-First Instant Malware Removal (Paid)
96
+ Clean your hacked site instantly in less than 60 secs with MalCare’s 1-Click Cleaner. Clean your website before Google blacklists it or your web host takes it down.
97
+
98
+ 3. #### WordPress Recommended Website Hardening (Paid)
99
  Easily configure WordPress recommended best security practices with just 1-Click from right within MalCare’s dashboard. No technical knowledge needed.
100
 
101
+ 4. #### Geo-blocking (Paid)
102
  Restrict access to users based on their geographical location. Easily block all visitors from certain countries to mitigate the risk of being hacked.
103
 
104
+ 5. #### Uptime Monitoring (Paid)
105
  With MalCare's Uptime Monitoring keep a steady eye on your website. It ensures that you are not oblivious to website downtime.
106
 
107
+
108
+ == Common Hack Attacks Prevented By MalCare ==
109
+
110
+ MalCare protects websites against all common hack attacks which includes:
111
+
112
+ * [Brute force attacks](https://www.malcare.com/blog/wordpress-brute-force/)
113
+ * [Japanese keyword hack](https://www.malcare.com/blog/japanese-keyword-hack/)
114
+ * [WordPress redirect hack](https://www.malcare.com/blog/wordpress-hacked-redirect/)
115
+ * [Pharma hack](https://www.malcare.com/blog/what-is-pharma-hack-how-to-clean-it/)
116
+ * [SEO spam hack](https://www.malcare.com/blog/seo-spam/)
117
+ * [WordPress theme hack](https://www.malcare.com/blog/wordpress-theme-hacked/)
118
+ * [WordPress spam link injections](https://www.malcare.com/blog/spam-link-injection-wordpress/)
119
+ * [Revslider hack](https://www.malcare.com/blog/revslider-exploit/)
120
+ * [TimThumb hack](https://www.malcare.com/blog/wordpress-timthumb/)
121
+ * [Adminer.php hack](https://www.malcare.com/blog/adminer-php-hack/)
122
+ * [XSS or cross-site scripting hack](https://www.malcare.com/blog/cross-site-scripting-xss-attacks-what-how-prevent-them/)
123
+ * [WP-VCD hack](https://www.malcare.com/blog/how-to-detect-and-remove-wp-vcd-malware-a-step-by-step-guide-and-a-bonus-plugin/)
124
+ * [SQL injection hack](https://www.malcare.com/blog/preventing-sql-injections/)
125
+ * [WordPress malvertising hack](https://www.malcare.com/blog/wordpress-malvertising/)
126
+ * [Google Blacklist hack](https://www.malcare.com/blog/remove-google-blacklist-warning/)
127
+ * [Google Adwords hack](https://www.malcare.com/blog/google-adwords-account-suspended/)
128
+ * [Cookie stealing & session hijacking](https://www.malcare.com/blog/session-hijacking-cookie-stealing/)
129
+ * [WordPress phishing hack](https://www.malcare.com/blog/how-to-remove-phishing/)
130
+ * [Favicon.ico virus hack](https://www.malcare.com/blog/favicon-ico-virus-wordpress/)
131
+ * [WP-Feed.php & WP-Tmp.php](https://www.malcare.com/blog/removing-wp-feed-php-malware/)
132
+ * [Backdoor hack](https://www.malcare.com/blog/how-to-scan-malware-and-backdoors-of-your-wordpress-site/)
133
+ * [Coinhive hack](https://www.malcare.com/blog/coinhive-malware-wordpress/)
134
+ * [WordPress deface hack](https://www.malcare.com/blog/deface-wordpress/)
135
+
136
  == MalCare Free vs. MalCare Premium ==
137
 
138
+ 1. #### Cloud Based Malware Scanner (FREE)
139
  * Cloud-Based Malware Scanning **(Free)**
140
  * Deep Malware Scanning - Files & Database **(Free)**
141
 
142
+ 2. #### Website Firewall (FREE)
143
+ * Web Application Firewall **(Free)**
144
  * Plugin Based Firewall **(Free)**
145
  * Rules update every 7 days **(Free)**
146
  * Login Protection **(Free)**
149
  * Geo-Blocking **(Paid)**
150
  * Website Hardening **(Paid)**
151
 
152
+ 3. #### Instant Malware Removal (PAID)
153
  * View Malware Insights **(Paid)**
154
  * Instant One-Click Clean Ups **(Paid)**
155
  * Automatic Clean-Ups **(Paid)**
156
  * Unlimited Clean-Ups **(Paid)**
157
 
158
+ 4. #### Personalized Customer Support (Paid)
159
+ * Support on WordPress forum **(Free)**
160
+ * Support via email and chat **(Paid)**
161
 
162
  == Who Can Benefit From MalCare? ==
163
 
185
 
186
  == MalCare Full Features List ==
187
 
188
+ * #### Cloud Based Malware Scanner
189
  * Daily Scan Frequency
190
  * On-demand Site Scans
191
  * Scan Non-WP Files
192
+ * Does not slow down your website ever
193
 
194
+ * #### Instant Malware Removal
195
+ * View Hacked Files details
196
  * Instant Automatic Malware Removal
197
  * Removal of Unknown & New Malware
198
  * Unlimited Malware Removal
199
 
200
+ * #### Intelligent Malware Protection
201
  * Web Application Firewall
202
  * IP Whitelisting
203
  * CAPTCHA-based Login Protection
206
  * Geo-Blocking
207
  * Alerts for Suspicious Logins
208
 
209
+ * #### Website Hardening
210
  * Block PHP Execution in Untrusted Folders
211
  * Disable Files Editor
212
  * Block Plugin or Theme Installation
213
  * Change Security Keys
214
  * Reset All Passwords
215
 
216
+ * #### Complete Website Management
217
  * Centralized Dashboard
218
  * Plugins & Themes Management & Update
219
  * User Management
226
  * Blacklist Alarm
227
  * Slack Integration
228
 
229
+ * #### Support
230
  * Email
231
  * Chat
232
  * Social Media
239
  * [MalCare Review on WPWhiteSecurity](https://www.wpwhitesecurity.com/malcare-wordpress-site-security-service-reviewed/)
240
  * [MalCare Reviews by WordPress Influencer Adam Preiser (Plus Real Malware Removal Demo)](https://www.youtube.com/watch?v=2yNIb4Pc_ig)
241
 
 
242
  == Connect With Our Team of Security Experts ==
243
 
244
  [Join MalCare's Facebook Community](https://www.facebook.com/groups/WordPressForWebCreators/) - The purpose of the group is to enable Web Creators to gain valuable insights and help from community members which will be valuable to their business. So, if you are a WordPress user & want to keep up with the latest industry news and get help for your business, [join us](https://www.facebook.com/groups/WordPressForWebCreators/)!
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.31 =
394
+ * Fetching Mysql Version
395
+ * Robust data fetch APIs
396
+ * Core plugin changes
397
+ * Sanitizing incoming params
398
+
399
+ = 4.31 =
400
+ * changed bvoverride cw name to manualsignup
401
+ * plugin uninstall bug fix
402
 
403
  = 4.27 =
404
  * Improved CSS
wp_admin.php CHANGED
@@ -101,7 +101,7 @@ class MCWPAdmin {
101
  public function menu() {
102
  $bname = $this->bvinfo->getBrandName();
103
  $icon = $this->bvinfo->getBrandIcon();
104
- if (MCWPSiteInfo::isCWServer() && !$this->bvinfo->canOverrideCW()) {
105
  $brandinfo = $this->cwBrandInfo();
106
  $bname = $brandinfo["menuname"];
107
  $icon = $brandinfo["brand_icon"];
@@ -192,13 +192,13 @@ class MCWPAdmin {
192
  if (isset($_REQUEST['account_details'])) {
193
  require_once dirname( __FILE__ ) . "/admin/account_details.php";
194
  } else if (isset($_REQUEST['add_account'])) {
195
- $this->settings->updateOption('bvoverridecw', true);
196
  $this->enqueueBootstrapCSS();
197
  require_once dirname( __FILE__ ) . "/admin/registration.php";
198
  } else if(MCAccount::isConfigured($this->settings)) {
199
  require_once dirname( __FILE__ ) . "/admin/dashboard.php";
200
  } else {
201
- $this->settings->updateOption('bvoverridecw', true);
202
  $this->enqueueBootstrapCSS();
203
  require_once dirname( __FILE__ ) . "/admin/registration.php";
204
  }
@@ -211,7 +211,7 @@ class MCWPAdmin {
211
  return $plugins;
212
  }
213
 
214
- if (MCWPSiteInfo::isCWServer() && !$this->bvinfo->canOverrideCW()) {
215
  $brand = $this->cwBrandInfo();
216
  if (array_key_exists('name', $brand)) {
217
  $plugins[$slug]['Name'] = $brand['name'];
101
  public function menu() {
102
  $bname = $this->bvinfo->getBrandName();
103
  $icon = $this->bvinfo->getBrandIcon();
104
+ if (MCWPSiteInfo::isCWServer() && !$this->bvinfo->isManualSignup()) {
105
  $brandinfo = $this->cwBrandInfo();
106
  $bname = $brandinfo["menuname"];
107
  $icon = $brandinfo["brand_icon"];
192
  if (isset($_REQUEST['account_details'])) {
193
  require_once dirname( __FILE__ ) . "/admin/account_details.php";
194
  } else if (isset($_REQUEST['add_account'])) {
195
+ $this->settings->updateOption('bvmanualsignup', true);
196
  $this->enqueueBootstrapCSS();
197
  require_once dirname( __FILE__ ) . "/admin/registration.php";
198
  } else if(MCAccount::isConfigured($this->settings)) {
199
  require_once dirname( __FILE__ ) . "/admin/dashboard.php";
200
  } else {
201
+ $this->settings->updateOption('bvmanualsignup', true);
202
  $this->enqueueBootstrapCSS();
203
  require_once dirname( __FILE__ ) . "/admin/registration.php";
204
  }
211
  return $plugins;
212
  }
213
 
214
+ if (MCWPSiteInfo::isCWServer() && !$this->bvinfo->isManualSignup()) {
215
  $brand = $this->cwBrandInfo();
216
  if (array_key_exists('name', $brand)) {
217
  $plugins[$slug]['Name'] = $brand['name'];
wp_cli.php CHANGED
@@ -65,6 +65,23 @@ class MCWPCli {
65
  $this->request($account->authenticatedUrl('/bvapi/enable_fw'));
66
  }
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  private function request($url, $request_params = array(), $headers = array()) {
69
  $resp = $this->bvapi->http_request($url, $request_params, $headers);
70
  $this->handle_response($resp);
65
  $this->request($account->authenticatedUrl('/bvapi/enable_fw'));
66
  }
67
 
68
+ public function disconnect($args, $params) {
69
+ if (isset($params['public_key'])) {
70
+ if (strlen($params['public_key']) >= 32) {
71
+ $status = MCAccount::remove($this->settings, $params['public_key']);
72
+ if ($status) {
73
+ WP_CLI::success('Account Keys removed successfully.');
74
+ } else {
75
+ WP_CLI::error('No Account with provided public key exists.');
76
+ }
77
+ } else {
78
+ WP_CLI::error('Invalid Public Key.');
79
+ }
80
+ } else {
81
+ WP_CLI::error('Please Provide Public Key.');
82
+ }
83
+ }
84
+
85
  private function request($url, $request_params = array(), $headers = array()) {
86
  $resp = $this->bvapi->http_request($url, $request_params, $headers);
87
  $this->handle_response($resp);