Version Description
- Added advanced settings on export page
Download this release
Release Info
Developer | bangelov |
Plugin | All-in-One WP Migration |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.2.0
- all-in-one-wp-migration.php +1 -1
- constants.php +1 -1
- lib/model/class-ai1wm-export-abstract.php +80 -17
- lib/view/export/advanced-settings.php +44 -0
- lib/view/export/index.php +2 -0
- readme.txt +4 -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: 3.
|
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: 3.2.0
|
9 |
* Text Domain: all-in-one-wp-migration
|
10 |
* Domain Path: /languages
|
11 |
* Network: True
|
constants.php
CHANGED
@@ -38,7 +38,7 @@ if ( function_exists( 'gethostname' ) && in_array( gethostname(), $local ) ) {
|
|
38 |
// ==================
|
39 |
// = Plugin Version =
|
40 |
// ==================
|
41 |
-
define( 'AI1WM_VERSION', '3.
|
42 |
|
43 |
// ===============
|
44 |
// = Plugin Name =
|
38 |
// ==================
|
39 |
// = Plugin Version =
|
40 |
// ==================
|
41 |
+
define( 'AI1WM_VERSION', '3.2.0' );
|
42 |
|
43 |
// ===============
|
44 |
// = Plugin Name =
|
lib/model/class-ai1wm-export-abstract.php
CHANGED
@@ -79,21 +79,37 @@ abstract class Ai1wm_Export_Abstract {
|
|
79 |
) );
|
80 |
|
81 |
// Enable maintenance mode
|
82 |
-
if (
|
83 |
Ai1wm_Maintenance::enable();
|
84 |
}
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
// Create map file
|
99 |
$filemap = fopen( $this->storage()->filemap(), 'a+' );
|
@@ -107,7 +123,7 @@ abstract class Ai1wm_Export_Abstract {
|
|
107 |
new Ai1wm_Recursive_Directory_Iterator(
|
108 |
WP_CONTENT_DIR
|
109 |
),
|
110 |
-
$
|
111 |
),
|
112 |
RecursiveIteratorIterator::SELF_FIRST
|
113 |
);
|
@@ -208,7 +224,11 @@ abstract class Ai1wm_Export_Abstract {
|
|
208 |
*/
|
209 |
public function database() {
|
210 |
// Set exclude database
|
211 |
-
if (
|
|
|
|
|
|
|
|
|
212 |
return $this->route_to( 'export' );
|
213 |
}
|
214 |
|
@@ -230,9 +250,7 @@ abstract class Ai1wm_Export_Abstract {
|
|
230 |
Ai1wm_Status::set( array( 'message' => __( 'Done exporting database.', AI1WM_PLUGIN_NAME ) ) );
|
231 |
|
232 |
// Disable maintenance mode
|
233 |
-
|
234 |
-
Ai1wm_Maintenance::disable();
|
235 |
-
}
|
236 |
|
237 |
// Redirect
|
238 |
$this->route_to( 'export' );
|
@@ -390,4 +408,49 @@ abstract class Ai1wm_Export_Abstract {
|
|
390 |
)
|
391 |
);
|
392 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
79 |
) );
|
80 |
|
81 |
// Enable maintenance mode
|
82 |
+
if ( $this->should_enable_maintenance() ) {
|
83 |
Ai1wm_Maintenance::enable();
|
84 |
}
|
85 |
|
86 |
+
$filters = array();
|
87 |
+
|
88 |
+
// Exclude media
|
89 |
+
if ( $this->should_exclude_media() ) {
|
90 |
+
$filters = array_merge( $filters, array( 'uploads' ) );
|
91 |
+
}
|
92 |
+
|
93 |
+
// Exclude themes
|
94 |
+
if ( $this->should_exclude_themes() ) {
|
95 |
+
$filters = array_merge( $filters, array( 'themes' ) );
|
96 |
+
}
|
97 |
+
|
98 |
+
// Exclude plugins
|
99 |
+
if ( $this->should_exclude_plugins() ) {
|
100 |
+
$filters = array_merge( $filters, array( 'plugins' ) );
|
101 |
+
} else {
|
102 |
+
$filters = array_merge( $filters, array(
|
103 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration',
|
104 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-dropbox-extension',
|
105 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-gdrive-extension',
|
106 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-s3-extension',
|
107 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-multisite-extension',
|
108 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-unlimited-extension',
|
109 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-pro-extension',
|
110 |
+
'plugins' . DIRECTORY_SEPARATOR . 'all-in-one-wp-migration-ftp-extension',
|
111 |
+
) );
|
112 |
+
}
|
113 |
|
114 |
// Create map file
|
115 |
$filemap = fopen( $this->storage()->filemap(), 'a+' );
|
123 |
new Ai1wm_Recursive_Directory_Iterator(
|
124 |
WP_CONTENT_DIR
|
125 |
),
|
126 |
+
apply_filters( 'ai1wm_exclude_content_from_export', $filters )
|
127 |
),
|
128 |
RecursiveIteratorIterator::SELF_FIRST
|
129 |
);
|
224 |
*/
|
225 |
public function database() {
|
226 |
// Set exclude database
|
227 |
+
if ( $this->should_exclude_database() ) {
|
228 |
+
// Disable maintenance mode
|
229 |
+
Ai1wm_Maintenance::disable();
|
230 |
+
|
231 |
+
// Redirect
|
232 |
return $this->route_to( 'export' );
|
233 |
}
|
234 |
|
250 |
Ai1wm_Status::set( array( 'message' => __( 'Done exporting database.', AI1WM_PLUGIN_NAME ) ) );
|
251 |
|
252 |
// Disable maintenance mode
|
253 |
+
Ai1wm_Maintenance::disable();
|
|
|
|
|
254 |
|
255 |
// Redirect
|
256 |
$this->route_to( 'export' );
|
408 |
)
|
409 |
);
|
410 |
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Should exclude database?
|
414 |
+
*
|
415 |
+
* @return boolean
|
416 |
+
*/
|
417 |
+
protected function should_exclude_database() {
|
418 |
+
return isset( $this->args['options']['no-database'] );
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Should exclude media?
|
423 |
+
*
|
424 |
+
* @return boolean
|
425 |
+
*/
|
426 |
+
protected function should_exclude_media() {
|
427 |
+
return isset( $this->args['options']['no-media'] );
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Should exclude themes?
|
432 |
+
*
|
433 |
+
* @return boolean
|
434 |
+
*/
|
435 |
+
protected function should_exclude_themes() {
|
436 |
+
return isset( $this->args['options']['no-themes'] );
|
437 |
+
}
|
438 |
+
|
439 |
+
/**
|
440 |
+
* Should exclude plugins?
|
441 |
+
*
|
442 |
+
* @return boolean
|
443 |
+
*/
|
444 |
+
protected function should_exclude_plugins() {
|
445 |
+
return isset( $this->args['options']['no-plugins'] );
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Should enable maintenance?
|
450 |
+
*
|
451 |
+
* @return boolean
|
452 |
+
*/
|
453 |
+
protected function should_enable_maintenance() {
|
454 |
+
return isset( $this->args['options']['maintenance-mode'] );
|
455 |
+
}
|
456 |
}
|
lib/view/export/advanced-settings.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ai1wm-field-set">
|
2 |
+
<div class="ai1wm-accordion ai1wm-expandable">
|
3 |
+
<h4>
|
4 |
+
<i class="ai1wm-icon-arrow-right"></i>
|
5 |
+
<?php _e( 'Advanced options', AI1WM_PLUGIN_NAME ); ?>
|
6 |
+
<small><?php _e( '(click to expand)', AI1WM_PLUGIN_NAME ); ?></small>
|
7 |
+
</h4>
|
8 |
+
<ul>
|
9 |
+
<li>
|
10 |
+
<input type="checkbox" id="ai1wm-no-spam-comments" name="options[no-spam-comments]" />
|
11 |
+
<label for="ai1wm-no-spam-comments"><?php _e( 'Do <strong>not</strong> export spam comments', AI1WM_PLUGIN_NAME ); ?></label>
|
12 |
+
</li>
|
13 |
+
<li>
|
14 |
+
<input type="checkbox" id="ai1wm-no-revisions" name="options[no-revisions]" />
|
15 |
+
<label for="ai1wm-no-revisions"><?php _e( 'Do <strong>not</strong> export post revisions', AI1WM_PLUGIN_NAME ); ?></label>
|
16 |
+
</li>
|
17 |
+
<li>
|
18 |
+
<input type="checkbox" id="ai1wm-no-media" name="options[no-media]" />
|
19 |
+
<label for="ai1wm-no-media"><?php _e( 'Do <strong>not</strong> export media library (files)', AI1WM_PLUGIN_NAME ); ?></label>
|
20 |
+
</li>
|
21 |
+
<li>
|
22 |
+
<input type="checkbox" id="ai1wm-no-themes" name="options[no-themes]" />
|
23 |
+
<label for="ai1wm-no-themes"><?php _e( 'Do <strong>not</strong> export themes (files)', AI1WM_PLUGIN_NAME ); ?></label>
|
24 |
+
</li>
|
25 |
+
<li>
|
26 |
+
<input type="checkbox" id="ai1wm-no-plugins" name="options[no-plugins]" />
|
27 |
+
<label for="ai1wm-no-plugins"><?php _e( 'Do <strong>not</strong> export plugins (files)', AI1WM_PLUGIN_NAME ); ?></label>
|
28 |
+
</li>
|
29 |
+
<li>
|
30 |
+
<input type="checkbox" id="ai1wm-no-database" name="options[no-database]" />
|
31 |
+
<label for="ai1wm-no-database"><?php _e( 'Do <strong>not</strong> export database (sql)', AI1WM_PLUGIN_NAME ); ?></label>
|
32 |
+
</li>
|
33 |
+
<li>
|
34 |
+
<input type="checkbox" id="ai1wm-no-table-data" name="options[no-table-data]" />
|
35 |
+
<label for="ai1wm-no-table-data"><?php _e( 'Do <strong>not</strong> export table data', AI1WM_PLUGIN_NAME ); ?></label>
|
36 |
+
</li>
|
37 |
+
<li>
|
38 |
+
<input type="checkbox" id="ai1wm-maintenance-mode" name="options[maintenance-mode]" />
|
39 |
+
<label for="ai1wm-maintenance-mode"><?php _e( 'Put the site in <strong>maintenance mode</strong> while exporting', AI1WM_PLUGIN_NAME ); ?></label>
|
40 |
+
</li>
|
41 |
+
</ul>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
lib/view/export/index.php
CHANGED
@@ -55,6 +55,8 @@
|
|
55 |
|
56 |
<?php do_action( 'ai1wm_export_left_options' ); ?>
|
57 |
|
|
|
|
|
58 |
<?php include AI1WM_TEMPLATES_PATH . '/export/export-buttons.php'; ?>
|
59 |
|
60 |
<?php do_action( 'ai1wm_export_left_end' ); ?>
|
55 |
|
56 |
<?php do_action( 'ai1wm_export_left_options' ); ?>
|
57 |
|
58 |
+
<?php include AI1WM_TEMPLATES_PATH . '/export/advanced-settings.php'; ?>
|
59 |
+
|
60 |
<?php include AI1WM_TEMPLATES_PATH . '/export/export-buttons.php'; ?>
|
61 |
|
62 |
<?php do_action( 'ai1wm_export_left_end' ); ?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, pimjitsawang
|
|
3 |
Tags: db migration, migration, wordpress migration, db backup, db restore, website backup, website restore, website migration, website deploy, wordpress deploy, db backup, database export, database serialization, database find replace
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 3.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
All-in-One WP Migration is the only tool that you will ever need to migrate a WordPress site.
|
@@ -57,6 +57,9 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
|
|
57 |
3. Plugin Menu
|
58 |
|
59 |
== Changelog ==
|
|
|
|
|
|
|
60 |
= 3.1.1 =
|
61 |
* Fixed secret key issue on upgrade of the plugin
|
62 |
|
3 |
Tags: db migration, migration, wordpress migration, db backup, db restore, website backup, website restore, website migration, website deploy, wordpress deploy, db backup, database export, database serialization, database find replace
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 3.2.0
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
All-in-One WP Migration is the only tool that you will ever need to migrate a WordPress site.
|
57 |
3. Plugin Menu
|
58 |
|
59 |
== Changelog ==
|
60 |
+
= 3.2.0 =
|
61 |
+
* Added advanced settings on export page
|
62 |
+
|
63 |
= 3.1.1 =
|
64 |
* Fixed secret key issue on upgrade of the plugin
|
65 |
|