WordPress Backup & Security Plugin – BlogVault - Version 4.72

Version Description

  • Sync Improvements
  • Enhanced plugin activate flow.
Download this release

Release Info

Developer ritesh.soni36
Plugin Icon 128x128 WordPress Backup & Security Plugin – BlogVault
Version 4.72
Comparing to
See all releases

Code changes from version 4.69 to 4.72

admin/components/form.php CHANGED
@@ -11,7 +11,7 @@
11
  <div class="row">
12
  <div class="col-xs-12 form-container">
13
  <div class="search-container text-center ">
14
- <form action="<?php echo $this->bvinfo->appUrl(); ?>/plugin/bvstart" style="padding-top:10px; margin: 0px;" onsubmit="document.getElementById('get-started').disabled = true;" method="post" name="signup">
15
  <input type='hidden' name='bvsrc' value='wpplugin'/>
16
  <?php echo $this->siteInfoTags(); ?>
17
  <input type="text" placeholder="Enter your email address to continue" id="email" name="email" class="search" required>
11
  <div class="row">
12
  <div class="col-xs-12 form-container">
13
  <div class="search-container text-center ">
14
+ <form action="<?php echo $this->bvinfo->appUrl(); ?>/plugin/signup" style="padding-top:10px; margin: 0px;" onsubmit="document.getElementById('get-started').disabled = true;" method="post" name="signup">
15
  <input type='hidden' name='bvsrc' value='wpplugin'/>
16
  <?php echo $this->siteInfoTags(); ?>
17
  <input type="text" placeholder="Enter your email address to continue" id="email" name="email" class="search" required>
blogvault.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://blogvault.net
5
  Description: Easiest way to backup & secure your WordPress site
6
  Author: Backup by BlogVault
7
  Author URI: https://blogvault.net
8
- Version: 4.69
9
  Network: True
10
  */
11
 
5
  Description: Easiest way to backup & secure your WordPress site
6
  Author: Backup by BlogVault
7
  Author URI: https://blogvault.net
8
+ Version: 4.72
9
  Network: True
10
  */
11
 
callback/base.php CHANGED
@@ -11,10 +11,10 @@ class BVCallbackBase {
11
  "UPGRADER_WING_VERSION" => '1.0',
12
  "BRAND_WING_VERSION" => '1.0',
13
  "DB_WING_VERSION" => '1.0',
14
- "ACCOUNT_WING_VERSION" => '1.0',
15
  "MISC_WING_VERSION" => '1.1',
16
  "FS_WING_VERSION" => '1.0',
17
- "INFO_WING_VERSION" => '1.1',
18
  "WATCH_WING_VERSION" => '1.0',
19
  "FS_WRITE_WING_VERSION" => '1.0',
20
  "IPSTORE_WING_VERSION" => '1.0',
11
  "UPGRADER_WING_VERSION" => '1.0',
12
  "BRAND_WING_VERSION" => '1.0',
13
  "DB_WING_VERSION" => '1.0',
14
+ "ACCOUNT_WING_VERSION" => '1.1',
15
  "MISC_WING_VERSION" => '1.1',
16
  "FS_WING_VERSION" => '1.0',
17
+ "INFO_WING_VERSION" => '1.2',
18
  "WATCH_WING_VERSION" => '1.0',
19
  "FS_WRITE_WING_VERSION" => '1.0',
20
  "IPSTORE_WING_VERSION" => '1.0',
callback/wings/account.php CHANGED
@@ -6,13 +6,41 @@ class BVAccountCallback extends BVCallbackBase {
6
  public $account;
7
  public $settings;
8
 
9
- const ACCOUNT_WING_VERSION = 1.0;
10
 
11
  public function __construct($callback_handler) {
12
  $this->account = $callback_handler->account;
13
  $this->settings = $callback_handler->settings;
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  function process($request) {
17
  $params = $request->params;
18
  $account = $this->account;
@@ -48,6 +76,9 @@ class BVAccountCallback extends BVCallbackBase {
48
  case "fetch":
49
  $resp = array("status" => BVAccount::allAccounts($this->settings));
50
  break;
 
 
 
51
  default:
52
  $resp = false;
53
  }
6
  public $account;
7
  public $settings;
8
 
9
+ const ACCOUNT_WING_VERSION = 1.1;
10
 
11
  public function __construct($callback_handler) {
12
  $this->account = $callback_handler->account;
13
  $this->settings = $callback_handler->settings;
14
  }
15
 
16
+ function updateInfo($args) {
17
+ $result = array();
18
+
19
+ if (array_key_exists('update_info', $args)) {
20
+ $this->account->updateInfo($args['update_info']);
21
+ $result['update_info'] = array(
22
+ "status" => BVAccount::exists($this->settings, $args['update_info']['pubkey'])
23
+ );
24
+ }
25
+
26
+ if (array_key_exists('update_api_key', $args)) {
27
+ BVAccount::updateApiPublicKey($this->settings, $args['update_api_key']['pubkey']);
28
+ $result['update_api_key'] = array(
29
+ "status" => $this->settings->getOption(BVAccount::$api_public_key)
30
+ );
31
+ }
32
+
33
+ if (array_key_exists('update_options', $args))
34
+ $result['update_options'] = $this->settings->updateOptions($args['update_options']);
35
+
36
+ if (array_key_exists('delete_options', $args))
37
+ $result['delete_options'] = $this->settings->deleteOptions($args['delete_options']);
38
+
39
+ $result['status'] = true;
40
+
41
+ return $result;
42
+ }
43
+
44
  function process($request) {
45
  $params = $request->params;
46
  $account = $this->account;
76
  case "fetch":
77
  $resp = array("status" => BVAccount::allAccounts($this->settings));
78
  break;
79
+ case "updtinfo":
80
+ $resp = $this->updateInfo($params);
81
+ break;
82
  default:
83
  $resp = false;
84
  }
callback/wings/info.php CHANGED
@@ -8,14 +8,16 @@ class BVInfoCallback extends BVCallbackBase {
8
  public $settings;
9
  public $siteinfo;
10
  public $bvinfo;
 
11
 
12
- const INFO_WING_VERSION = 1.1;
13
 
14
  public function __construct($callback_handler) {
15
  $this->db = $callback_handler->db;
16
  $this->siteinfo = $callback_handler->siteinfo;
17
  $this->settings = $callback_handler->settings;
18
  $this->bvinfo = new BVInfo($this->settings);
 
19
  }
20
 
21
  public function getPosts($post_type, $count = 5) {
@@ -155,7 +157,7 @@ class BVInfoCallback extends BVCallbackBase {
155
  'wp_local_string' => $wp_local_package,
156
  'charset_collate' => $db->getCharsetCollate()
157
  );
158
- return array("wp" => $wp_info);
159
  }
160
 
161
  public function getUsers($full, $args = array()) {
@@ -223,21 +225,21 @@ class BVInfoCallback extends BVCallbackBase {
223
  }
224
 
225
  public function cookieInfo() {
226
- $resp = array();
227
  if (defined('COOKIEPATH'))
228
- $resp['cookiepath'] = COOKIEPATH;
229
  if (defined('COOKIE_DOMAIN'))
230
- $resp['cookiedomain'] = COOKIE_DOMAIN;
231
- return array('cookieinfo' => $resp);
232
  }
233
 
234
  public function activate() {
235
- $resp = array();
236
- $this->siteinfo->basic($resp);
237
- $this->servicesInfo($resp);
238
- $this->dbconf($resp);
239
- $this->availableFunctions($resp);
240
- return array('actinfo' => $resp);
241
  }
242
 
243
  public function getHostInfo() {
@@ -255,7 +257,7 @@ class BVInfoCallback extends BVCallbackBase {
255
  $host_info['WPE_APIKEY'] = WPE_APIKEY;
256
  }
257
 
258
- return array('host_info' => $host_info);
259
  }
260
 
261
  function refreshUpdatesInfo() {
@@ -328,7 +330,7 @@ class BVInfoCallback extends BVCallbackBase {
328
  return array_merge($this->getThemes(), $this->getTransient('update_themes'));
329
  }
330
 
331
- public function getSiteInfo($args) {
332
  $result = array();
333
 
334
  if (array_key_exists('refresh', $args))
@@ -352,15 +354,51 @@ class BVInfoCallback extends BVCallbackBase {
352
  return $result;
353
  }
354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  public function process($request) {
356
  $db = $this->db;
357
  $params = $request->params;
358
  switch ($request->method) {
359
  case "activateinfo":
360
- $resp = $this->activate();
361
  break;
362
  case "ckeyinfo":
363
- $resp = $this->cookieInfo();
364
  break;
365
  case "gtpsts":
366
  $count = 5;
@@ -381,7 +419,7 @@ class BVInfoCallback extends BVCallbackBase {
381
  $resp = array('sys' => $this->getSystemInfo());
382
  break;
383
  case "gtwp":
384
- $resp = $this->getWpInfo();
385
  break;
386
  case "gtallhdrs":
387
  $data = (function_exists('getallheaders')) ? getallheaders() : false;
@@ -403,8 +441,8 @@ class BVInfoCallback extends BVCallbackBase {
403
  $resp = $this->getTransient($params['name'], array_key_exists('asarray', $params));
404
  break;
405
  case "gthost":
406
- $resp = $this->getHostInfo();
407
- break;
408
  case "gtplinfo":
409
  $args = array(
410
  'slug' => wp_unslash($params['slug'])
@@ -415,6 +453,9 @@ class BVInfoCallback extends BVCallbackBase {
415
  $data = apply_filters('plugins_api', false, $action, $args);
416
  $resp = array("plugins_info" => $data);
417
  break;
 
 
 
418
  case "gtsteinfo":
419
  $resp = $this->getSiteInfo($params);
420
  break;
8
  public $settings;
9
  public $siteinfo;
10
  public $bvinfo;
11
+ public $bvapi;
12
 
13
+ const INFO_WING_VERSION = 1.2;
14
 
15
  public function __construct($callback_handler) {
16
  $this->db = $callback_handler->db;
17
  $this->siteinfo = $callback_handler->siteinfo;
18
  $this->settings = $callback_handler->settings;
19
  $this->bvinfo = new BVInfo($this->settings);
20
+ $this->bvapi = new BVWPAPI($this->settings);
21
  }
22
 
23
  public function getPosts($post_type, $count = 5) {
157
  'wp_local_string' => $wp_local_package,
158
  'charset_collate' => $db->getCharsetCollate()
159
  );
160
+ return $wp_info;
161
  }
162
 
163
  public function getUsers($full, $args = array()) {
225
  }
226
 
227
  public function cookieInfo() {
228
+ $info = array();
229
  if (defined('COOKIEPATH'))
230
+ $info['cookiepath'] = COOKIEPATH;
231
  if (defined('COOKIE_DOMAIN'))
232
+ $info['cookiedomain'] = COOKIE_DOMAIN;
233
+ return $info;
234
  }
235
 
236
  public function activate() {
237
+ $info = array();
238
+ $this->siteinfo->basic($info);
239
+ $this->servicesInfo($info);
240
+ $this->dbconf($info);
241
+ $this->availableFunctions($info);
242
+ return $info;
243
  }
244
 
245
  public function getHostInfo() {
257
  $host_info['WPE_APIKEY'] = WPE_APIKEY;
258
  }
259
 
260
+ return $host_info;
261
  }
262
 
263
  function refreshUpdatesInfo() {
330
  return array_merge($this->getThemes(), $this->getTransient('update_themes'));
331
  }
332
 
333
+ function getSiteInfo($args) {
334
  $result = array();
335
 
336
  if (array_key_exists('refresh', $args))
354
  return $result;
355
  }
356
 
357
+ function pingBV() {
358
+ $info = array();
359
+ $this->siteinfo->basic($info);
360
+ $this->bvapi->pingbv('/bvapi/pingbv', $info);
361
+ return true;
362
+ }
363
+
364
+ function getPostActivateInfo($args) {
365
+ $result = array();
366
+
367
+ if (array_key_exists('pingbv', $args))
368
+ $result['pingbv'] = array('status' => $this->pingBV());
369
+
370
+ if (array_key_exists('activate_info', $args))
371
+ $result['activate_info'] = $this->activate();
372
+
373
+ if (array_key_exists('cookie_info', $args))
374
+ $result['cookie_info'] = $this->cookieInfo();
375
+
376
+ if (array_key_exists('get_host', $args))
377
+ $result['get_host'] = $this->getHostInfo();
378
+
379
+ if (array_key_exists('get_wp', $args))
380
+ $result['get_wp'] = $this->getWpInfo();
381
+
382
+ if (array_key_exists('get_options', $args))
383
+ $result['get_options'] = $this->settings->getOptions($args['get_options']);
384
+
385
+ if (array_key_exists('get_tables', $args))
386
+ $result['get_tables'] = $this->db->showTables();
387
+
388
+ $result['status'] = true;
389
+
390
+ return $result;
391
+ }
392
+
393
  public function process($request) {
394
  $db = $this->db;
395
  $params = $request->params;
396
  switch ($request->method) {
397
  case "activateinfo":
398
+ $resp = array('actinfo' => $this->activate());
399
  break;
400
  case "ckeyinfo":
401
+ $resp = array('cookieinfo' => $this->cookieInfo());
402
  break;
403
  case "gtpsts":
404
  $count = 5;
419
  $resp = array('sys' => $this->getSystemInfo());
420
  break;
421
  case "gtwp":
422
+ $resp = array('wp' => $this->getWpInfo());
423
  break;
424
  case "gtallhdrs":
425
  $data = (function_exists('getallheaders')) ? getallheaders() : false;
441
  $resp = $this->getTransient($params['name'], array_key_exists('asarray', $params));
442
  break;
443
  case "gthost":
444
+ $resp = array('host_info' => $this->getHostInfo());
445
+ break;
446
  case "gtplinfo":
447
  $args = array(
448
  'slug' => wp_unslash($params['slug'])
453
  $data = apply_filters('plugins_api', false, $action, $args);
454
  $resp = array("plugins_info" => $data);
455
  break;
456
+ case "gtpostactinfo":
457
+ $resp = $this->getPostActivateInfo($params);
458
+ break;
459
  case "gtsteinfo":
460
  $resp = $this->getSiteInfo($params);
461
  break;
info.php CHANGED
@@ -10,7 +10,7 @@ if (!class_exists('BVInfo')) :
10
  public $badgeinfo = 'bvbadge';
11
  public $ip_header_option = 'bvipheader';
12
  public $brand_option = 'bvbrand';
13
- public $version = '4.69';
14
  public $webpage = 'https://blogvault.net';
15
  public $appurl = 'https://app.blogvault.net';
16
  public $slug = 'blogvault-real-time-backup/blogvault.php';
10
  public $badgeinfo = 'bvbadge';
11
  public $ip_header_option = 'bvipheader';
12
  public $brand_option = 'bvbrand';
13
+ public $version = '4.72';
14
  public $webpage = 'https://blogvault.net';
15
  public $appurl = 'https://app.blogvault.net';
16
  public $slug = 'blogvault-real-time-backup/blogvault.php';
readme.txt CHANGED
@@ -4,9 +4,9 @@ Tags: backup, wordpress backup, backup plugin, cloud backup, database backup, ba
4
  Plugin URI: https://blogvault.net/
5
  Donate link: https://app.blogvault.net/home/signup
6
  Requires at least: 4.0
7
- Tested up to: 5.8
8
  Requires PHP: 5.4.0
9
- Stable tag: 4.69
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
 
@@ -247,12 +247,16 @@ These are available on our website: [Terms of Service](https://blogvault.net/tos
247
  9. We power WordPress migration for WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii and many more. Need we say more?
248
 
249
  == CHANGELOG ==
 
 
 
 
250
  = 4.69 =
251
  * Improved network call efficiency for site info callbacks.
252
 
253
  = 4.68 =
254
  * Removing use of constants for arrays for PHP 5.4 support.
255
- * Robust firewall-config checks.
256
 
257
  = 4.66 =
258
  * Post type fetch improvement.
4
  Plugin URI: https://blogvault.net/
5
  Donate link: https://app.blogvault.net/home/signup
6
  Requires at least: 4.0
7
+ Tested up to: 5.9
8
  Requires PHP: 5.4.0
9
+ Stable tag: 4.72
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
 
247
  9. We power WordPress migration for WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii and many more. Need we say more?
248
 
249
  == CHANGELOG ==
250
+ = 4.72 =
251
+ * Sync Improvements
252
+ * Enhanced plugin activate flow.
253
+
254
  = 4.69 =
255
  * Improved network call efficiency for site info callbacks.
256
 
257
  = 4.68 =
258
  * Removing use of constants for arrays for PHP 5.4 support.
259
+ * Robust firewall-config checks
260
 
261
  = 4.66 =
262
  * Post type fetch improvement.
wp_admin.php CHANGED
@@ -51,6 +51,7 @@ class BVWPAdmin {
51
  }
52
  if ($this->bvinfo->isActivateRedirectSet()) {
53
  $this->settings->updateOption($this->bvinfo->plug_redirect, 'no');
 
54
  wp_redirect($this->mainUrl());
55
  }
56
  }
51
  }
52
  if ($this->bvinfo->isActivateRedirectSet()) {
53
  $this->settings->updateOption($this->bvinfo->plug_redirect, 'no');
54
+ ##ACTIVATEREDIRECTCODE##
55
  wp_redirect($this->mainUrl());
56
  }
57
  }
wp_settings.php CHANGED
@@ -30,6 +30,37 @@ if (!class_exists('BVWPSettings')) :
30
  }
31
  }
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  public function setTransient($name, $value, $time) {
34
  if (function_exists('set_site_transient')) {
35
  return set_site_transient($name, $value, $time);
30
  }
31
  }
32
 
33
+ public function getOptions($options = array()) {
34
+ $result = array();
35
+
36
+ foreach ($options as $option)
37
+ $result[$option] = $this->getOption($option);
38
+
39
+ return $result;
40
+ }
41
+
42
+ public function updateOptions($args) {
43
+ $result = array();
44
+
45
+ foreach ($args as $option => $value) {
46
+ $this->updateOption($option, $value);
47
+ $result[$option] = $this->getOption($option);
48
+ }
49
+
50
+ return $result;
51
+ }
52
+
53
+ public function deleteOptions($options) {
54
+ $result = array();
55
+
56
+ foreach ($options as $option) {
57
+ $this->deleteOption($option);
58
+ $result[$option] = !$this->getOption($option);
59
+ }
60
+
61
+ return $result;
62
+ }
63
+
64
  public function setTransient($name, $value, $time) {
65
  if (function_exists('set_site_transient')) {
66
  return set_site_transient($name, $value, $time);