Version Description
Changed
- Wrap size_format in a function to handle corner cases
Download this release
Release Info
| Developer | bangelov |
| Plugin | |
| Version | 7.3 |
| Comparing to | |
| See all releases | |
Code changes from version 7.2 to 7.3
- all-in-one-wp-migration.php +1 -1
- constants.php +1 -1
- functions.php +19 -2
- lib/controller/class-ai1wm-main-controller.php +1 -1
- lib/view/backups/backups-list.php +1 -1
- lib/view/import/pro.php +1 -1
- readme.txt +6 -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.3
|
| 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 =
|
| 35 |
// ==================
|
| 36 |
// = Plugin Version =
|
| 37 |
// ==================
|
| 38 |
+
define( 'AI1WM_VERSION', '7.3' );
|
| 39 |
|
| 40 |
// ===============
|
| 41 |
// = Plugin Name =
|
functions.php
CHANGED
|
@@ -280,7 +280,7 @@ function ai1wm_multisite_bytes( $params ) {
|
|
| 280 |
* @return string
|
| 281 |
*/
|
| 282 |
function ai1wm_archive_size( $params ) {
|
| 283 |
-
return
|
| 284 |
}
|
| 285 |
|
| 286 |
/**
|
|
@@ -290,7 +290,7 @@ function ai1wm_archive_size( $params ) {
|
|
| 290 |
* @return string
|
| 291 |
*/
|
| 292 |
function ai1wm_backup_size( $params ) {
|
| 293 |
-
return
|
| 294 |
}
|
| 295 |
|
| 296 |
/**
|
|
@@ -316,6 +316,23 @@ function ai1wm_parse_size( $size, $default = null ) {
|
|
| 316 |
return $default;
|
| 317 |
}
|
| 318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
/**
|
| 320 |
* Get current site name
|
| 321 |
*
|
| 280 |
* @return string
|
| 281 |
*/
|
| 282 |
function ai1wm_archive_size( $params ) {
|
| 283 |
+
return ai1wm_size_format( filesize( ai1wm_archive_path( $params ) ) );
|
| 284 |
}
|
| 285 |
|
| 286 |
/**
|
| 290 |
* @return string
|
| 291 |
*/
|
| 292 |
function ai1wm_backup_size( $params ) {
|
| 293 |
+
return ai1wm_size_format( filesize( ai1wm_backup_path( $params ) ) );
|
| 294 |
}
|
| 295 |
|
| 296 |
/**
|
| 316 |
return $default;
|
| 317 |
}
|
| 318 |
|
| 319 |
+
/**
|
| 320 |
+
* Format file size into human-readable string
|
| 321 |
+
*
|
| 322 |
+
* Fixes the WP size_format bug: size_format( '0' ) => false
|
| 323 |
+
*
|
| 324 |
+
* @param int|string $bytes Number of bytes. Note max integer size for integers.
|
| 325 |
+
* @param int $decimals Optional. Precision of number of decimal places. Default 0.
|
| 326 |
+
* @return string|false False on failure. Number string on success.
|
| 327 |
+
*/
|
| 328 |
+
function ai1wm_size_format( $bytes, $decimals = 0 ) {
|
| 329 |
+
if ( strval( $bytes ) === '0' ) {
|
| 330 |
+
return size_format( 0, $decimals );
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
return size_format( $bytes, $decimals );
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
/**
|
| 337 |
* Get current site name
|
| 338 |
*
|
lib/controller/class-ai1wm-main-controller.php
CHANGED
|
@@ -795,7 +795,7 @@ class Ai1wm_Main_Controller {
|
|
| 795 |
'Your file exceeds the maximum upload size for this site: <strong>%s</strong><br />%s%s',
|
| 796 |
AI1WM_PLUGIN_NAME
|
| 797 |
),
|
| 798 |
-
esc_html(
|
| 799 |
__(
|
| 800 |
'<a href="https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/" target="_blank">How-to: Increase maximum upload file size</a> or ',
|
| 801 |
AI1WM_PLUGIN_NAME
|
| 795 |
'Your file exceeds the maximum upload size for this site: <strong>%s</strong><br />%s%s',
|
| 796 |
AI1WM_PLUGIN_NAME
|
| 797 |
),
|
| 798 |
+
esc_html( ai1wm_size_format( wp_max_upload_size() ) ),
|
| 799 |
__(
|
| 800 |
'<a href="https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/" target="_blank">How-to: Increase maximum upload file size</a> or ',
|
| 801 |
AI1WM_PLUGIN_NAME
|
lib/view/backups/backups-list.php
CHANGED
|
@@ -75,7 +75,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 75 |
<?php if ( is_null( $backup['size'] ) ) : ?>
|
| 76 |
<?php _e( '2GB+', AI1WM_PLUGIN_NAME ); ?>
|
| 77 |
<?php else : ?>
|
| 78 |
-
<?php echo
|
| 79 |
<?php endif; ?>
|
| 80 |
</td>
|
| 81 |
<td class="ai1wm-column-actions ai1wm-backup-actions">
|
| 75 |
<?php if ( is_null( $backup['size'] ) ) : ?>
|
| 76 |
<?php _e( '2GB+', AI1WM_PLUGIN_NAME ); ?>
|
| 77 |
<?php else : ?>
|
| 78 |
+
<?php echo ai1wm_size_format( $backup['size'], 2 ); ?>
|
| 79 |
<?php endif; ?>
|
| 80 |
</td>
|
| 81 |
<td class="ai1wm-column-actions ai1wm-backup-actions">
|
lib/view/import/pro.php
CHANGED
|
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 29 |
?>
|
| 30 |
|
| 31 |
<p class="max-upload-size">
|
| 32 |
-
<?php printf( __( 'Maximum upload file size: <strong>%s</strong>.', AI1WM_PLUGIN_NAME ), esc_html(
|
| 33 |
</p>
|
| 34 |
<p>
|
| 35 |
<a href="https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/" target="_blank"><?php _e( 'How-to: Increase maximum upload file size', AI1WM_PLUGIN_NAME ); ?></a>
|
| 29 |
?>
|
| 30 |
|
| 31 |
<p class="max-upload-size">
|
| 32 |
+
<?php printf( __( 'Maximum upload file size: <strong>%s</strong>.', AI1WM_PLUGIN_NAME ), esc_html( ai1wm_size_format( wp_max_upload_size() ) ) ); ?>
|
| 33 |
</p>
|
| 34 |
<p>
|
| 35 |
<a href="https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/" target="_blank"><?php _e( 'How-to: Increase maximum upload file size', AI1WM_PLUGIN_NAME ); ?></a>
|
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.2
|
| 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,11 @@ Alternatively you can download the plugin using the download button on this page
|
|
| 108 |
All-in-One WP Migration **asks for your consent** to collect **requester's email address** when filling plugin's contact form. [GDPR Compliant Privacy Policy](https://www.iubenda.com/privacy-policy/946881)
|
| 109 |
|
| 110 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
= 7.2 =
|
| 112 |
**Fixed**
|
| 113 |
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 5.2
|
| 6 |
Requires PHP: 5.2.17
|
| 7 |
+
Stable tag: 7.3
|
| 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.3 =
|
| 112 |
+
**Changed**
|
| 113 |
+
|
| 114 |
+
* Wrap size_format in a function to handle corner cases
|
| 115 |
+
|
| 116 |
= 7.2 =
|
| 117 |
**Fixed**
|
| 118 |
|
