All-in-One WP Migration - Version 6.48

Version Description

Fixed

  • Escape Find/Replace values on import
  • Unable to load CSS and JS when event hook contains capital letters
Download this release

Release Info

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

Code changes from version 6.47 to 6.48

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: 6.47
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: 6.48
9
  * Text Domain: all-in-one-wp-migration
10
  * Domain Path: /languages
11
  * Network: True
constants.php CHANGED
@@ -31,7 +31,7 @@ define( 'AI1WM_DEBUG', false );
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
- define( 'AI1WM_VERSION', '6.47' );
35
 
36
  // ===============
37
  // = Plugin Name =
31
  // ==================
32
  // = Plugin Version =
33
  // ==================
34
+ define( 'AI1WM_VERSION', '6.48' );
35
 
36
  // ===============
37
  // = Plugin Name =
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -359,7 +359,7 @@ class Ai1wm_Main_Controller {
359
  * @return void
360
  */
361
  public function register_export_scripts_and_styles( $hook ) {
362
- if ( 'toplevel_page_site-migration-export' !== $hook ) {
363
  return;
364
  }
365
 
@@ -407,7 +407,7 @@ class Ai1wm_Main_Controller {
407
  * @return void
408
  */
409
  public function register_import_scripts_and_styles( $hook ) {
410
- if ( 'all-in-one-wp-migration_page_site-migration-import' !== $hook ) {
411
  return;
412
  }
413
 
@@ -490,7 +490,7 @@ class Ai1wm_Main_Controller {
490
  * @return void
491
  */
492
  public function register_backups_scripts_and_styles( $hook ) {
493
- if ( 'all-in-one-wp-migration_page_site-migration-backups' !== $hook ) {
494
  return;
495
  }
496
 
@@ -543,7 +543,7 @@ class Ai1wm_Main_Controller {
543
  * @return void
544
  */
545
  public function register_updater_scripts_and_styles( $hook ) {
546
- if ( 'plugins.php' !== $hook ) {
547
  return;
548
  }
549
 
359
  * @return void
360
  */
361
  public function register_export_scripts_and_styles( $hook ) {
362
+ if ( 'toplevel_page_site-migration-export' !== strtolower( $hook ) ) {
363
  return;
364
  }
365
 
407
  * @return void
408
  */
409
  public function register_import_scripts_and_styles( $hook ) {
410
+ if ( 'all-in-one-wp-migration_page_site-migration-import' !== strtolower( $hook ) ) {
411
  return;
412
  }
413
 
490
  * @return void
491
  */
492
  public function register_backups_scripts_and_styles( $hook ) {
493
+ if ( 'all-in-one-wp-migration_page_site-migration-backups' !== strtolower( $hook ) ) {
494
  return;
495
  }
496
 
543
  * @return void
544
  */
545
  public function register_updater_scripts_and_styles( $hook ) {
546
+ if ( 'plugins.php' !== strtolower( $hook ) ) {
547
  return;
548
  }
549
 
lib/model/import/class-ai1wm-import-database.php CHANGED
@@ -112,41 +112,41 @@ class Ai1wm_Import_Database {
112
  // Handle old and new sites dir style
113
  if ( defined( 'UPLOADBLOGSDIR' ) ) {
114
 
115
- // Get Upload Path
116
  if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_values ) ) {
117
  $old_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
118
  $new_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
119
  }
120
 
121
- // Get forward slash escaped Upload Path
 
 
 
 
 
 
122
  if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
123
  $old_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
124
  $new_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
125
  }
126
 
127
- // Get backward slash escaped Upload Path
128
- if ( ! in_array( addslashes( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) ), $old_values ) ) {
129
- $old_values[] = addslashes( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) );
130
- $new_values[] = addslashes( addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' ) );
131
- }
132
-
133
- // Get Upload Path
134
  if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_values ) ) {
135
  $old_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
136
  $new_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
137
  }
138
 
139
- // Get forward slash escaped Upload Path
 
 
 
 
 
 
140
  if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
141
  $old_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
142
  $new_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
143
  }
144
-
145
- // Get backward slash escaped Upload Path
146
- if ( ! in_array( addslashes( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) ), $old_values ) ) {
147
- $old_values[] = addslashes( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) );
148
- $new_values[] = addslashes( addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' ) );
149
- }
150
  } else {
151
 
152
  // Get files dir Upload URL
@@ -155,41 +155,41 @@ class Ai1wm_Import_Database {
155
  $new_values[] = ai1wm_uploads_url( $blog['New']['BlogID'] );
156
  }
157
 
158
- // Get Upload Path
159
  if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_values ) ) {
160
  $old_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
161
  $new_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
162
  }
163
 
164
- // Get forward slash escaped Upload Path
 
 
 
 
 
 
165
  if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
166
  $old_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
167
  $new_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
168
  }
169
 
170
- // Get backward slash escaped Upload Path
171
- if ( ! in_array( addslashes( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) ), $old_values ) ) {
172
- $old_values[] = addslashes( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ) );
173
- $new_values[] = addslashes( addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' ) );
174
- }
175
-
176
- // Get Upload Path
177
  if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_values ) ) {
178
  $old_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
179
  $new_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
180
  }
181
 
182
- // Get forward slash escaped Upload Path
 
 
 
 
 
 
183
  if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
184
  $old_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
185
  $new_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
186
  }
187
-
188
- // Get backward slash escaped Upload Path
189
- if ( ! in_array( addslashes( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) ), $old_values ) ) {
190
- $old_values[] = addslashes( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ) );
191
- $new_values[] = addslashes( addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' ) );
192
- }
193
  }
194
  }
195
 
@@ -237,23 +237,17 @@ class Ai1wm_Import_Database {
237
  $new_values[] = set_url_scheme( $blog['New']['SiteURL'], $new_scheme );
238
  }
239
 
240
- // Add encoded Site URL
241
  if ( ! in_array( urlencode( set_url_scheme( $site_url, $old_scheme ) ), $old_values ) ) {
242
  $old_values[] = urlencode( set_url_scheme( $site_url, $old_scheme ) );
243
  $new_values[] = urlencode( set_url_scheme( $blog['New']['SiteURL'], $new_scheme ) );
244
  }
245
 
246
- // Add forward slash escaped Site URL
247
  if ( ! in_array( addcslashes( set_url_scheme( $site_url, $old_scheme ), '/' ), $old_values ) ) {
248
  $old_values[] = addcslashes( set_url_scheme( $site_url, $old_scheme ), '/' );
249
  $new_values[] = addcslashes( set_url_scheme( $blog['New']['SiteURL'], $new_scheme ), '/' );
250
  }
251
-
252
- // Add backward slash escaped Site URL
253
- if ( ! in_array( addslashes( addcslashes( set_url_scheme( $site_url, $old_scheme ), '/' ) ), $old_values ) ) {
254
- $old_values[] = addslashes( addcslashes( set_url_scheme( $site_url, $old_scheme ), '/' ) );
255
- $new_values[] = addslashes( addcslashes( set_url_scheme( $blog['New']['SiteURL'], $new_scheme ), '/' ) );
256
- }
257
  }
258
 
259
  // Add email
@@ -310,23 +304,17 @@ class Ai1wm_Import_Database {
310
  $new_values[] = set_url_scheme( $blog['New']['HomeURL'], $new_scheme );
311
  }
312
 
313
- // Add encoded Home URL
314
  if ( ! in_array( urlencode( set_url_scheme( $home_url, $old_scheme ) ), $old_values ) ) {
315
  $old_values[] = urlencode( set_url_scheme( $home_url, $old_scheme ) );
316
  $new_values[] = urlencode( set_url_scheme( $blog['New']['HomeURL'], $new_scheme ) );
317
  }
318
 
319
- // Add forward slash escaped Home URL
320
  if ( ! in_array( addcslashes( set_url_scheme( $home_url, $old_scheme ), '/' ), $old_values ) ) {
321
  $old_values[] = addcslashes( set_url_scheme( $home_url, $old_scheme ), '/' );
322
  $new_values[] = addcslashes( set_url_scheme( $blog['New']['HomeURL'], $new_scheme ), '/' );
323
  }
324
-
325
- // Add backward slash escaped Home URL
326
- if ( ! in_array( addslashes( addcslashes( set_url_scheme( $home_url, $old_scheme ), '/' ) ), $old_values ) ) {
327
- $old_values[] = addslashes( addcslashes( set_url_scheme( $home_url, $old_scheme ), '/' ) );
328
- $new_values[] = addslashes( addcslashes( set_url_scheme( $blog['New']['HomeURL'], $new_scheme ), '/' ) );
329
- }
330
  }
331
 
332
  // Add email
@@ -394,30 +382,17 @@ class Ai1wm_Import_Database {
394
  $new_values[] = set_url_scheme( site_url(), $new_scheme );
395
  }
396
 
397
- // Add encoded Site URL
398
  if ( ! in_array( urlencode( set_url_scheme( $url, $old_scheme ) ), $old_values ) ) {
399
  $old_values[] = urlencode( set_url_scheme( $url, $old_scheme ) );
400
  $new_values[] = urlencode( set_url_scheme( site_url(), $new_scheme ) );
401
  }
402
 
403
- // Add forward slash escaped Site URL
404
- // This is needed for `json_encode('http://example.org')`
405
- // When escaped, URLs can look like this: http:\/\/example.org
406
- // We need to add this escaped URL so the logic in Ai1wm_Database::replace_table_values works
407
  if ( ! in_array( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ), $old_values ) ) {
408
  $old_values[] = addcslashes( set_url_scheme( $url, $old_scheme ), '/' );
409
  $new_values[] = addcslashes( set_url_scheme( site_url(), $new_scheme ), '/' );
410
  }
411
-
412
- // Add backward slash escaped Site URL
413
- // This is needed for `Ai1wm_Database_Utility::escape_mysql(json_encode('http://example.org'))`
414
- // When escaped, URLs can look like this: http:\\/\\/example.org
415
- // We need to add this escaped URL so the logic in Ai1wm_Database::replace_table_values works
416
- // We have a strpos in there that looks if the value in the database matches the searched value
417
- if ( ! in_array( addslashes( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ) ), $old_values ) ) {
418
- $old_values[] = addslashes( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ) );
419
- $new_values[] = addslashes( addcslashes( set_url_scheme( site_url(), $new_scheme ), '/' ) );
420
- }
421
  }
422
 
423
  // Add email
@@ -485,30 +460,17 @@ class Ai1wm_Import_Database {
485
  $new_values[] = set_url_scheme( home_url(), $new_scheme );
486
  }
487
 
488
- // Add encoded Home URL
489
  if ( ! in_array( urlencode( set_url_scheme( $url, $old_scheme ) ), $old_values ) ) {
490
  $old_values[] = urlencode( set_url_scheme( $url, $old_scheme ) );
491
  $new_values[] = urlencode( set_url_scheme( home_url(), $new_scheme ) );
492
  }
493
 
494
- // Add forward slash escaped Home URL
495
- // This is needed for `json_encode('http://example.org')`
496
- // When escaped, URLs can look like this: http:\/\/example.org
497
- // We need to add this escaped URL so the logic in Ai1wm_Database::replace_table_values works
498
  if ( ! in_array( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ), $old_values ) ) {
499
  $old_values[] = addcslashes( set_url_scheme( $url, $old_scheme ), '/' );
500
  $new_values[] = addcslashes( set_url_scheme( home_url(), $new_scheme ), '/' );
501
  }
502
-
503
- // Add backward slash escaped Home URL
504
- // This is needed for `Ai1wm_Database_Utility::escape_mysql(json_encode('http://example.org'))`
505
- // When escaped, URLs can look like this: http:\\/\\/example.org
506
- // We need to add this escaped URL so the logic in Ai1wm_Database::replace_table_values works
507
- // We have a strpos in there that looks if the value in the database matches the searched value
508
- if ( ! in_array( addslashes( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ) ), $old_values ) ) {
509
- $old_values[] = addslashes( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ) );
510
- $new_values[] = addslashes( addcslashes( set_url_scheme( home_url(), $new_scheme ), '/' ) );
511
- }
512
  }
513
 
514
  // Add email
@@ -534,23 +496,17 @@ class Ai1wm_Import_Database {
534
  $new_values[] = WP_CONTENT_DIR;
535
  }
536
 
537
- // Add encoded WordPress Content
538
  if ( ! in_array( urlencode( $content_dir ), $old_values ) ) {
539
  $old_values[] = urlencode( $content_dir );
540
  $new_values[] = urlencode( WP_CONTENT_DIR );
541
  }
542
 
543
- // Add forward slash escaped WordPress Content
544
  if ( ! in_array( addcslashes( $content_dir, '/' ), $old_values ) ) {
545
  $old_values[] = addcslashes( $content_dir, '/' );
546
  $new_values[] = addcslashes( WP_CONTENT_DIR, '/' );
547
  }
548
-
549
- // Add backward slash escaped WordPress Content
550
- if ( ! in_array( addslashes( addcslashes( $content_dir, '/' ) ), $old_values ) ) {
551
- $old_values[] = addslashes( addcslashes( $content_dir, '/' ) );
552
- $new_values[] = addslashes( addcslashes( WP_CONTENT_DIR, '/' ) );
553
- }
554
  }
555
  }
556
 
@@ -558,10 +514,24 @@ class Ai1wm_Import_Database {
558
  if ( isset( $config['Replace'] ) && ( $replace = $config['Replace'] ) ) {
559
  for ( $i = 0; $i < count( $replace['OldValues'] ); $i++ ) {
560
  if ( ! empty( $replace['OldValues'][ $i ] ) && ! empty( $replace['NewValues'][ $i ] ) ) {
 
 
561
  if ( ! in_array( $replace['OldValues'][ $i ], $old_values ) ) {
562
  $old_values[] = $replace['OldValues'][ $i ];
563
  $new_values[] = $replace['NewValues'][ $i ];
564
  }
 
 
 
 
 
 
 
 
 
 
 
 
565
  }
566
  }
567
  }
112
  // Handle old and new sites dir style
113
  if ( defined( 'UPLOADBLOGSDIR' ) ) {
114
 
115
+ // Get plain Upload Path
116
  if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_values ) ) {
117
  $old_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
118
  $new_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
119
  }
120
 
121
+ // Get URL encoded Upload Path
122
+ if ( ! in_array( urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
123
+ $old_values[] = urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) );
124
+ $new_values[] = urlencode( ai1wm_blogsdir_path( $blog['New']['BlogID'] ) );
125
+ }
126
+
127
+ // Get JSON escaped Upload Path
128
  if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
129
  $old_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
130
  $new_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
131
  }
132
 
133
+ // Get plain Upload Path
 
 
 
 
 
 
134
  if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_values ) ) {
135
  $old_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
136
  $new_values[] = ai1wm_blogsdir_path( $blog['New']['BlogID'] );
137
  }
138
 
139
+ // Get URL encoded Upload Path
140
+ if ( ! in_array( urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
141
+ $old_values[] = urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) );
142
+ $new_values[] = urlencode( ai1wm_blogsdir_path( $blog['New']['BlogID'] ) );
143
+ }
144
+
145
+ // Get JSON escaped Upload Path
146
  if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
147
  $old_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
148
  $new_values[] = addcslashes( ai1wm_blogsdir_path( $blog['New']['BlogID'] ), '/' );
149
  }
 
 
 
 
 
 
150
  } else {
151
 
152
  // Get files dir Upload URL
155
  $new_values[] = ai1wm_uploads_url( $blog['New']['BlogID'] );
156
  }
157
 
158
+ // Get plain Upload Path
159
  if ( ! in_array( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), $old_values ) ) {
160
  $old_values[] = ai1wm_blogsdir_path( $blog['Old']['BlogID'] );
161
  $new_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
162
  }
163
 
164
+ // Get URL encoded Upload Path
165
+ if ( ! in_array( urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
166
+ $old_values[] = urlencode( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ) );
167
+ $new_values[] = urlencode( ai1wm_uploads_path( $blog['New']['BlogID'] ) );
168
+ }
169
+
170
+ // Get JSON escaped Upload Path
171
  if ( ! in_array( addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
172
  $old_values[] = addcslashes( ai1wm_blogsdir_path( $blog['Old']['BlogID'] ), '/' );
173
  $new_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
174
  }
175
 
176
+ // Get plain Upload Path
 
 
 
 
 
 
177
  if ( ! in_array( ai1wm_uploads_path( $blog['Old']['BlogID'] ), $old_values ) ) {
178
  $old_values[] = ai1wm_uploads_path( $blog['Old']['BlogID'] );
179
  $new_values[] = ai1wm_uploads_path( $blog['New']['BlogID'] );
180
  }
181
 
182
+ // Get URL encoded Upload Path
183
+ if ( ! in_array( urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) ), $old_values ) ) {
184
+ $old_values[] = urlencode( ai1wm_uploads_path( $blog['Old']['BlogID'] ) );
185
+ $new_values[] = urlencode( ai1wm_uploads_path( $blog['New']['BlogID'] ) );
186
+ }
187
+
188
+ // Get JSON escaped Upload Path
189
  if ( ! in_array( addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' ), $old_values ) ) {
190
  $old_values[] = addcslashes( ai1wm_uploads_path( $blog['Old']['BlogID'] ), '/' );
191
  $new_values[] = addcslashes( ai1wm_uploads_path( $blog['New']['BlogID'] ), '/' );
192
  }
 
 
 
 
 
 
193
  }
194
  }
195
 
237
  $new_values[] = set_url_scheme( $blog['New']['SiteURL'], $new_scheme );
238
  }
239
 
240
+ // Add URL encoded Site URL
241
  if ( ! in_array( urlencode( set_url_scheme( $site_url, $old_scheme ) ), $old_values ) ) {
242
  $old_values[] = urlencode( set_url_scheme( $site_url, $old_scheme ) );
243
  $new_values[] = urlencode( set_url_scheme( $blog['New']['SiteURL'], $new_scheme ) );
244
  }
245
 
246
+ // Add JSON escaped Site URL
247
  if ( ! in_array( addcslashes( set_url_scheme( $site_url, $old_scheme ), '/' ), $old_values ) ) {
248
  $old_values[] = addcslashes( set_url_scheme( $site_url, $old_scheme ), '/' );
249
  $new_values[] = addcslashes( set_url_scheme( $blog['New']['SiteURL'], $new_scheme ), '/' );
250
  }
 
 
 
 
 
 
251
  }
252
 
253
  // Add email
304
  $new_values[] = set_url_scheme( $blog['New']['HomeURL'], $new_scheme );
305
  }
306
 
307
+ // Add URL encoded Home URL
308
  if ( ! in_array( urlencode( set_url_scheme( $home_url, $old_scheme ) ), $old_values ) ) {
309
  $old_values[] = urlencode( set_url_scheme( $home_url, $old_scheme ) );
310
  $new_values[] = urlencode( set_url_scheme( $blog['New']['HomeURL'], $new_scheme ) );
311
  }
312
 
313
+ // Add JSON escaped Home URL
314
  if ( ! in_array( addcslashes( set_url_scheme( $home_url, $old_scheme ), '/' ), $old_values ) ) {
315
  $old_values[] = addcslashes( set_url_scheme( $home_url, $old_scheme ), '/' );
316
  $new_values[] = addcslashes( set_url_scheme( $blog['New']['HomeURL'], $new_scheme ), '/' );
317
  }
 
 
 
 
 
 
318
  }
319
 
320
  // Add email
382
  $new_values[] = set_url_scheme( site_url(), $new_scheme );
383
  }
384
 
385
+ // Add URL encoded Site URL
386
  if ( ! in_array( urlencode( set_url_scheme( $url, $old_scheme ) ), $old_values ) ) {
387
  $old_values[] = urlencode( set_url_scheme( $url, $old_scheme ) );
388
  $new_values[] = urlencode( set_url_scheme( site_url(), $new_scheme ) );
389
  }
390
 
391
+ // Add JSON escaped Site URL
 
 
 
392
  if ( ! in_array( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ), $old_values ) ) {
393
  $old_values[] = addcslashes( set_url_scheme( $url, $old_scheme ), '/' );
394
  $new_values[] = addcslashes( set_url_scheme( site_url(), $new_scheme ), '/' );
395
  }
 
 
 
 
 
 
 
 
 
 
396
  }
397
 
398
  // Add email
460
  $new_values[] = set_url_scheme( home_url(), $new_scheme );
461
  }
462
 
463
+ // Add URL encoded Home URL
464
  if ( ! in_array( urlencode( set_url_scheme( $url, $old_scheme ) ), $old_values ) ) {
465
  $old_values[] = urlencode( set_url_scheme( $url, $old_scheme ) );
466
  $new_values[] = urlencode( set_url_scheme( home_url(), $new_scheme ) );
467
  }
468
 
469
+ // Add JSON escaped Home URL
 
 
 
470
  if ( ! in_array( addcslashes( set_url_scheme( $url, $old_scheme ), '/' ), $old_values ) ) {
471
  $old_values[] = addcslashes( set_url_scheme( $url, $old_scheme ), '/' );
472
  $new_values[] = addcslashes( set_url_scheme( home_url(), $new_scheme ), '/' );
473
  }
 
 
 
 
 
 
 
 
 
 
474
  }
475
 
476
  // Add email
496
  $new_values[] = WP_CONTENT_DIR;
497
  }
498
 
499
+ // Add URL encoded WordPress Content
500
  if ( ! in_array( urlencode( $content_dir ), $old_values ) ) {
501
  $old_values[] = urlencode( $content_dir );
502
  $new_values[] = urlencode( WP_CONTENT_DIR );
503
  }
504
 
505
+ // Add JSON escaped WordPress Content
506
  if ( ! in_array( addcslashes( $content_dir, '/' ), $old_values ) ) {
507
  $old_values[] = addcslashes( $content_dir, '/' );
508
  $new_values[] = addcslashes( WP_CONTENT_DIR, '/' );
509
  }
 
 
 
 
 
 
510
  }
511
  }
512
 
514
  if ( isset( $config['Replace'] ) && ( $replace = $config['Replace'] ) ) {
515
  for ( $i = 0; $i < count( $replace['OldValues'] ); $i++ ) {
516
  if ( ! empty( $replace['OldValues'][ $i ] ) && ! empty( $replace['NewValues'][ $i ] ) ) {
517
+
518
+ // Add plain replace values
519
  if ( ! in_array( $replace['OldValues'][ $i ], $old_values ) ) {
520
  $old_values[] = $replace['OldValues'][ $i ];
521
  $new_values[] = $replace['NewValues'][ $i ];
522
  }
523
+
524
+ // Add URL encoded replace values
525
+ if ( ! in_array( urlencode( $replace['OldValues'][ $i ] ), $old_values ) ) {
526
+ $old_values[] = urlencode( $replace['OldValues'][ $i ] );
527
+ $new_values[] = urlencode( $replace['NewValues'][ $i ] );
528
+ }
529
+
530
+ // Add JSON Escaped replace values
531
+ if ( ! in_array( addcslashes( $replace['OldValues'][ $i ], '/' ), $old_values ) ) {
532
+ $old_values[] = addcslashes( $replace['OldValues'][ $i ], '/' );
533
+ $new_values[] = addcslashes( $replace['NewValues'][ $i ], '/' );
534
+ }
535
  }
536
  }
537
  }
lib/vendor/servmask/database/class-ai1wm-database.php CHANGED
@@ -807,7 +807,7 @@ abstract class Ai1wm_Database {
807
 
808
  // Replace serialized values
809
  foreach ( $this->get_old_replace_values() as $old_value ) {
810
- if ( strpos( $input, $old_value ) !== false ) {
811
  $input = preg_replace_callback( "/'(.*?)(?<!\\\\)'/S", array( $this, 'replace_table_values_callback' ), $input );
812
  break;
813
  }
807
 
808
  // Replace serialized values
809
  foreach ( $this->get_old_replace_values() as $old_value ) {
810
+ if ( strpos( $input, $this->escape( $old_value ) ) !== false ) {
811
  $input = preg_replace_callback( "/'(.*?)(?<!\\\\)'/S", array( $this, 'replace_table_values_callback' ), $input );
812
  break;
813
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: yani.iliev, bangelov, pimjitsawang
3
  Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, migration, wordpress migration, website migration, database export, database import
4
  Requires at least: 3.3
5
- Tested up to: 4.7
6
- Stable tag: 6.47
7
  License: GPLv2 or later
8
 
9
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -78,6 +78,12 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
78
  3. Plugin Menu
79
 
80
  == Changelog ==
 
 
 
 
 
 
81
  = 6.47 =
82
  **Added**
83
 
2
  Contributors: yani.iliev, bangelov, pimjitsawang
3
  Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, migration, wordpress migration, website migration, database export, database import
4
  Requires at least: 3.3
5
+ Tested up to: 4.8
6
+ Stable tag: 6.48
7
  License: GPLv2 or later
8
 
9
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
78
  3. Plugin Menu
79
 
80
  == Changelog ==
81
+ = 6.48 =
82
+ **Fixed**
83
+
84
+ * Escape Find/Replace values on import
85
+ * Unable to load CSS and JS when event hook contains capital letters
86
+
87
  = 6.47 =
88
  **Added**
89