All-in-One WP Migration - Version 7.21

Version Description

Added

  • Better compatibility to Oxygen Builder. Thanks Rookie for reporting it
Download this release

Release Info

Developer bangelov
Plugin Icon 128x128 All-in-One WP Migration
Version 7.21
Comparing to
See all releases

Code changes from version 7.20 to 7.21

all-in-one-wp-migration.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
  * Author: ServMask
7
  * Author URI: https://servmask.com/
8
- * Version: 7.20
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
5
  * Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
  * Author: ServMask
7
  * Author URI: https://servmask.com/
8
+ * Version: 7.21
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
constants.php CHANGED
@@ -35,7 +35,7 @@ define( 'AI1WM_DEBUG', false );
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
- define( 'AI1WM_VERSION', '7.20' );
39
 
40
  // ===============
41
  // = Plugin Name =
@@ -517,6 +517,43 @@ if ( ! defined( 'AI1WMAE_PLUGIN_SHORT' ) ) {
517
  define( 'AI1WMAE_PLUGIN_SHORT', 'b2' );
518
  }
519
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  // ==========================
521
  // = Box Extension Base Dir =
522
  // ==========================
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
+ define( 'AI1WM_VERSION', '7.21' );
39
 
40
  // ===============
41
  // = Plugin Name =
517
  define( 'AI1WMAE_PLUGIN_SHORT', 'b2' );
518
  }
519
 
520
+ // ==========================
521
+ // = Backup Plugin Base Dir =
522
+ // ==========================
523
+ if ( defined( 'AI1WMVE_PLUGIN_BASENAME' ) ) {
524
+ define( 'AI1WMVE_PLUGIN_BASEDIR', dirname( AI1WMVE_PLUGIN_BASENAME ) );
525
+ } else {
526
+ define( 'AI1WMVE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-backup' );
527
+ }
528
+
529
+ // =======================
530
+ // = Backup Plugin Title =
531
+ // =======================
532
+ if ( ! defined( 'AI1WMVE_PLUGIN_TITLE' ) ) {
533
+ define( 'AI1WMVE_PLUGIN_TITLE', 'Backup Plugin' );
534
+ }
535
+
536
+ // =======================
537
+ // = Backup Plugin About =
538
+ // =======================
539
+ if ( ! defined( 'AI1WMVE_PLUGIN_ABOUT' ) ) {
540
+ define( 'AI1WMVE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/backup-plugin.json' );
541
+ }
542
+
543
+ // =====================
544
+ // = Backup Plugin Key =
545
+ // =====================
546
+ if ( ! defined( 'AI1WMVE_PLUGIN_KEY' ) ) {
547
+ define( 'AI1WMVE_PLUGIN_KEY', 'ai1wmve_plugin_key' );
548
+ }
549
+
550
+ // =======================
551
+ // = Backup Plugin Short =
552
+ // =======================
553
+ if ( ! defined( 'AI1WMVE_PLUGIN_SHORT' ) ) {
554
+ define( 'AI1WMVE_PLUGIN_SHORT', 'backup' );
555
+ }
556
+
557
  // ==========================
558
  // = Box Extension Base Dir =
559
  // ==========================
functions.php CHANGED
@@ -783,6 +783,13 @@ function ai1wm_plugin_filters( $filters = array() ) {
783
  $filters[] = 'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-b2-extension';
784
  }
785
 
 
 
 
 
 
 
 
786
  // Box Extension
787
  if ( defined( 'AI1WMBE_PLUGIN_BASENAME' ) ) {
788
  $filters[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( AI1WMBE_PLUGIN_BASENAME );
@@ -933,6 +940,11 @@ function ai1wm_active_servmask_plugins( $plugins = array() ) {
933
  $plugins[] = AI1WMAE_PLUGIN_BASENAME;
934
  }
935
 
 
 
 
 
 
936
  // Box Extension
937
  if ( defined( 'AI1WMBE_PLUGIN_BASENAME' ) ) {
938
  $plugins[] = AI1WMBE_PLUGIN_BASENAME;
783
  $filters[] = 'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-b2-extension';
784
  }
785
 
786
+ // Backup Plugin
787
+ if ( defined( 'AI1WMVE_PLUGIN_BASENAME' ) ) {
788
+ $filters[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( AI1WMVE_PLUGIN_BASENAME );
789
+ } else {
790
+ $filters[] = 'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-backup';
791
+ }
792
+
793
  // Box Extension
794
  if ( defined( 'AI1WMBE_PLUGIN_BASENAME' ) ) {
795
  $filters[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( AI1WMBE_PLUGIN_BASENAME );
940
  $plugins[] = AI1WMAE_PLUGIN_BASENAME;
941
  }
942
 
943
+ // Backup Plugin
944
+ if ( defined( 'AI1WMVE_PLUGIN_BASENAME' ) ) {
945
+ $plugins[] = AI1WMVE_PLUGIN_BASENAME;
946
+ }
947
+
948
  // Box Extension
949
  if ( defined( 'AI1WMBE_PLUGIN_BASENAME' ) ) {
950
  $plugins[] = AI1WMBE_PLUGIN_BASENAME;
lib/model/class-ai1wm-extensions.php CHANGED
@@ -63,6 +63,19 @@ class Ai1wm_Extensions {
63
  );
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  // Add Box Extension
67
  if ( defined( 'AI1WMBE_PLUGIN_NAME' ) ) {
68
  $extensions[ AI1WMBE_PLUGIN_NAME ] = array(
@@ -201,7 +214,7 @@ class Ai1wm_Extensions {
201
  'about' => AI1WMME_PLUGIN_ABOUT,
202
  'basename' => AI1WMME_PLUGIN_BASENAME,
203
  'version' => AI1WMME_VERSION,
204
- 'requires' => '3.92',
205
  'short' => AI1WMME_PLUGIN_SHORT,
206
  );
207
  }
63
  );
64
  }
65
 
66
+ // Add Backup Plugin
67
+ if ( defined( 'AI1WMVE_PLUGIN_NAME' ) ) {
68
+ $extensions[ AI1WMVE_PLUGIN_NAME ] = array(
69
+ 'key' => AI1WMVE_PLUGIN_KEY,
70
+ 'title' => AI1WMVE_PLUGIN_TITLE,
71
+ 'about' => AI1WMVE_PLUGIN_ABOUT,
72
+ 'basename' => AI1WMVE_PLUGIN_BASENAME,
73
+ 'version' => AI1WMVE_VERSION,
74
+ 'requires' => '1.0',
75
+ 'short' => AI1WMVE_PLUGIN_SHORT,
76
+ );
77
+ }
78
+
79
  // Add Box Extension
80
  if ( defined( 'AI1WMBE_PLUGIN_NAME' ) ) {
81
  $extensions[ AI1WMBE_PLUGIN_NAME ] = array(
214
  'about' => AI1WMME_PLUGIN_ABOUT,
215
  'basename' => AI1WMME_PLUGIN_BASENAME,
216
  'version' => AI1WMME_VERSION,
217
+ 'requires' => '3.93',
218
  'short' => AI1WMME_PLUGIN_SHORT,
219
  );
220
  }
lib/model/import/class-ai1wm-import-database.php CHANGED
@@ -956,6 +956,9 @@ class Ai1wm_Import_Database {
956
  // Set Visual Composer
957
  $mysql->set_visual_composer( ai1wm_validate_plugin_basename( 'js_composer/js_composer.php' ) );
958
 
 
 
 
959
  // Set Optimize Press
960
  $mysql->set_optimize_press( ai1wm_validate_plugin_basename( 'optimizePressPlugin/optimizepress.php' ) );
961
 
956
  // Set Visual Composer
957
  $mysql->set_visual_composer( ai1wm_validate_plugin_basename( 'js_composer/js_composer.php' ) );
958
 
959
+ // Set Oxygen Builder
960
+ $mysql->set_oxygen_builder( ai1wm_validate_plugin_basename( 'oxygen/functions.php' ) );
961
+
962
  // Set Optimize Press
963
  $mysql->set_optimize_press( ai1wm_validate_plugin_basename( 'optimizePressPlugin/optimizepress.php' ) );
964
 
lib/model/import/class-ai1wm-import-done.php CHANGED
@@ -241,20 +241,11 @@ class Ai1wm_Import_Done {
241
  }
242
 
243
  // Set progress
244
- Ai1wm_Status::done(
245
- __(
246
- 'Your site has been imported successfully!',
247
- AI1WM_PLUGIN_NAME
248
- ),
249
- sprintf(
250
- __(
251
- '» <a class="ai1wm-no-underline" href="%s" target="_blank">Save permalinks structure</a>.</strong> (opens a new window)<br />' .
252
- '» <a class="ai1wm-no-underline" href="https://wordpress.org/support/view/plugin-reviews/all-in-one-wp-migration?rate=5#postform" target="_blank">Optionally, review the plugin</a>.</strong> (opens a new window)',
253
- AI1WM_PLUGIN_NAME
254
- ),
255
- admin_url( 'options-permalink.php#submit' )
256
- )
257
- );
258
 
259
  return $params;
260
  }
241
  }
242
 
243
  // Set progress
244
+ if ( ai1wm_validate_plugin_basename( 'oxygen/functions.php' ) ) {
245
+ Ai1wm_Status::done( __( 'Your site has been imported successfully!', AI1WM_PLUGIN_NAME ), Ai1wm_Template::get_content( 'import/oxygen' ) );
246
+ } else {
247
+ Ai1wm_Status::done( __( 'Your site has been imported successfully!', AI1WM_PLUGIN_NAME ), Ai1wm_Template::get_content( 'import/done' ) );
248
+ }
 
 
 
 
 
 
 
 
 
249
 
250
  return $params;
251
  }
lib/vendor/servmask/database/class-ai1wm-database.php CHANGED
@@ -78,6 +78,20 @@ abstract class Ai1wm_Database {
78
  */
79
  protected $new_replace_values = array();
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  /**
82
  * Table where clauses
83
  *
@@ -120,6 +134,13 @@ abstract class Ai1wm_Database {
120
  */
121
  protected $visual_composer = false;
122
 
 
 
 
 
 
 
 
123
  /**
124
  * BeTheme Responsive
125
  *
@@ -477,6 +498,27 @@ abstract class Ai1wm_Database {
477
  return $this->visual_composer;
478
  }
479
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  /**
481
  * Set BeTheme Responsive
482
  *
@@ -1362,6 +1404,11 @@ abstract class Ai1wm_Database {
1362
  $input = preg_replace_callback( '/\[vc_raw_html\]([a-zA-Z0-9\/+]+={0,2})\[\/vc_raw_html\]/S', array( $this, 'replace_visual_composer_values_callback' ), $input );
1363
  }
1364
 
 
 
 
 
 
1365
  // Replace base64 encoded values (BeTheme Responsive and Optimize Press)
1366
  if ( $this->get_betheme_responsive() || $this->get_optimize_press() ) {
1367
  $input = preg_replace_callback( "/'([a-zA-Z0-9\/+]+={0,2})'/S", array( $this, 'replace_base64_values_callback' ), $input );
@@ -1401,6 +1448,29 @@ abstract class Ai1wm_Database {
1401
  return '[vc_raw_html]' . $matches[1] . '[/vc_raw_html]';
1402
  }
1403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1404
  /**
1405
  * Replace base64 values callback (BeTheme Responsive and Optimize Press)
1406
  *
78
  */
79
  protected $new_replace_values = array();
80
 
81
+ /**
82
+ * Old raw replace values
83
+ *
84
+ * @var array
85
+ */
86
+ protected $old_replace_raw_values = array();
87
+
88
+ /**
89
+ * New raw replace values
90
+ *
91
+ * @var array
92
+ */
93
+ protected $new_replace_raw_values = array();
94
+
95
  /**
96
  * Table where clauses
97
  *
134
  */
135
  protected $visual_composer = false;
136
 
137
+ /**
138
+ * Oxygen Builder
139
+ *
140
+ * @var boolean
141
+ */
142
+ protected $oxygen_builder = false;
143
+
144
  /**
145
  * BeTheme Responsive
146
  *
498
  return $this->visual_composer;
499
  }
500
 
501
+ /**
502
+ * Set Oxygen Builder
503
+ *
504
+ * @param boolean $active Is Oxygen Builder Active?
505
+ * @return object
506
+ */
507
+ public function set_oxygen_builder( $active ) {
508
+ $this->oxygen_builder = $active;
509
+
510
+ return $this;
511
+ }
512
+
513
+ /**
514
+ * Get Oxygen Builder
515
+ *
516
+ * @return boolean
517
+ */
518
+ public function get_oxygen_builder() {
519
+ return $this->oxygen_builder;
520
+ }
521
+
522
  /**
523
  * Set BeTheme Responsive
524
  *
1404
  $input = preg_replace_callback( '/\[vc_raw_html\]([a-zA-Z0-9\/+]+={0,2})\[\/vc_raw_html\]/S', array( $this, 'replace_visual_composer_values_callback' ), $input );
1405
  }
1406
 
1407
+ // Replace base64 encoded values (Oxygen Builder)
1408
+ if ( $this->get_oxygen_builder() ) {
1409
+ $input = preg_replace_callback( '/\\\\"(code-php|code-css|code-js)\\\\":\\\\"([a-zA-Z0-9\/+]+={0,2})\\\\"/S', array( $this, 'replace_oxygen_builder_values_callback' ), $input );
1410
+ }
1411
+
1412
  // Replace base64 encoded values (BeTheme Responsive and Optimize Press)
1413
  if ( $this->get_betheme_responsive() || $this->get_optimize_press() ) {
1414
  $input = preg_replace_callback( "/'([a-zA-Z0-9\/+]+={0,2})'/S", array( $this, 'replace_base64_values_callback' ), $input );
1448
  return '[vc_raw_html]' . $matches[1] . '[/vc_raw_html]';
1449
  }
1450
 
1451
+ /**
1452
+ * Replace base64 values callback (Oxygen Builder)
1453
+ *
1454
+ * @param array $matches List of matches
1455
+ * @return string
1456
+ */
1457
+ protected function replace_oxygen_builder_values_callback( $matches ) {
1458
+ // Validate base64 data
1459
+ if ( Ai1wm_Database_Utility::base64_validate( $matches[2] ) ) {
1460
+
1461
+ // Decode base64 characters
1462
+ $matches[2] = Ai1wm_Database_Utility::base64_decode( $matches[2] );
1463
+
1464
+ // Replace values
1465
+ $matches[2] = Ai1wm_Database_Utility::replace_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $matches[2] );
1466
+
1467
+ // Encode base64 characters
1468
+ $matches[2] = Ai1wm_Database_Utility::base64_encode( $matches[2] );
1469
+ }
1470
+
1471
+ return '\"' . $matches[1] . '\":\"' . $matches[2] . '\"';
1472
+ }
1473
+
1474
  /**
1475
  * Replace base64 values callback (BeTheme Responsive and Optimize Press)
1476
  *
lib/view/import/done.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (C) 2014-2020 ServMask Inc.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
+ */
25
+
26
+ if ( ! defined( 'ABSPATH' ) ) {
27
+ die( 'Kangaroos cannot jump here' );
28
+ }
29
+
30
+ printf(
31
+ __(
32
+ '» <a class="ai1wm-no-underline" href="%s" target="_blank">Save permalinks structure</a>. (opens a new window)<br />' .
33
+ '» <a class="ai1wm-no-underline" href="https://wordpress.org/support/view/plugin-reviews/all-in-one-wp-migration?rate=5#postform" target="_blank">Optionally, review the plugin</a>. (opens a new window)',
34
+ AI1WM_PLUGIN_NAME
35
+ ),
36
+ admin_url( 'options-permalink.php#submit' )
37
+ );
lib/view/import/oxygen.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (C) 2014-2020 ServMask Inc.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
+ */
25
+
26
+ if ( ! defined( 'ABSPATH' ) ) {
27
+ die( 'Kangaroos cannot jump here' );
28
+ }
29
+
30
+ printf(
31
+ __(
32
+ '» <a class="ai1wm-no-underline" href="%s" target="_blank">Save permalinks structure</a>. (opens a new window)<br />' .
33
+ '» <a class="ai1wm-no-underline" href="https://oxygenbuilder.com/documentation/other/importing-exporting/#resigning" target="_blank">Re-sign Oxygen Builder shortcodes</a>. (opens a new window)<br />' .
34
+ '» <a class="ai1wm-no-underline" href="https://wordpress.org/support/view/plugin-reviews/all-in-one-wp-migration?rate=5#postform" target="_blank">Optionally, review the plugin</a>. (opens a new window)',
35
+ AI1WM_PLUGIN_NAME
36
+ ),
37
+ admin_url( 'options-permalink.php#submit' )
38
+ );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordp
4
  Requires at least: 3.3
5
  Tested up to: 5.4
6
  Requires PHP: 5.2.17
7
- Stable tag: 7.20
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -108,6 +108,11 @@ Alternatively you can download the plugin using the download button on this page
108
  All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
109
 
110
  == Changelog ==
 
 
 
 
 
111
  = 7.20 =
112
  **Fixed**
113
 
4
  Requires at least: 3.3
5
  Tested up to: 5.4
6
  Requires PHP: 5.2.17
7
+ Stable tag: 7.21
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
108
  All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
109
 
110
  == Changelog ==
111
+ = 7.21 =
112
+ **Added**
113
+
114
+ * Better compatibility to Oxygen Builder. Thanks Rookie for reporting it
115
+
116
  = 7.20 =
117
  **Fixed**
118