Version Description
Added
- Support for Swift Optimizer
- Better support for URL replacement
Download this release
Release Info
| Developer | bangelov |
| Plugin | |
| Version | 7.29 |
| Comparing to | |
| See all releases | |
Code changes from version 7.28 to 7.29
- all-in-one-wp-migration.php +1 -1
- constants.php +44 -2
- functions.php +29 -0
- lib/model/class-ai1wm-extensions.php +14 -1
- lib/model/export/class-ai1wm-export-config.php +4 -4
- lib/model/import/class-ai1wm-import-database.php +167 -69
- lib/model/import/class-ai1wm-import-done.php +87 -0
- lib/model/import/class-ai1wm-import-plugins.php +1 -1
- lib/vendor/servmask/database/class-ai1wm-database-utility.php +3 -1
- lib/vendor/servmask/database/class-ai1wm-database.php +13 -0
- readme.txt +7 -1
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.
|
| 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.29
|
| 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.
|
| 39 |
|
| 40 |
// ===============
|
| 41 |
// = Plugin Name =
|
|
@@ -287,6 +287,11 @@ define( 'AI1WM_ACTIVE_SITEWIDE_PLUGINS', 'active_sitewide_plugins' );
|
|
| 287 |
// ==========================
|
| 288 |
define( 'AI1WM_JETPACK_ACTIVE_MODULES', 'jetpack_active_modules' );
|
| 289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
// ======================
|
| 291 |
// = MS Files Rewriting =
|
| 292 |
// ======================
|
|
@@ -1025,12 +1030,49 @@ if ( ! defined( 'AI1WMPE_PLUGIN_KEY' ) ) {
|
|
| 1025 |
}
|
| 1026 |
|
| 1027 |
// ==========================
|
| 1028 |
-
// = pCloud Extension
|
| 1029 |
// ==========================
|
| 1030 |
if ( ! defined( 'AI1WMPE_PLUGIN_SHORT' ) ) {
|
| 1031 |
define( 'AI1WMPE_PLUGIN_SHORT', 'pcloud' );
|
| 1032 |
}
|
| 1033 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1034 |
// ================================
|
| 1035 |
// = S3 Client Extension Base Dir =
|
| 1036 |
// ================================
|
| 35 |
// ==================
|
| 36 |
// = Plugin Version =
|
| 37 |
// ==================
|
| 38 |
+
define( 'AI1WM_VERSION', '7.29' );
|
| 39 |
|
| 40 |
// ===============
|
| 41 |
// = Plugin Name =
|
| 287 |
// ==========================
|
| 288 |
define( 'AI1WM_JETPACK_ACTIVE_MODULES', 'jetpack_active_modules' );
|
| 289 |
|
| 290 |
+
// ====================================
|
| 291 |
+
// = Swift Optimizer Plugin Organizer =
|
| 292 |
+
// ====================================
|
| 293 |
+
define( 'AI1WM_SWIFT_OPTIMIZER_PLUGIN_ORGANIZER', 'swift_performance_plugin_organizer' );
|
| 294 |
+
|
| 295 |
// ======================
|
| 296 |
// = MS Files Rewriting =
|
| 297 |
// ======================
|
| 1030 |
}
|
| 1031 |
|
| 1032 |
// ==========================
|
| 1033 |
+
// = pCloud Extension Short =
|
| 1034 |
// ==========================
|
| 1035 |
if ( ! defined( 'AI1WMPE_PLUGIN_SHORT' ) ) {
|
| 1036 |
define( 'AI1WMPE_PLUGIN_SHORT', 'pcloud' );
|
| 1037 |
}
|
| 1038 |
|
| 1039 |
+
// =======================
|
| 1040 |
+
// = Pro Plugin Base Dir =
|
| 1041 |
+
// =======================
|
| 1042 |
+
if ( defined( 'AI1WMKE_PLUGIN_BASENAME' ) ) {
|
| 1043 |
+
define( 'AI1WMKE_PLUGIN_BASEDIR', dirname( AI1WMKE_PLUGIN_BASENAME ) );
|
| 1044 |
+
} else {
|
| 1045 |
+
define( 'AI1WMKE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-pro' );
|
| 1046 |
+
}
|
| 1047 |
+
|
| 1048 |
+
// ====================
|
| 1049 |
+
// = Pro Plugin Title =
|
| 1050 |
+
// ====================
|
| 1051 |
+
if ( ! defined( 'AI1WMKE_PLUGIN_TITLE' ) ) {
|
| 1052 |
+
define( 'AI1WMKE_PLUGIN_TITLE', 'Pro Plugin' );
|
| 1053 |
+
}
|
| 1054 |
+
|
| 1055 |
+
// ====================
|
| 1056 |
+
// = Pro Plugin About =
|
| 1057 |
+
// ====================
|
| 1058 |
+
if ( ! defined( 'AI1WMKE_PLUGIN_ABOUT' ) ) {
|
| 1059 |
+
define( 'AI1WMKE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/pro-plugin.json' );
|
| 1060 |
+
}
|
| 1061 |
+
|
| 1062 |
+
// ==================
|
| 1063 |
+
// = Pro Plugin Key =
|
| 1064 |
+
// ==================
|
| 1065 |
+
if ( ! defined( 'AI1WMKE_PLUGIN_KEY' ) ) {
|
| 1066 |
+
define( 'AI1WMKE_PLUGIN_KEY', 'ai1wmke_plugin_key' );
|
| 1067 |
+
}
|
| 1068 |
+
|
| 1069 |
+
// ====================
|
| 1070 |
+
// = Pro Plugin Short =
|
| 1071 |
+
// ====================
|
| 1072 |
+
if ( ! defined( 'AI1WMKE_PLUGIN_SHORT' ) ) {
|
| 1073 |
+
define( 'AI1WMKE_PLUGIN_SHORT', 'pro' );
|
| 1074 |
+
}
|
| 1075 |
+
|
| 1076 |
// ================================
|
| 1077 |
// = S3 Client Extension Base Dir =
|
| 1078 |
// ================================
|
functions.php
CHANGED
|
@@ -881,6 +881,13 @@ function ai1wm_plugin_filters( $filters = array() ) {
|
|
| 881 |
$filters[] = 'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-pcloud-extension';
|
| 882 |
}
|
| 883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 884 |
// S3 Client Extension
|
| 885 |
if ( defined( 'AI1WNE_PLUGIN_BASENAME' ) ) {
|
| 886 |
$filters[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( AI1WMNE_PLUGIN_BASENAME );
|
|
@@ -1010,6 +1017,11 @@ function ai1wm_active_servmask_plugins( $plugins = array() ) {
|
|
| 1010 |
$plugins[] = AI1WMPE_PLUGIN_BASENAME;
|
| 1011 |
}
|
| 1012 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1013 |
// S3 Client Extension
|
| 1014 |
if ( defined( 'AI1WMNE_PLUGIN_BASENAME' ) ) {
|
| 1015 |
$plugins[] = AI1WMNE_PLUGIN_BASENAME;
|
|
@@ -1190,6 +1202,23 @@ function ai1wm_deactivate_jetpack_modules( $modules ) {
|
|
| 1190 |
return update_option( AI1WM_JETPACK_ACTIVE_MODULES, $current );
|
| 1191 |
}
|
| 1192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1193 |
/**
|
| 1194 |
* Deactivate sitewide Revolution Slider
|
| 1195 |
*
|
| 881 |
$filters[] = 'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-pcloud-extension';
|
| 882 |
}
|
| 883 |
|
| 884 |
+
// Pro Plugin
|
| 885 |
+
if ( defined( 'AI1WMKE_PLUGIN_BASENAME' ) ) {
|
| 886 |
+
$filters[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( AI1WMKE_PLUGIN_BASENAME );
|
| 887 |
+
} else {
|
| 888 |
+
$filters[] = 'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-pro';
|
| 889 |
+
}
|
| 890 |
+
|
| 891 |
// S3 Client Extension
|
| 892 |
if ( defined( 'AI1WNE_PLUGIN_BASENAME' ) ) {
|
| 893 |
$filters[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( AI1WMNE_PLUGIN_BASENAME );
|
| 1017 |
$plugins[] = AI1WMPE_PLUGIN_BASENAME;
|
| 1018 |
}
|
| 1019 |
|
| 1020 |
+
// Pro Plugin
|
| 1021 |
+
if ( defined( 'AI1WMKE_PLUGIN_BASENAME' ) ) {
|
| 1022 |
+
$plugins[] = AI1WMKE_PLUGIN_BASENAME;
|
| 1023 |
+
}
|
| 1024 |
+
|
| 1025 |
// S3 Client Extension
|
| 1026 |
if ( defined( 'AI1WMNE_PLUGIN_BASENAME' ) ) {
|
| 1027 |
$plugins[] = AI1WMNE_PLUGIN_BASENAME;
|
| 1202 |
return update_option( AI1WM_JETPACK_ACTIVE_MODULES, $current );
|
| 1203 |
}
|
| 1204 |
|
| 1205 |
+
/**
|
| 1206 |
+
* Deactivate Swift Optimizer rules
|
| 1207 |
+
*
|
| 1208 |
+
* @param array $rules List of rules
|
| 1209 |
+
* @return boolean
|
| 1210 |
+
*/
|
| 1211 |
+
function ai1wm_deactivate_swift_optimizer_rules( $rules ) {
|
| 1212 |
+
$current = get_option( AI1WM_SWIFT_OPTIMIZER_PLUGIN_ORGANIZER, array() );
|
| 1213 |
+
|
| 1214 |
+
// Remove rules
|
| 1215 |
+
foreach ( $rules as $rule ) {
|
| 1216 |
+
unset( $current['rules'][ $rule ] );
|
| 1217 |
+
}
|
| 1218 |
+
|
| 1219 |
+
return update_option( AI1WM_SWIFT_OPTIMIZER_PLUGIN_ORGANIZER, $current );
|
| 1220 |
+
}
|
| 1221 |
+
|
| 1222 |
/**
|
| 1223 |
* Deactivate sitewide Revolution Slider
|
| 1224 |
*
|
lib/model/class-ai1wm-extensions.php
CHANGED
|
@@ -214,7 +214,7 @@ class Ai1wm_Extensions {
|
|
| 214 |
'about' => AI1WMME_PLUGIN_ABOUT,
|
| 215 |
'basename' => AI1WMME_PLUGIN_BASENAME,
|
| 216 |
'version' => AI1WMME_VERSION,
|
| 217 |
-
'requires' => '3.
|
| 218 |
'short' => AI1WMME_PLUGIN_SHORT,
|
| 219 |
);
|
| 220 |
}
|
|
@@ -245,6 +245,19 @@ class Ai1wm_Extensions {
|
|
| 245 |
);
|
| 246 |
}
|
| 247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
// Add S3 Client Extension
|
| 249 |
if ( defined( 'AI1WMNE_PLUGIN_NAME' ) ) {
|
| 250 |
$extensions[ AI1WMNE_PLUGIN_NAME ] = array(
|
| 214 |
'about' => AI1WMME_PLUGIN_ABOUT,
|
| 215 |
'basename' => AI1WMME_PLUGIN_BASENAME,
|
| 216 |
'version' => AI1WMME_VERSION,
|
| 217 |
+
'requires' => '3.98',
|
| 218 |
'short' => AI1WMME_PLUGIN_SHORT,
|
| 219 |
);
|
| 220 |
}
|
| 245 |
);
|
| 246 |
}
|
| 247 |
|
| 248 |
+
// Add Pro Plugin
|
| 249 |
+
if ( defined( 'AI1WMKE_PLUGIN_NAME' ) ) {
|
| 250 |
+
$extensions[ AI1WMKE_PLUGIN_NAME ] = array(
|
| 251 |
+
'key' => AI1WMKE_PLUGIN_KEY,
|
| 252 |
+
'title' => AI1WMKE_PLUGIN_TITLE,
|
| 253 |
+
'about' => AI1WMKE_PLUGIN_ABOUT,
|
| 254 |
+
'basename' => AI1WMKE_PLUGIN_BASENAME,
|
| 255 |
+
'version' => AI1WMKE_VERSION,
|
| 256 |
+
'requires' => '1.0',
|
| 257 |
+
'short' => AI1WMKE_PLUGIN_SHORT,
|
| 258 |
+
);
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
// Add S3 Client Extension
|
| 262 |
if ( defined( 'AI1WMNE_PLUGIN_NAME' ) ) {
|
| 263 |
$extensions[ AI1WMNE_PLUGIN_NAME ] = array(
|
lib/model/export/class-ai1wm-export-config.php
CHANGED
|
@@ -54,13 +54,13 @@ class Ai1wm_Export_Config {
|
|
| 54 |
$config['HomeURL'] = home_url();
|
| 55 |
|
| 56 |
// Set internal site URL
|
| 57 |
-
if ( isset( $options['siteurl'] )
|
| 58 |
-
$config['InternalSiteURL'] =
|
| 59 |
}
|
| 60 |
|
| 61 |
// Set internal home URL
|
| 62 |
-
if ( isset( $options['home'] )
|
| 63 |
-
$config['InternalHomeURL'] =
|
| 64 |
}
|
| 65 |
|
| 66 |
// Set replace old and new values
|
| 54 |
$config['HomeURL'] = home_url();
|
| 55 |
|
| 56 |
// Set internal site URL
|
| 57 |
+
if ( isset( $options['siteurl'] ) ) {
|
| 58 |
+
$config['InternalSiteURL'] = $options['siteurl'];
|
| 59 |
}
|
| 60 |
|
| 61 |
// Set internal home URL
|
| 62 |
+
if ( isset( $options['home'] ) ) {
|
| 63 |
+
$config['InternalHomeURL'] = $options['home'];
|
| 64 |
}
|
| 65 |
|
| 66 |
// Set replace old and new values
|
lib/model/import/class-ai1wm-import-database.php
CHANGED
|
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 29 |
|
| 30 |
class Ai1wm_Import_Database {
|
| 31 |
|
| 32 |
-
public static function execute( $params ) {
|
| 33 |
global $wpdb;
|
| 34 |
|
| 35 |
// Skip database import
|
|
@@ -275,28 +275,52 @@ class Ai1wm_Import_Database {
|
|
| 275 |
}
|
| 276 |
}
|
| 277 |
|
| 278 |
-
// Add plain Site URL
|
| 279 |
-
if ( ! in_array( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 280 |
-
$old_replace_values[] = ai1wm_url_scheme( $url, $old_schemes[ $i ] );
|
| 281 |
-
$new_replace_values[] = ai1wm_url_scheme( $blog['New']['SiteURL'], $new_schemes[ $i ] );
|
| 282 |
}
|
| 283 |
|
| 284 |
-
// Add URL encoded Site URL
|
| 285 |
-
if ( ! in_array( urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 286 |
-
$old_replace_values[] = urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 287 |
-
$new_replace_values[] = urlencode( ai1wm_url_scheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ) );
|
| 288 |
}
|
| 289 |
|
| 290 |
-
// Add URL raw encoded Site URL
|
| 291 |
-
if ( ! in_array( rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 292 |
-
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 293 |
-
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ) );
|
| 294 |
}
|
| 295 |
|
| 296 |
-
// Add JSON escaped Site URL
|
| 297 |
-
if ( ! in_array( addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 298 |
-
$old_replace_values[] = addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' );
|
| 299 |
-
$new_replace_values[] = addcslashes( ai1wm_url_scheme( $blog['New']['SiteURL'], $new_schemes[ $i ] ), '/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
}
|
| 301 |
}
|
| 302 |
|
|
@@ -401,28 +425,52 @@ class Ai1wm_Import_Database {
|
|
| 401 |
}
|
| 402 |
}
|
| 403 |
|
| 404 |
-
// Add plain Home URL
|
| 405 |
-
if ( ! in_array( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 406 |
-
$old_replace_values[] = ai1wm_url_scheme( $url, $old_schemes[ $i ] );
|
| 407 |
-
$new_replace_values[] = ai1wm_url_scheme( $blog['New']['HomeURL'], $new_schemes[ $i ] );
|
| 408 |
}
|
| 409 |
|
| 410 |
-
// Add URL encoded Home URL
|
| 411 |
-
if ( ! in_array( urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 412 |
-
$old_replace_values[] = urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 413 |
-
$new_replace_values[] = urlencode( ai1wm_url_scheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ) );
|
| 414 |
}
|
| 415 |
|
| 416 |
-
// Add URL raw encoded Home URL
|
| 417 |
-
if ( ! in_array( rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 418 |
-
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 419 |
-
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ) );
|
| 420 |
}
|
| 421 |
|
| 422 |
-
// Add JSON escaped Home URL
|
| 423 |
-
if ( ! in_array( addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 424 |
-
$old_replace_values[] = addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' );
|
| 425 |
-
$new_replace_values[] = addcslashes( ai1wm_url_scheme( $blog['New']['HomeURL'], $new_schemes[ $i ] ), '/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 426 |
}
|
| 427 |
}
|
| 428 |
|
|
@@ -597,28 +645,52 @@ class Ai1wm_Import_Database {
|
|
| 597 |
// Replace Site URL scheme
|
| 598 |
for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
|
| 599 |
|
| 600 |
-
// Add plain Site URL
|
| 601 |
-
if ( ! in_array( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 602 |
-
$old_replace_values[] = ai1wm_url_scheme( $url, $old_schemes[ $i ] );
|
| 603 |
-
$new_replace_values[] = ai1wm_url_scheme( site_url(), $new_schemes[ $i ] );
|
| 604 |
}
|
| 605 |
|
| 606 |
-
// Add URL encoded Site URL
|
| 607 |
-
if ( ! in_array( urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 608 |
-
$old_replace_values[] = urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 609 |
-
$new_replace_values[] = urlencode( ai1wm_url_scheme( site_url(), $new_schemes[ $i ] ) );
|
| 610 |
}
|
| 611 |
|
| 612 |
-
// Add URL raw encoded Site URL
|
| 613 |
-
if ( ! in_array( rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 614 |
-
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 615 |
-
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( site_url(), $new_schemes[ $i ] ) );
|
| 616 |
}
|
| 617 |
|
| 618 |
-
// Add JSON escaped Site URL
|
| 619 |
-
if ( ! in_array( addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 620 |
-
$old_replace_values[] = addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' );
|
| 621 |
-
$new_replace_values[] = addcslashes( ai1wm_url_scheme( site_url(), $new_schemes[ $i ] ), '/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 622 |
}
|
| 623 |
}
|
| 624 |
|
|
@@ -695,28 +767,52 @@ class Ai1wm_Import_Database {
|
|
| 695 |
// Replace Home URL scheme
|
| 696 |
for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
|
| 697 |
|
| 698 |
-
// Add plain Home URL
|
| 699 |
-
if ( ! in_array( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 700 |
-
$old_replace_values[] = ai1wm_url_scheme( $url, $old_schemes[ $i ] );
|
| 701 |
-
$new_replace_values[] = ai1wm_url_scheme( home_url(), $new_schemes[ $i ] );
|
| 702 |
}
|
| 703 |
|
| 704 |
-
// Add URL encoded Home URL
|
| 705 |
-
if ( ! in_array( urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 706 |
-
$old_replace_values[] = urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 707 |
-
$new_replace_values[] = urlencode( ai1wm_url_scheme( home_url(), $new_schemes[ $i ] ) );
|
| 708 |
}
|
| 709 |
|
| 710 |
-
// Add URL raw encoded Home URL
|
| 711 |
-
if ( ! in_array( rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 712 |
-
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) );
|
| 713 |
-
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( home_url(), $new_schemes[ $i ] ) );
|
| 714 |
}
|
| 715 |
|
| 716 |
-
// Add JSON escaped Home URL
|
| 717 |
-
if ( ! in_array( addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 718 |
-
$old_replace_values[] = addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' );
|
| 719 |
-
$new_replace_values[] = addcslashes( ai1wm_url_scheme( home_url(), $new_schemes[ $i ] ), '/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 720 |
}
|
| 721 |
}
|
| 722 |
|
|
@@ -928,10 +1024,12 @@ class Ai1wm_Import_Database {
|
|
| 928 |
$new_table_prefixes[] = ai1wm_table_prefix();
|
| 929 |
|
| 930 |
// Get database client
|
| 931 |
-
if (
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
|
|
|
|
|
|
|
| 935 |
}
|
| 936 |
|
| 937 |
// Set database options
|
| 29 |
|
| 30 |
class Ai1wm_Import_Database {
|
| 31 |
|
| 32 |
+
public static function execute( $params, Ai1wm_Database $mysql = null ) {
|
| 33 |
global $wpdb;
|
| 34 |
|
| 35 |
// Skip database import
|
| 275 |
}
|
| 276 |
}
|
| 277 |
|
| 278 |
+
// Add plain Site URL (with trailing slash)
|
| 279 |
+
if ( ! in_array( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 280 |
+
$old_replace_values[] = ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] );
|
| 281 |
+
$new_replace_values[] = ai1wm_url_scheme( trailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] );
|
| 282 |
}
|
| 283 |
|
| 284 |
+
// Add URL encoded Site URL (with trailing slash)
|
| 285 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 286 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 287 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ) );
|
| 288 |
}
|
| 289 |
|
| 290 |
+
// Add URL raw encoded Site URL (with trailing slash)
|
| 291 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 292 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 293 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ) );
|
| 294 |
}
|
| 295 |
|
| 296 |
+
// Add JSON escaped Site URL (with trailing slash)
|
| 297 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 298 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 299 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ), '/' );
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
// Add plain Site URL (no trailing slash)
|
| 303 |
+
if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 304 |
+
$old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] );
|
| 305 |
+
$new_replace_values[] = ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] );
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
// Add URL encoded Site URL (no trailing slash)
|
| 309 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 310 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 311 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ) );
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
// Add URL raw encoded Site URL (no trailing slash)
|
| 315 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 316 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 317 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ) );
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
// Add JSON escaped Site URL (no trailing slash)
|
| 321 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 322 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 323 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ), '/' );
|
| 324 |
}
|
| 325 |
}
|
| 326 |
|
| 425 |
}
|
| 426 |
}
|
| 427 |
|
| 428 |
+
// Add plain Home URL (with trailing slash)
|
| 429 |
+
if ( ! in_array( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 430 |
+
$old_replace_values[] = ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] );
|
| 431 |
+
$new_replace_values[] = ai1wm_url_scheme( trailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] );
|
| 432 |
}
|
| 433 |
|
| 434 |
+
// Add URL encoded Home URL (with trailing slash)
|
| 435 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 436 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 437 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ) );
|
| 438 |
}
|
| 439 |
|
| 440 |
+
// Add URL raw encoded Home URL (with trailing slash)
|
| 441 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 442 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 443 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ) );
|
| 444 |
}
|
| 445 |
|
| 446 |
+
// Add JSON escaped Home URL (with trailing slash)
|
| 447 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 448 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 449 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ), '/' );
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
// Add plain Home URL (no trailing slash)
|
| 453 |
+
if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 454 |
+
$old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] );
|
| 455 |
+
$new_replace_values[] = ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] );
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
// Add URL encoded Home URL (no trailing slash)
|
| 459 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 460 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 461 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ) );
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
// Add URL raw encoded Home URL (no trailing slash)
|
| 465 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 466 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 467 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ) );
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
// Add JSON escaped Home URL (no trailing slash)
|
| 471 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 472 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 473 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ), '/' );
|
| 474 |
}
|
| 475 |
}
|
| 476 |
|
| 645 |
// Replace Site URL scheme
|
| 646 |
for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
|
| 647 |
|
| 648 |
+
// Add plain Site URL (with trailing slash)
|
| 649 |
+
if ( ! in_array( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 650 |
+
$old_replace_values[] = ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] );
|
| 651 |
+
$new_replace_values[] = ai1wm_url_scheme( trailingslashit( site_url() ), $new_schemes[ $i ] );
|
| 652 |
}
|
| 653 |
|
| 654 |
+
// Add URL encoded Site URL (with trailing slash)
|
| 655 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 656 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 657 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( site_url() ), $new_schemes[ $i ] ) );
|
| 658 |
}
|
| 659 |
|
| 660 |
+
// Add URL raw encoded Site URL (with trailing slash)
|
| 661 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 662 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 663 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( site_url() ), $new_schemes[ $i ] ) );
|
| 664 |
}
|
| 665 |
|
| 666 |
+
// Add JSON escaped Site URL (with trailing slash)
|
| 667 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 668 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 669 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( site_url() ), $new_schemes[ $i ] ), '/' );
|
| 670 |
+
}
|
| 671 |
+
|
| 672 |
+
// Add plain Site URL (no trailing slash)
|
| 673 |
+
if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 674 |
+
$old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] );
|
| 675 |
+
$new_replace_values[] = ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] );
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
// Add URL encoded Site URL (no trailing slash)
|
| 679 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 680 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 681 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ) );
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
// Add URL raw encoded Site URL (no trailing slash)
|
| 685 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 686 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 687 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ) );
|
| 688 |
+
}
|
| 689 |
+
|
| 690 |
+
// Add JSON escaped Site URL (no trailing slash)
|
| 691 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 692 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 693 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ), '/' );
|
| 694 |
}
|
| 695 |
}
|
| 696 |
|
| 767 |
// Replace Home URL scheme
|
| 768 |
for ( $i = 0; $i < count( $old_schemes ); $i++ ) {
|
| 769 |
|
| 770 |
+
// Add plain Home URL (with trailing slash)
|
| 771 |
+
if ( ! in_array( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 772 |
+
$old_replace_values[] = ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] );
|
| 773 |
+
$new_replace_values[] = ai1wm_url_scheme( trailingslashit( home_url() ), $new_schemes[ $i ] );
|
| 774 |
}
|
| 775 |
|
| 776 |
+
// Add URL encoded Home URL (with trailing slash)
|
| 777 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 778 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 779 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( trailingslashit( home_url() ), $new_schemes[ $i ] ) );
|
| 780 |
}
|
| 781 |
|
| 782 |
+
// Add URL raw encoded Home URL (with trailing slash)
|
| 783 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 784 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 785 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( trailingslashit( home_url() ), $new_schemes[ $i ] ) );
|
| 786 |
}
|
| 787 |
|
| 788 |
+
// Add JSON escaped Home URL (with trailing slash)
|
| 789 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 790 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 791 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( trailingslashit( home_url() ), $new_schemes[ $i ] ), '/' );
|
| 792 |
+
}
|
| 793 |
+
|
| 794 |
+
// Add plain Home URL (no trailing slash)
|
| 795 |
+
if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) {
|
| 796 |
+
$old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] );
|
| 797 |
+
$new_replace_values[] = ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] );
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
// Add URL encoded Home URL (no trailing slash)
|
| 801 |
+
if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 802 |
+
$old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 803 |
+
$new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ) );
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
// Add URL raw encoded Home URL (no trailing slash)
|
| 807 |
+
if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) {
|
| 808 |
+
$old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) );
|
| 809 |
+
$new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ) );
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
// Add JSON escaped Home URL (no trailing slash)
|
| 813 |
+
if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) {
|
| 814 |
+
$old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' );
|
| 815 |
+
$new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ), '/' );
|
| 816 |
}
|
| 817 |
}
|
| 818 |
|
| 1024 |
$new_table_prefixes[] = ai1wm_table_prefix();
|
| 1025 |
|
| 1026 |
// Get database client
|
| 1027 |
+
if ( is_null( $mysql ) ) {
|
| 1028 |
+
if ( empty( $wpdb->use_mysqli ) ) {
|
| 1029 |
+
$mysql = new Ai1wm_Database_Mysql( $wpdb );
|
| 1030 |
+
} else {
|
| 1031 |
+
$mysql = new Ai1wm_Database_Mysqli( $wpdb );
|
| 1032 |
+
}
|
| 1033 |
}
|
| 1034 |
|
| 1035 |
// Set database options
|
lib/model/import/class-ai1wm-import-done.php
CHANGED
|
@@ -81,6 +81,35 @@ class Ai1wm_Import_Done {
|
|
| 81 |
)
|
| 82 |
);
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
// Deactivate Revolution Slider
|
| 85 |
ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) );
|
| 86 |
|
|
@@ -154,6 +183,35 @@ class Ai1wm_Import_Done {
|
|
| 154 |
)
|
| 155 |
);
|
| 156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
// Deactivate Revolution Slider
|
| 158 |
ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) );
|
| 159 |
|
|
@@ -230,6 +288,35 @@ class Ai1wm_Import_Done {
|
|
| 230 |
)
|
| 231 |
);
|
| 232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
// Deactivate Revolution Slider
|
| 234 |
ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) );
|
| 235 |
|
| 81 |
)
|
| 82 |
);
|
| 83 |
|
| 84 |
+
// Deactivate Swift Optimizer rules
|
| 85 |
+
ai1wm_deactivate_swift_optimizer_rules(
|
| 86 |
+
array(
|
| 87 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration/all-in-one-wp-migration.php' ),
|
| 88 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-azure-storage-extension/all-in-one-wp-migration-azure-storage-extension.php' ),
|
| 89 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-b2-extension/all-in-one-wp-migration-b2-extension.php' ),
|
| 90 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-backup/all-in-one-wp-migration-backup.php' ),
|
| 91 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-box-extension/all-in-one-wp-migration-box-extension.php' ),
|
| 92 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-digitalocean-extension/all-in-one-wp-migration-digitalocean-extension.php' ),
|
| 93 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-direct-extension/all-in-one-wp-migration-direct-extension.php' ),
|
| 94 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-dropbox-extension/all-in-one-wp-migration-dropbox-extension.php' ),
|
| 95 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-file-extension/all-in-one-wp-migration-file-extension.php' ),
|
| 96 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-ftp-extension/all-in-one-wp-migration-ftp-extension.php' ),
|
| 97 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gcloud-storage-extension/all-in-one-wp-migration-gcloud-storage-extension.php' ),
|
| 98 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gdrive-extension/all-in-one-wp-migration-gdrive-extension.php' ),
|
| 99 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-glacier-extension/all-in-one-wp-migration-glacier-extension.php' ),
|
| 100 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-mega-extension/all-in-one-wp-migration-mega-extension.php' ),
|
| 101 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-multisite-extension/all-in-one-wp-migration-multisite-extension.php' ),
|
| 102 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-onedrive-extension/all-in-one-wp-migration-onedrive-extension.php' ),
|
| 103 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pcloud-extension/all-in-one-wp-migration-pcloud-extension.php' ),
|
| 104 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pro/all-in-one-wp-migration-pro.php' ),
|
| 105 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-client-extension/all-in-one-wp-migration-s3-client-extension.php' ),
|
| 106 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-extension/all-in-one-wp-migration-s3-extension.php' ),
|
| 107 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php' ),
|
| 108 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-url-extension/all-in-one-wp-migration-url-extension.php' ),
|
| 109 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-webdav-extension/all-in-one-wp-migration-webdav-extension.php' ),
|
| 110 |
+
)
|
| 111 |
+
);
|
| 112 |
+
|
| 113 |
// Deactivate Revolution Slider
|
| 114 |
ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) );
|
| 115 |
|
| 183 |
)
|
| 184 |
);
|
| 185 |
|
| 186 |
+
// Deactivate Swift Optimizer rules
|
| 187 |
+
ai1wm_deactivate_swift_optimizer_rules(
|
| 188 |
+
array(
|
| 189 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration/all-in-one-wp-migration.php' ),
|
| 190 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-azure-storage-extension/all-in-one-wp-migration-azure-storage-extension.php' ),
|
| 191 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-b2-extension/all-in-one-wp-migration-b2-extension.php' ),
|
| 192 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-backup/all-in-one-wp-migration-backup.php' ),
|
| 193 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-box-extension/all-in-one-wp-migration-box-extension.php' ),
|
| 194 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-digitalocean-extension/all-in-one-wp-migration-digitalocean-extension.php' ),
|
| 195 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-direct-extension/all-in-one-wp-migration-direct-extension.php' ),
|
| 196 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-dropbox-extension/all-in-one-wp-migration-dropbox-extension.php' ),
|
| 197 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-file-extension/all-in-one-wp-migration-file-extension.php' ),
|
| 198 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-ftp-extension/all-in-one-wp-migration-ftp-extension.php' ),
|
| 199 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gcloud-storage-extension/all-in-one-wp-migration-gcloud-storage-extension.php' ),
|
| 200 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gdrive-extension/all-in-one-wp-migration-gdrive-extension.php' ),
|
| 201 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-glacier-extension/all-in-one-wp-migration-glacier-extension.php' ),
|
| 202 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-mega-extension/all-in-one-wp-migration-mega-extension.php' ),
|
| 203 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-multisite-extension/all-in-one-wp-migration-multisite-extension.php' ),
|
| 204 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-onedrive-extension/all-in-one-wp-migration-onedrive-extension.php' ),
|
| 205 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pcloud-extension/all-in-one-wp-migration-pcloud-extension.php' ),
|
| 206 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pro/all-in-one-wp-migration-pro.php' ),
|
| 207 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-client-extension/all-in-one-wp-migration-s3-client-extension.php' ),
|
| 208 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-extension/all-in-one-wp-migration-s3-extension.php' ),
|
| 209 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php' ),
|
| 210 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-url-extension/all-in-one-wp-migration-url-extension.php' ),
|
| 211 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-webdav-extension/all-in-one-wp-migration-webdav-extension.php' ),
|
| 212 |
+
)
|
| 213 |
+
);
|
| 214 |
+
|
| 215 |
// Deactivate Revolution Slider
|
| 216 |
ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) );
|
| 217 |
|
| 288 |
)
|
| 289 |
);
|
| 290 |
|
| 291 |
+
// Deactivate Swift Optimizer rules
|
| 292 |
+
ai1wm_deactivate_swift_optimizer_rules(
|
| 293 |
+
array(
|
| 294 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration/all-in-one-wp-migration.php' ),
|
| 295 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-azure-storage-extension/all-in-one-wp-migration-azure-storage-extension.php' ),
|
| 296 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-b2-extension/all-in-one-wp-migration-b2-extension.php' ),
|
| 297 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-backup/all-in-one-wp-migration-backup.php' ),
|
| 298 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-box-extension/all-in-one-wp-migration-box-extension.php' ),
|
| 299 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-digitalocean-extension/all-in-one-wp-migration-digitalocean-extension.php' ),
|
| 300 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-direct-extension/all-in-one-wp-migration-direct-extension.php' ),
|
| 301 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-dropbox-extension/all-in-one-wp-migration-dropbox-extension.php' ),
|
| 302 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-file-extension/all-in-one-wp-migration-file-extension.php' ),
|
| 303 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-ftp-extension/all-in-one-wp-migration-ftp-extension.php' ),
|
| 304 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gcloud-storage-extension/all-in-one-wp-migration-gcloud-storage-extension.php' ),
|
| 305 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gdrive-extension/all-in-one-wp-migration-gdrive-extension.php' ),
|
| 306 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-glacier-extension/all-in-one-wp-migration-glacier-extension.php' ),
|
| 307 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-mega-extension/all-in-one-wp-migration-mega-extension.php' ),
|
| 308 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-multisite-extension/all-in-one-wp-migration-multisite-extension.php' ),
|
| 309 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-onedrive-extension/all-in-one-wp-migration-onedrive-extension.php' ),
|
| 310 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pcloud-extension/all-in-one-wp-migration-pcloud-extension.php' ),
|
| 311 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pro/all-in-one-wp-migration-pro.php' ),
|
| 312 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-client-extension/all-in-one-wp-migration-s3-client-extension.php' ),
|
| 313 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-extension/all-in-one-wp-migration-s3-extension.php' ),
|
| 314 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php' ),
|
| 315 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-url-extension/all-in-one-wp-migration-url-extension.php' ),
|
| 316 |
+
ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-webdav-extension/all-in-one-wp-migration-webdav-extension.php' ),
|
| 317 |
+
)
|
| 318 |
+
);
|
| 319 |
+
|
| 320 |
// Deactivate Revolution Slider
|
| 321 |
ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) );
|
| 322 |
|
lib/model/import/class-ai1wm-import-plugins.php
CHANGED
|
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 29 |
|
| 30 |
class Ai1wm_Import_Plugins {
|
| 31 |
|
| 32 |
-
public static function execute( $params, $mysql = null ) {
|
| 33 |
global $wpdb;
|
| 34 |
|
| 35 |
// Set progress
|
| 29 |
|
| 30 |
class Ai1wm_Import_Plugins {
|
| 31 |
|
| 32 |
+
public static function execute( $params, Ai1wm_Database $mysql = null ) {
|
| 33 |
global $wpdb;
|
| 34 |
|
| 35 |
// Set progress
|
lib/vendor/servmask/database/class-ai1wm-database-utility.php
CHANGED
|
@@ -76,7 +76,9 @@ class Ai1wm_Database_Utility {
|
|
| 76 |
$tmp = $data;
|
| 77 |
$props = get_object_vars( $data );
|
| 78 |
foreach ( $props as $key => $value ) {
|
| 79 |
-
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
$data = $tmp;
|
| 76 |
$tmp = $data;
|
| 77 |
$props = get_object_vars( $data );
|
| 78 |
foreach ( $props as $key => $value ) {
|
| 79 |
+
if ( ! empty( $tmp->$key ) ) {
|
| 80 |
+
$tmp->$key = self::replace_serialized_values( $from, $to, $value, false );
|
| 81 |
+
}
|
| 82 |
}
|
| 83 |
|
| 84 |
$data = $tmp;
|
lib/vendor/servmask/database/class-ai1wm-database.php
CHANGED
|
@@ -781,6 +781,9 @@ abstract class Ai1wm_Database {
|
|
| 781 |
// Replace create table name
|
| 782 |
$create_table = $this->replace_table_name( $create_table, $table_name, $new_table_name );
|
| 783 |
|
|
|
|
|
|
|
|
|
|
| 784 |
// Replace create table constraints
|
| 785 |
$create_table = $this->replace_table_constraints( $create_table );
|
| 786 |
|
|
@@ -1552,6 +1555,16 @@ abstract class Ai1wm_Database {
|
|
| 1552 |
return Ai1wm_Database_Utility::replace_values( $this->get_old_replace_raw_values(), $this->get_new_replace_raw_values(), $input );
|
| 1553 |
}
|
| 1554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1555 |
/**
|
| 1556 |
* Replace table constraints
|
| 1557 |
*
|
| 781 |
// Replace create table name
|
| 782 |
$create_table = $this->replace_table_name( $create_table, $table_name, $new_table_name );
|
| 783 |
|
| 784 |
+
// Replace create table comments
|
| 785 |
+
$create_table = $this->replace_table_comments( $create_table );
|
| 786 |
+
|
| 787 |
// Replace create table constraints
|
| 788 |
$create_table = $this->replace_table_constraints( $create_table );
|
| 789 |
|
| 1555 |
return Ai1wm_Database_Utility::replace_values( $this->get_old_replace_raw_values(), $this->get_new_replace_raw_values(), $input );
|
| 1556 |
}
|
| 1557 |
|
| 1558 |
+
/**
|
| 1559 |
+
* Replace table comments
|
| 1560 |
+
*
|
| 1561 |
+
* @param string $input SQL statement
|
| 1562 |
+
* @return string
|
| 1563 |
+
*/
|
| 1564 |
+
protected function replace_table_comments( $input ) {
|
| 1565 |
+
return preg_replace( '/\/\*(.+?)\*\//s', '', $input );
|
| 1566 |
+
}
|
| 1567 |
+
|
| 1568 |
/**
|
| 1569 |
* Replace table constraints
|
| 1570 |
*
|
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.5
|
| 6 |
Requires PHP: 5.2.17
|
| 7 |
-
Stable tag: 7.
|
| 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,12 @@ 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.28 =
|
| 112 |
**Added**
|
| 113 |
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 5.5
|
| 6 |
Requires PHP: 5.2.17
|
| 7 |
+
Stable tag: 7.29
|
| 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.29 =
|
| 112 |
+
**Added**
|
| 113 |
+
|
| 114 |
+
* Support for Swift Optimizer
|
| 115 |
+
* Better support for URL replacement
|
| 116 |
+
|
| 117 |
= 7.28 =
|
| 118 |
**Added**
|
| 119 |
|
