Migrate Guru: Migrate & Clone WordPress Free - Version 4.72

Version Description

  • Sync Improvements
Download this release

Release Info

Developer ritesh.soni36
Plugin Icon 128x128 Migrate Guru: Migrate & Clone WordPress Free
Version 4.72
Comparing to
See all releases

Code changes from version 4.69 to 4.72

callback/base.php CHANGED
@@ -7,10 +7,10 @@ class BVCallbackBase {
7
 
8
  public static $wing_infos = array("BRAND_WING_VERSION" => '1.0',
9
  "DB_WING_VERSION" => '1.0',
10
- "ACCOUNT_WING_VERSION" => '1.0',
11
  "MISC_WING_VERSION" => '1.1',
12
  "FS_WING_VERSION" => '1.0',
13
- "INFO_WING_VERSION" => '1.1',
14
  );
15
 
16
  public function objectToArray($obj) {
7
 
8
  public static $wing_infos = array("BRAND_WING_VERSION" => '1.0',
9
  "DB_WING_VERSION" => '1.0',
10
+ "ACCOUNT_WING_VERSION" => '1.1',
11
  "MISC_WING_VERSION" => '1.1',
12
  "FS_WING_VERSION" => '1.0',
13
+ "INFO_WING_VERSION" => '1.2',
14
  );
15
 
16
  public function objectToArray($obj) {
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" => MGAccount::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" => MGAccount::exists($this->settings, $args['update_info']['pubkey'])
23
+ );
24
+ }
25
+
26
+ if (array_key_exists('update_api_key', $args)) {
27
+ MGAccount::updateApiPublicKey($this->settings, $args['update_api_key']['pubkey']);
28
+ $result['update_api_key'] = array(
29
+ "status" => $this->settings->getOption(MGAccount::$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" => MGAccount::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 MGInfo($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 MGInfo($this->settings);
20
+ $this->bvapi = new MGWPAPI($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('MGInfo')) :
10
  public $badgeinfo = 'bvmgbadge';
11
  public $ip_header_option = 'bvmgipheader';
12
  public $brand_option = 'bvmgbrand';
13
- public $version = '4.69';
14
  public $webpage = 'https://www.migrateguru.com';
15
  public $appurl = 'https://mg.blogvault.net';
16
  public $slug = 'migrate-guru/migrateguru.php';
10
  public $badgeinfo = 'bvmgbadge';
11
  public $ip_header_option = 'bvmgipheader';
12
  public $brand_option = 'bvmgbrand';
13
+ public $version = '4.72';
14
  public $webpage = 'https://www.migrateguru.com';
15
  public $appurl = 'https://mg.blogvault.net';
16
  public $slug = 'migrate-guru/migrateguru.php';
migrateguru.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.migrateguru.com
5
  Description: Migrating your site(s) to any WordPress Hosting platform has never been so easy.
6
  Author: Migrate Guru
7
  Author URI: http://www.migrateguru.com
8
- Version: 4.69
9
  Network: True
10
  */
11
 
5
  Description: Migrating your site(s) to any WordPress Hosting platform has never been so easy.
6
  Author: Migrate Guru
7
  Author URI: http://www.migrateguru.com
8
+ Version: 4.72
9
  Network: True
10
  */
11
 
readme.txt CHANGED
@@ -4,9 +4,9 @@ Tags: migrate, migrate WordPress, WordPress migration, migration, clone, transfe
4
  Plugin URI: https://www.migrateguru.com/
5
  Donate link: https://www.migrateguru.com/
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
 
@@ -132,6 +132,9 @@ Yes, we do. You can access it here: https://migrateguru.freshdesk.com/support/ho
132
  6. Click ‘Migrate’.
133
 
134
  == Changelog =
 
 
 
135
  = 4.69 =
136
  * Improved network call efficiency for site info callbacks
137
 
4
  Plugin URI: https://www.migrateguru.com/
5
  Donate link: https://www.migrateguru.com/
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
 
132
  6. Click ‘Migrate’.
133
 
134
  == Changelog =
135
+ = 4.72 =
136
+ * Sync Improvements
137
+
138
  = 4.69 =
139
  * Improved network call efficiency for site info callbacks
140
 
wp_settings.php CHANGED
@@ -30,6 +30,37 @@ if (!class_exists('MGWPSettings')) :
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);