All-in-One WP Migration - Version 7.49

Version Description

Added

  • Better error handling when making HTTP requests
  • Store a list of site files as CSV
  • Filter to change the request method
Download this release

Release Info

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

Code changes from version 7.48 to 7.49

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.48
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.49
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.48' );
39
 
40
  // ===============
41
  // = Plugin Name =
@@ -172,6 +172,31 @@ define( 'AI1WM_THEMES_LIST_NAME', 'themes.list' );
172
  // ============================
173
  define( 'AI1WM_TABLES_LIST_NAME', 'tables.list' );
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  // =============================
176
  // = Archive Cookies Text Name =
177
  // =============================
35
  // ==================
36
  // = Plugin Version =
37
  // ==================
38
+ define( 'AI1WM_VERSION', '7.49' );
39
 
40
  // ===============
41
  // = Plugin Name =
172
  // ============================
173
  define( 'AI1WM_TABLES_LIST_NAME', 'tables.list' );
174
 
175
+ // =================================
176
+ // = Incremental Content List Name =
177
+ // =================================
178
+ define( 'AI1WM_INCREMENTAL_CONTENT_LIST_NAME', 'incremental.content.list' );
179
+
180
+ // ===============================
181
+ // = Incremental Media List Name =
182
+ // ===============================
183
+ define( 'AI1WM_INCREMENTAL_MEDIA_LIST_NAME', 'incremental.media.list' );
184
+
185
+ // =================================
186
+ // = Incremental Plugins List Name =
187
+ // =================================
188
+ define( 'AI1WM_INCREMENTAL_PLUGINS_LIST_NAME', 'incremental.plugins.list' );
189
+
190
+ // ================================
191
+ // = Incremental Themes List Name =
192
+ // ================================
193
+ define( 'AI1WM_INCREMENTAL_THEMES_LIST_NAME', 'incremental.themes.list' );
194
+
195
+ // =================================
196
+ // = Incremental Backups List Name =
197
+ // =================================
198
+ define( 'AI1WM_INCREMENTAL_BACKUPS_LIST_NAME', 'incremental.backups.list' );
199
+
200
  // =============================
201
  // = Archive Cookies Text Name =
202
  // =============================
functions.php CHANGED
@@ -150,6 +150,56 @@ function ai1wm_tables_list_path( $params ) {
150
  return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_TABLES_LIST_NAME;
151
  }
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  /**
154
  * Get package.json absolute path
155
  *
@@ -249,6 +299,16 @@ function ai1wm_archive_bytes( $params ) {
249
  return filesize( ai1wm_archive_path( $params ) );
250
  }
251
 
 
 
 
 
 
 
 
 
 
 
252
  /**
253
  * Get backup size in bytes
254
  *
@@ -1361,14 +1421,18 @@ function ai1wm_write( $handle, $content ) {
1361
  * @throws Ai1wm_Not_Readable_Exception
1362
  */
1363
  function ai1wm_read( $handle, $length ) {
1364
- $read_result = @fread( $handle, $length );
1365
- if ( false === $read_result ) {
1366
- if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1367
- throw new Ai1wm_Not_Readable_Exception( sprintf( __( 'Unable to read file: %s. <a href="https://help.servmask.com/knowledgebase/invalid-file-permissions/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
 
 
1368
  }
 
 
1369
  }
1370
 
1371
- return $read_result;
1372
  }
1373
 
1374
  /**
150
  return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_TABLES_LIST_NAME;
151
  }
152
 
153
+ /**
154
+ * Get incremental.content.list absolute path
155
+ *
156
+ * @param array $params Request parameters
157
+ * @return string
158
+ */
159
+ function ai1wm_incremental_content_list_path( $params ) {
160
+ return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_CONTENT_LIST_NAME;
161
+ }
162
+
163
+ /**
164
+ * Get incremental.media.list absolute path
165
+ *
166
+ * @param array $params Request parameters
167
+ * @return string
168
+ */
169
+ function ai1wm_incremental_media_list_path( $params ) {
170
+ return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_MEDIA_LIST_NAME;
171
+ }
172
+
173
+ /**
174
+ * Get incremental.plugins.list absolute path
175
+ *
176
+ * @param array $params Request parameters
177
+ * @return string
178
+ */
179
+ function ai1wm_incremental_plugins_list_path( $params ) {
180
+ return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_PLUGINS_LIST_NAME;
181
+ }
182
+
183
+ /**
184
+ * Get incremental.themes.list absolute path
185
+ *
186
+ * @param array $params Request parameters
187
+ * @return string
188
+ */
189
+ function ai1wm_incremental_themes_list_path( $params ) {
190
+ return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_THEMES_LIST_NAME;
191
+ }
192
+
193
+ /**
194
+ * Get incremental.backups.list absolute path
195
+ *
196
+ * @param array $params Request parameters
197
+ * @return string
198
+ */
199
+ function ai1wm_incremental_backups_list_path( $params ) {
200
+ return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_BACKUPS_LIST_NAME;
201
+ }
202
+
203
  /**
204
  * Get package.json absolute path
205
  *
299
  return filesize( ai1wm_archive_path( $params ) );
300
  }
301
 
302
+ /**
303
+ * Get archive modified time in seconds
304
+ *
305
+ * @param array $params Request parameters
306
+ * @return integer
307
+ */
308
+ function ai1wm_archive_mtime( $params ) {
309
+ return filemtime( ai1wm_archive_path( $params ) );
310
+ }
311
+
312
  /**
313
  * Get backup size in bytes
314
  *
1421
  * @throws Ai1wm_Not_Readable_Exception
1422
  */
1423
  function ai1wm_read( $handle, $length ) {
1424
+ if ( $length > 0 ) {
1425
+ $read_result = @fread( $handle, $length );
1426
+ if ( false === $read_result ) {
1427
+ if ( ( $meta = stream_get_meta_data( $handle ) ) ) {
1428
+ throw new Ai1wm_Not_Readable_Exception( sprintf( __( 'Unable to read file: %s. <a href="https://help.servmask.com/knowledgebase/invalid-file-permissions/" target="_blank">Technical details</a>', AI1WM_PLUGIN_NAME ), $meta['uri'] ) );
1429
+ }
1430
  }
1431
+
1432
+ return $read_result;
1433
  }
1434
 
1435
+ return false;
1436
  }
1437
 
1438
  /**
lib/controller/class-ai1wm-export-controller.php CHANGED
@@ -109,9 +109,10 @@ class Ai1wm_Export_Controller {
109
  exit;
110
  }
111
 
112
- wp_remote_post(
113
  apply_filters( 'ai1wm_http_export_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ),
114
  array(
 
115
  'timeout' => apply_filters( 'ai1wm_http_export_timeout', 10 ),
116
  'blocking' => apply_filters( 'ai1wm_http_export_blocking', false ),
117
  'sslverify' => apply_filters( 'ai1wm_http_export_sslverify', false ),
109
  exit;
110
  }
111
 
112
+ wp_remote_request(
113
  apply_filters( 'ai1wm_http_export_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ),
114
  array(
115
+ 'method' => apply_filters( 'ai1wm_http_export_method', 'POST' ),
116
  'timeout' => apply_filters( 'ai1wm_http_export_timeout', 10 ),
117
  'blocking' => apply_filters( 'ai1wm_http_export_blocking', false ),
118
  'sslverify' => apply_filters( 'ai1wm_http_export_sslverify', false ),
lib/controller/class-ai1wm-import-controller.php CHANGED
@@ -117,9 +117,10 @@ class Ai1wm_Import_Controller {
117
  exit;
118
  }
119
 
120
- wp_remote_post(
121
  apply_filters( 'ai1wm_http_import_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ),
122
  array(
 
123
  'timeout' => apply_filters( 'ai1wm_http_import_timeout', 10 ),
124
  'blocking' => apply_filters( 'ai1wm_http_import_blocking', false ),
125
  'sslverify' => apply_filters( 'ai1wm_http_import_sslverify', false ),
117
  exit;
118
  }
119
 
120
+ wp_remote_request(
121
  apply_filters( 'ai1wm_http_import_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ),
122
  array(
123
+ 'method' => apply_filters( 'ai1wm_http_import_method', 'POST' ),
124
  'timeout' => apply_filters( 'ai1wm_http_import_timeout', 10 ),
125
  'blocking' => apply_filters( 'ai1wm_http_import_blocking', false ),
126
  'sslverify' => apply_filters( 'ai1wm_http_import_sslverify', false ),
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -151,8 +151,8 @@ class Ai1wm_Main_Controller {
151
  public function ai1wm_commands() {
152
  // Add export commands
153
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Init::execute', 5 );
154
- add_filter( 'ai1wm_export', 'Ai1wm_Export_Compatibility::execute', 5 );
155
- add_filter( 'ai1wm_export', 'Ai1wm_Export_Archive::execute', 10 );
156
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config::execute', 50 );
157
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config_File::execute', 60 );
158
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Content::execute', 100 );
151
  public function ai1wm_commands() {
152
  // Add export commands
153
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Init::execute', 5 );
154
+ add_filter( 'ai1wm_export', 'Ai1wm_Export_Compatibility::execute', 10 );
155
+ add_filter( 'ai1wm_export', 'Ai1wm_Export_Archive::execute', 30 );
156
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config::execute', 50 );
157
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Config_File::execute', 60 );
158
  add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Content::execute', 100 );
lib/controller/class-ai1wm-updater-controller.php CHANGED
@@ -62,16 +62,16 @@ class Ai1wm_Updater_Controller {
62
  return Ai1wm_Updater::check_for_updates();
63
  }
64
 
65
- public static function plugin_row_meta( $links, $file ) {
66
- return Ai1wm_Updater::plugin_row_meta( $links, $file );
67
  }
68
 
69
  public static function in_plugin_update_message( $plugin_data, $response ) {
70
  $updater = get_option( AI1WM_UPDATER, array() );
71
 
72
  // Get updater details
73
- if ( isset( $updater[ $plugin_data['slug'] ] ) ) {
74
- Ai1wm_Template::render( 'updater/message', array( 'updater' => $updater[ $plugin_data['slug'] ] ) );
75
  }
76
  }
77
 
62
  return Ai1wm_Updater::check_for_updates();
63
  }
64
 
65
+ public static function plugin_row_meta( $plugin_meta, $plugin_file ) {
66
+ return Ai1wm_Updater::plugin_row_meta( $plugin_meta, $plugin_file );
67
  }
68
 
69
  public static function in_plugin_update_message( $plugin_data, $response ) {
70
  $updater = get_option( AI1WM_UPDATER, array() );
71
 
72
  // Get updater details
73
+ if ( isset( $updater[ $plugin_data['slug'] ]['update_message'] ) ) {
74
+ Ai1wm_Template::render( 'updater/update', array( 'message' => $updater[ $plugin_data['slug'] ]['update_message'] ) );
75
  }
76
  }
77
 
lib/model/class-ai1wm-compatibility.php CHANGED
@@ -38,9 +38,6 @@ class Ai1wm_Compatibility {
38
  }
39
  }
40
 
41
- // Get updater URL
42
- $updater_url = add_query_arg( array( 'ai1wm_check_for_updates' => 1, 'ai1wm_nonce' => wp_create_nonce( 'ai1wm_check_for_updates' ) ), network_admin_url( 'plugins.php' ) );
43
-
44
  // If no extension is used, update everything that is available
45
  if ( empty( $extensions ) ) {
46
  $extensions = Ai1wm_Extensions::get();
@@ -52,7 +49,7 @@ class Ai1wm_Compatibility {
52
  if ( defined( 'WP_CLI' ) ) {
53
  $messages[] = sprintf( __( '%s is not the latest version. You must update the plugin before you can use it. ', AI1WM_PLUGIN_NAME ), $extension_data['title'] );
54
  } else {
55
- $messages[] = sprintf( __( '<strong>%s</strong> is not the latest version. You must <a href="%s">update the plugin</a> before you can use it. <br />', AI1WM_PLUGIN_NAME ), $extension_data['title'], $updater_url );
56
  }
57
  }
58
  }
38
  }
39
  }
40
 
 
 
 
41
  // If no extension is used, update everything that is available
42
  if ( empty( $extensions ) ) {
43
  $extensions = Ai1wm_Extensions::get();
49
  if ( defined( 'WP_CLI' ) ) {
50
  $messages[] = sprintf( __( '%s is not the latest version. You must update the plugin before you can use it. ', AI1WM_PLUGIN_NAME ), $extension_data['title'] );
51
  } else {
52
+ $messages[] = sprintf( __( '<strong>%s</strong> is not the latest version. You must <a href="%s">update the plugin</a> before you can use it. <br />', AI1WM_PLUGIN_NAME ), $extension_data['title'], network_admin_url( 'plugins.php' ) );
53
  }
54
  }
55
  }
lib/model/class-ai1wm-extensions.php CHANGED
@@ -130,7 +130,7 @@ class Ai1wm_Extensions {
130
  'check' => AI1WMDE_PLUGIN_CHECK,
131
  'basename' => AI1WMDE_PLUGIN_BASENAME,
132
  'version' => AI1WMDE_VERSION,
133
- 'requires' => '3.50',
134
  'short' => AI1WMDE_PLUGIN_SHORT,
135
  );
136
  }
@@ -186,7 +186,7 @@ class Ai1wm_Extensions {
186
  'check' => AI1WMGE_PLUGIN_CHECK,
187
  'basename' => AI1WMGE_PLUGIN_BASENAME,
188
  'version' => AI1WMGE_VERSION,
189
- 'requires' => '2.54',
190
  'short' => AI1WMGE_PLUGIN_SHORT,
191
  );
192
  }
@@ -228,7 +228,7 @@ class Ai1wm_Extensions {
228
  'check' => AI1WMME_PLUGIN_CHECK,
229
  'basename' => AI1WMME_PLUGIN_BASENAME,
230
  'version' => AI1WMME_VERSION,
231
- 'requires' => '4.15',
232
  'short' => AI1WMME_PLUGIN_SHORT,
233
  );
234
  }
130
  'check' => AI1WMDE_PLUGIN_CHECK,
131
  'basename' => AI1WMDE_PLUGIN_BASENAME,
132
  'version' => AI1WMDE_VERSION,
133
+ 'requires' => '3.64',
134
  'short' => AI1WMDE_PLUGIN_SHORT,
135
  );
136
  }
186
  'check' => AI1WMGE_PLUGIN_CHECK,
187
  'basename' => AI1WMGE_PLUGIN_BASENAME,
188
  'version' => AI1WMGE_VERSION,
189
+ 'requires' => '2.68',
190
  'short' => AI1WMGE_PLUGIN_SHORT,
191
  );
192
  }
228
  'check' => AI1WMME_PLUGIN_CHECK,
229
  'basename' => AI1WMME_PLUGIN_BASENAME,
230
  'version' => AI1WMME_VERSION,
231
+ 'requires' => '4.17',
232
  'short' => AI1WMME_PLUGIN_SHORT,
233
  );
234
  }
lib/model/class-ai1wm-updater.php CHANGED
@@ -80,8 +80,8 @@ class Ai1wm_Updater {
80
 
81
  // Get extension updates
82
  foreach ( $updater as $slug => $update ) {
83
- if ( isset( $extensions[ $slug ] ) && ( $extension = $extensions[ $slug ] ) ) {
84
- if ( ( $purchase_id = get_option( $extension['key'] ) ) ) {
85
 
86
  // Get download URL
87
  if ( $slug === 'all-in-one-wp-migration-file-extension' ) {
@@ -95,17 +95,17 @@ class Ai1wm_Updater {
95
  'slug' => $slug,
96
  'new_version' => $update['version'],
97
  'url' => $update['homepage'],
98
- 'plugin' => $extension['basename'],
99
  'package' => $download_url,
100
  'tested' => $wp_version,
101
  'icons' => $update['icons'],
102
  );
103
 
104
- // Enable manual and auto updates
105
- if ( version_compare( $extension['version'], $update['version'], '<' ) ) {
106
- $transient->response[ $extension['basename'] ] = $plugin_details;
107
  } else {
108
- $transient->no_update[ $extension['basename'] ] = $plugin_details;
109
  }
110
  }
111
  }
@@ -133,32 +133,36 @@ class Ai1wm_Updater {
133
  );
134
 
135
  // Add plugin updates
136
- if ( ! is_wp_error( $about ) ) {
 
 
137
  $body = wp_remote_retrieve_body( $about );
138
  if ( ( $data = json_decode( $body, true ) ) ) {
139
- if ( isset( $data['slug'], $data['version'], $data['homepage'], $data['download_link'] ) ) {
140
  $updater[ $slug ] = $data;
141
  }
142
  }
143
- }
144
-
145
- // Add plugin messages
146
- if ( $slug !== 'all-in-one-wp-migration-file-extension' ) {
147
- if ( ( $purchase_id = get_option( $extension['key'] ) ) ) {
148
- $check = wp_remote_get(
149
- add_query_arg( array( 'site_url' => get_site_url(), 'admin_email' => get_option( 'admin_email' ) ), sprintf( '%s/%s', $extension['check'], $purchase_id ) ),
150
- array(
151
- 'timeout' => 15,
152
- 'headers' => array( 'Accept' => 'application/json' ),
153
- )
154
- );
155
 
156
- // Add plugin checks
157
- if ( ! is_wp_error( $check ) ) {
158
- $body = wp_remote_retrieve_body( $check );
159
- if ( ( $data = json_decode( $body, true ) ) ) {
160
- if ( isset( $updater[ $slug ], $data['message'] ) ) {
161
- $updater[ $slug ]['update_message'] = $data['message'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
  }
164
  }
@@ -172,32 +176,39 @@ class Ai1wm_Updater {
172
  /**
173
  * Add "Check for updates" link
174
  *
175
- * @param array $links The array having default links for the plugin.
176
- * @param string $file The name of the plugin file.
177
  * @return array
178
  */
179
- public static function plugin_row_meta( $links, $file ) {
180
  $modal_index = 0;
181
 
 
 
 
182
  // Add link for each extension
183
  foreach ( Ai1wm_Extensions::get() as $slug => $extension ) {
184
  $modal_index++;
185
 
186
  // Get plugin details
187
- if ( $file === $extension['basename'] ) {
188
 
189
  // Get updater URL
190
  $updater_url = add_query_arg( array( 'ai1wm_check_for_updates' => 1, 'ai1wm_nonce' => wp_create_nonce( 'ai1wm_check_for_updates' ) ), network_admin_url( 'plugins.php' ) );
191
 
192
  // Check purchase ID
193
  if ( get_option( $extension['key'] ) ) {
194
- $links[] = Ai1wm_Template::get_content( 'updater/check', array( 'url' => $updater_url ) );
195
  } else {
196
- $links[] = Ai1wm_Template::get_content( 'updater/modal', array( 'url' => $updater_url, 'modal' => $modal_index ) );
 
 
 
 
197
  }
198
  }
199
  }
200
 
201
- return $links;
202
  }
203
  }
80
 
81
  // Get extension updates
82
  foreach ( $updater as $slug => $update ) {
83
+ if ( isset( $extensions[ $slug ], $update['version'], $update['homepage'], $update['download_link'], $update['icons'] ) ) {
84
+ if ( ( $purchase_id = get_option( $extensions[ $slug ]['key'] ) ) ) {
85
 
86
  // Get download URL
87
  if ( $slug === 'all-in-one-wp-migration-file-extension' ) {
95
  'slug' => $slug,
96
  'new_version' => $update['version'],
97
  'url' => $update['homepage'],
98
+ 'plugin' => $extensions[ $slug ]['basename'],
99
  'package' => $download_url,
100
  'tested' => $wp_version,
101
  'icons' => $update['icons'],
102
  );
103
 
104
+ // Enable auto updates
105
+ if ( version_compare( $extensions[ $slug ]['version'], $update['version'], '<' ) ) {
106
+ $transient->response[ $extensions[ $slug ]['basename'] ] = $plugin_details;
107
  } else {
108
+ $transient->no_update[ $extensions[ $slug ]['basename'] ] = $plugin_details;
109
  }
110
  }
111
  }
133
  );
134
 
135
  // Add plugin updates
136
+ if ( is_wp_error( $about ) ) {
137
+ $updater[ $slug ]['error_message'] = $about->get_error_message();
138
+ } else {
139
  $body = wp_remote_retrieve_body( $about );
140
  if ( ( $data = json_decode( $body, true ) ) ) {
141
+ if ( isset( $data['slug'], $data['version'], $data['homepage'], $data['download_link'], $data['icons'] ) ) {
142
  $updater[ $slug ] = $data;
143
  }
144
  }
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
+ // Add plugin messages
147
+ if ( $slug !== 'all-in-one-wp-migration-file-extension' ) {
148
+ if ( ( $purchase_id = get_option( $extension['key'] ) ) ) {
149
+ $check = wp_remote_get(
150
+ add_query_arg( array( 'site_url' => get_site_url(), 'admin_email' => get_option( 'admin_email' ) ), sprintf( '%s/%s', $extension['check'], $purchase_id ) ),
151
+ array(
152
+ 'timeout' => 15,
153
+ 'headers' => array( 'Accept' => 'application/json' ),
154
+ )
155
+ );
156
+
157
+ // Add plugin checks
158
+ if ( is_wp_error( $check ) ) {
159
+ $updater[ $slug ]['error_message'] = $check->get_error_message();
160
+ } else {
161
+ $body = wp_remote_retrieve_body( $check );
162
+ if ( ( $data = json_decode( $body, true ) ) ) {
163
+ if ( isset( $updater[ $slug ], $data['message'] ) ) {
164
+ $updater[ $slug ]['update_message'] = $data['message'];
165
+ }
166
  }
167
  }
168
  }
176
  /**
177
  * Add "Check for updates" link
178
  *
179
+ * @param array $plugin_meta An array of the plugin's metadata, including the version, author, author URI, and plugin URI
180
+ * @param string $plugin_file Path to the plugin file relative to the plugins directory
181
  * @return array
182
  */
183
+ public static function plugin_row_meta( $plugin_meta, $plugin_file ) {
184
  $modal_index = 0;
185
 
186
+ // Get current updates
187
+ $updater = get_option( AI1WM_UPDATER, array() );
188
+
189
  // Add link for each extension
190
  foreach ( Ai1wm_Extensions::get() as $slug => $extension ) {
191
  $modal_index++;
192
 
193
  // Get plugin details
194
+ if ( $plugin_file === $extension['basename'] ) {
195
 
196
  // Get updater URL
197
  $updater_url = add_query_arg( array( 'ai1wm_check_for_updates' => 1, 'ai1wm_nonce' => wp_create_nonce( 'ai1wm_check_for_updates' ) ), network_admin_url( 'plugins.php' ) );
198
 
199
  // Check purchase ID
200
  if ( get_option( $extension['key'] ) ) {
201
+ $plugin_meta[] = Ai1wm_Template::get_content( 'updater/check', array( 'url' => $updater_url ) );
202
  } else {
203
+ $plugin_meta[] = Ai1wm_Template::get_content( 'updater/modal', array( 'url' => $updater_url, 'modal' => $modal_index ) );
204
+ }
205
+ // Check error message
206
+ if ( isset( $updater[ $slug ]['error_message'] ) ) {
207
+ $plugin_meta[] = Ai1wm_Template::get_content( 'updater/error', array( 'message' => $updater[ $slug ]['error_message'] ) );
208
  }
209
  }
210
  }
211
 
212
+ return $plugin_meta;
213
  }
214
  }
lib/model/export/class-ai1wm-export-content.php CHANGED
@@ -98,11 +98,11 @@ class Ai1wm_Export_Content {
98
  $archive->set_file_pointer( $archive_bytes_offset );
99
 
100
  // Loop over files
101
- while ( $file_path = trim( fgets( $content_list ) ) ) {
102
  $file_bytes_written = 0;
103
 
104
  // Add file to archive
105
- if ( ( $completed = $archive->add_file( WP_CONTENT_DIR . DIRECTORY_SEPARATOR . $file_path, $file_path, $file_bytes_written, $file_bytes_offset ) ) ) {
106
  $file_bytes_offset = 0;
107
 
108
  // Get content bytes offset
98
  $archive->set_file_pointer( $archive_bytes_offset );
99
 
100
  // Loop over files
101
+ while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $content_list ) ) {
102
  $file_bytes_written = 0;
103
 
104
  // Add file to archive
105
+ if ( ( $completed = $archive->add_file( $file_abspath, $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) {
106
  $file_bytes_offset = 0;
107
 
108
  // Get content bytes offset
lib/model/export/class-ai1wm-export-database.php CHANGED
@@ -83,7 +83,7 @@ class Ai1wm_Export_Database {
83
 
84
  // Loop over tables
85
  $tables = array();
86
- while ( $table_name = trim( fgets( $tables_list ) ) ) {
87
  $tables[] = $table_name;
88
  }
89
 
83
 
84
  // Loop over tables
85
  $tables = array();
86
+ while ( list( $table_name ) = fgetcsv( $tables_list ) ) {
87
  $tables[] = $table_name;
88
  }
89
 
lib/model/export/class-ai1wm-export-enumerate-content.php CHANGED
@@ -92,7 +92,7 @@ class Ai1wm_Export_Enumerate_Content {
92
  // Write path line
93
  foreach ( $iterator as $item ) {
94
  if ( $item->isFile() ) {
95
- if ( ai1wm_write( $content_list, $iterator->getSubPathname() . PHP_EOL ) ) {
96
  $total_content_files_count++;
97
 
98
  // Add current file size
92
  // Write path line
93
  foreach ( $iterator as $item ) {
94
  if ( $item->isFile() ) {
95
+ if ( ai1wm_putcsv( $content_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) {
96
  $total_content_files_count++;
97
 
98
  // Add current file size
lib/model/export/class-ai1wm-export-enumerate-media.php CHANGED
@@ -78,7 +78,7 @@ class Ai1wm_Export_Enumerate_Media {
78
  // Write path line
79
  foreach ( $iterator as $item ) {
80
  if ( $item->isFile() ) {
81
- if ( ai1wm_write( $media_list, $iterator->getSubPathname() . PHP_EOL ) ) {
82
  $total_media_files_count++;
83
 
84
  // Add current file size
78
  // Write path line
79
  foreach ( $iterator as $item ) {
80
  if ( $item->isFile() ) {
81
+ if ( ai1wm_putcsv( $media_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) {
82
  $total_media_files_count++;
83
 
84
  // Add current file size
lib/model/export/class-ai1wm-export-enumerate-plugins.php CHANGED
@@ -86,7 +86,7 @@ class Ai1wm_Export_Enumerate_Plugins {
86
  // Write path line
87
  foreach ( $iterator as $item ) {
88
  if ( $item->isFile() ) {
89
- if ( ai1wm_write( $plugins_list, $iterator->getSubPathname() . PHP_EOL ) ) {
90
  $total_plugins_files_count++;
91
 
92
  // Add current file size
86
  // Write path line
87
  foreach ( $iterator as $item ) {
88
  if ( $item->isFile() ) {
89
+ if ( ai1wm_putcsv( $plugins_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) {
90
  $total_plugins_files_count++;
91
 
92
  // Add current file size
lib/model/export/class-ai1wm-export-enumerate-tables.php CHANGED
@@ -75,7 +75,7 @@ class Ai1wm_Export_Enumerate_Tables {
75
 
76
  // Write table line
77
  foreach ( $mysql->get_tables() as $table_name ) {
78
- if ( ai1wm_write( $tables_list, $table_name . PHP_EOL ) ) {
79
  $total_tables_count++;
80
  }
81
  }
75
 
76
  // Write table line
77
  foreach ( $mysql->get_tables() as $table_name ) {
78
+ if ( ai1wm_putcsv( $tables_list, array( $table_name ) ) ) {
79
  $total_tables_count++;
80
  }
81
  }
lib/model/export/class-ai1wm-export-init.php CHANGED
@@ -30,7 +30,6 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  class Ai1wm_Export_Init {
31
 
32
  public static function execute( $params ) {
33
-
34
  $blog_id = null;
35
 
36
  // Get subsite Blog ID
@@ -40,6 +39,9 @@ class Ai1wm_Export_Init {
40
  }
41
  }
42
 
 
 
 
43
  // Set archive
44
  if ( empty( $params['archive'] ) ) {
45
  $params['archive'] = ai1wm_archive_file( $blog_id );
30
  class Ai1wm_Export_Init {
31
 
32
  public static function execute( $params ) {
 
33
  $blog_id = null;
34
 
35
  // Get subsite Blog ID
39
  }
40
  }
41
 
42
+ // Set progress
43
+ Ai1wm_Status::info( __( 'Preparing to export...', AI1WM_PLUGIN_NAME ) );
44
+
45
  // Set archive
46
  if ( empty( $params['archive'] ) ) {
47
  $params['archive'] = ai1wm_archive_file( $blog_id );
lib/model/export/class-ai1wm-export-media.php CHANGED
@@ -98,11 +98,11 @@ class Ai1wm_Export_Media {
98
  $archive->set_file_pointer( $archive_bytes_offset );
99
 
100
  // Loop over files
101
- while ( $file_path = trim( fgets( $media_list ) ) ) {
102
  $file_bytes_written = 0;
103
 
104
  // Add file to archive
105
- if ( ( $completed = $archive->add_file( ai1wm_get_uploads_dir() . DIRECTORY_SEPARATOR . $file_path, 'uploads' . DIRECTORY_SEPARATOR . $file_path, $file_bytes_written, $file_bytes_offset ) ) ) {
106
  $file_bytes_offset = 0;
107
 
108
  // Get media bytes offset
98
  $archive->set_file_pointer( $archive_bytes_offset );
99
 
100
  // Loop over files
101
+ while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $media_list ) ) {
102
  $file_bytes_written = 0;
103
 
104
  // Add file to archive
105
+ if ( ( $completed = $archive->add_file( $file_abspath, 'uploads' . DIRECTORY_SEPARATOR . $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) {
106
  $file_bytes_offset = 0;
107
 
108
  // Get media bytes offset
lib/model/export/class-ai1wm-export-plugins.php CHANGED
@@ -98,11 +98,11 @@ class Ai1wm_Export_Plugins {
98
  $archive->set_file_pointer( $archive_bytes_offset );
99
 
100
  // Loop over files
101
- while ( $file_path = trim( fgets( $plugins_list ) ) ) {
102
  $file_bytes_written = 0;
103
 
104
  // Add file to archive
105
- if ( ( $completed = $archive->add_file( ai1wm_get_plugins_dir() . DIRECTORY_SEPARATOR . $file_path, 'plugins' . DIRECTORY_SEPARATOR . $file_path, $file_bytes_written, $file_bytes_offset ) ) ) {
106
  $file_bytes_offset = 0;
107
 
108
  // Get plugins bytes offset
98
  $archive->set_file_pointer( $archive_bytes_offset );
99
 
100
  // Loop over files
101
+ while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $plugins_list ) ) {
102
  $file_bytes_written = 0;
103
 
104
  // Add file to archive
105
+ if ( ( $completed = $archive->add_file( $file_abspath, 'plugins' . DIRECTORY_SEPARATOR . $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) {
106
  $file_bytes_offset = 0;
107
 
108
  // Get plugins bytes offset
lib/view/assets/css/updater.min.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:left}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-left:1em}.ai1wm-update-message{padding:0;margin:0;color:red}
1
+ @charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:left}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-left:1em}.ai1wm-error-message,.ai1wm-update-message{padding:0;margin:0;color:red}
lib/view/assets/css/updater.min.rtl.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:right}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-right:1em}.ai1wm-update-message{padding:0;margin:0;color:red}
1
+ @charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:right}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-right:1em}.ai1wm-error-message,.ai1wm-update-message{padding:0;margin:0;color:red}
lib/view/assets/javascript/util.min.js CHANGED
@@ -83,6 +83,12 @@ module.exports = {
83
  var i = Math.floor(Math.log(bytes) / Math.log(1024));
84
  var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
85
  return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
 
 
 
 
 
 
86
  }
87
  };
88
 
83
  var i = Math.floor(Math.log(bytes) / Math.log(1024));
84
  var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
85
  return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
86
+ },
87
+ dirname: function dirname(path) {
88
+ return path.replace(/\\/g, '/').replace(/\/[^/]*\/?$/, '');
89
+ },
90
+ basename: function basename(path) {
91
+ return path.replace(/\\/g, '/').replace(/.*\//, '');
92
  }
93
  };
94
 
lib/view/updater/{message.php → error.php} RENAMED
@@ -28,6 +28,4 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  }
29
  ?>
30
 
31
- <?php if ( ! empty( $updater['update_message'] ) ) : ?>
32
- <br /><span class="ai1wm-update-message"><?php echo $updater['update_message']; ?></span>
33
- <?php endif; ?>
28
  }
29
  ?>
30
 
31
+ <span class="ai1wm-error-message"><?php printf( __( 'Error: %s', AI1WM_PLUGIN_NAME ), $message ); ?></span>
 
 
lib/view/updater/update.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
31
+ <br /><span class="ai1wm-update-message"><?php echo $message; ?></span>
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.8
6
  Requires PHP: 5.2.17
7
- Stable tag: 7.48
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
@@ -89,6 +89,13 @@ All-in-One WP Migration is in full compliance with General Data Protection Regul
89
  See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881).
90
 
91
  == Changelog ==
 
 
 
 
 
 
 
92
  = 7.48 =
93
  **Added**
94
 
@@ -150,8 +157,3 @@ See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-pol
150
  **Fixed**
151
 
152
  * Remove deprecated jQuery methods
153
-
154
- = 7.38 =
155
- **Added**
156
-
157
- * Improved MySQL error handling
4
  Requires at least: 3.3
5
  Tested up to: 5.8
6
  Requires PHP: 5.2.17
7
+ Stable tag: 7.49
8
  License: GPLv2 or later
9
 
10
  Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
89
  See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881).
90
 
91
  == Changelog ==
92
+ = 7.49 =
93
+ **Added**
94
+
95
+ * Better error handling when making HTTP requests
96
+ * Store a list of site files as CSV
97
+ * Filter to change the request method
98
+
99
  = 7.48 =
100
  **Added**
101
 
157
  **Fixed**
158
 
159
  * Remove deprecated jQuery methods