Version Description
- Fix: Fatal error, undefined function wpstg_validate_data()
Download this release
Release Info
Developer | ReneHermi |
Plugin | WP Staging – DB & File Duplicator & Migration |
Version | 2.5.5 |
Comparing to | |
See all releases |
Code changes from version 2.5.4 to 2.5.5
- apps/Core/Utils/functions.php +12 -0
- apps/Core/WPStaging.php +1 -1
- readme.txt +4 -1
- wp-staging.php +2 -2
apps/Core/Utils/functions.php
CHANGED
@@ -122,6 +122,18 @@ function wpstg_replace_last_match( $needle, $replace, $haystack ) {
|
|
122 |
return $result;
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
/**
|
126 |
* Convert all values of a string or an array into url decoded values
|
127 |
* Main use for preventing Wordfence firewall rule 'local file inclusion'
|
122 |
return $result;
|
123 |
}
|
124 |
|
125 |
+
/**
|
126 |
+
* Check if string is valid date
|
127 |
+
* @param type $date
|
128 |
+
* @param type $format
|
129 |
+
* @return bool
|
130 |
+
*/
|
131 |
+
function wpstg_validate_date( $date, $format = 'Y-m-d' ) {
|
132 |
+
$d = DateTime::createFromFormat( $format, $date );
|
133 |
+
// The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.
|
134 |
+
return $d && $d->format( $format ) === $date;
|
135 |
+
}
|
136 |
+
|
137 |
/**
|
138 |
* Convert all values of a string or an array into url decoded values
|
139 |
* Main use for preventing Wordfence firewall rule 'local file inclusion'
|
apps/Core/WPStaging.php
CHANGED
@@ -29,7 +29,7 @@ final class WPStaging {
|
|
29 |
/**
|
30 |
* Plugin version
|
31 |
*/
|
32 |
-
const VERSION = "2.5.
|
33 |
|
34 |
/**
|
35 |
* Plugin name
|
29 |
/**
|
30 |
* Plugin version
|
31 |
*/
|
32 |
+
const VERSION = "2.5.5";
|
33 |
|
34 |
/**
|
35 |
* Plugin name
|
readme.txt
CHANGED
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
9 |
Tags: staging, duplication, cloning, clone, migration, sandbox, test site, testing, backup, post, admin, administration, duplicate posts
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 5.1
|
12 |
-
Stable tag: 2.5.
|
13 |
Requires PHP: 5.3
|
14 |
|
15 |
A duplicator plugin! Clone, duplicate and migrate live sites to independent staging and development sites that are available only to administrators.
|
@@ -151,6 +151,9 @@ https://wp-staging.com
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
154 |
= 2.5.4 =
|
155 |
* Fix: WordFence firewall rule 'local file inclusion' blocks wp staging initial starting cloning sequence
|
156 |
* Fix: Values of form Extra directories to copy are ignored
|
9 |
Tags: staging, duplication, cloning, clone, migration, sandbox, test site, testing, backup, post, admin, administration, duplicate posts
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 5.1
|
12 |
+
Stable tag: 2.5.5
|
13 |
Requires PHP: 5.3
|
14 |
|
15 |
A duplicator plugin! Clone, duplicate and migrate live sites to independent staging and development sites that are available only to administrators.
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 2.5.5 =
|
155 |
+
* Fix: Fatal error, undefined function wpstg_validate_data()
|
156 |
+
|
157 |
= 2.5.4 =
|
158 |
* Fix: WordFence firewall rule 'local file inclusion' blocks wp staging initial starting cloning sequence
|
159 |
* Fix: Values of form Extra directories to copy are ignored
|
wp-staging.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Author: WP-Staging
|
8 |
* Author URI: https://wp-staging.com
|
9 |
* Contributors: ReneHermi, ilgityildirim
|
10 |
-
* Version: 2.5.
|
11 |
* Text Domain: wp-staging
|
12 |
* Domain Path: /languages/
|
13 |
|
@@ -51,7 +51,7 @@ if( !defined( 'WPSTG_PLUGIN_URL' ) ) {
|
|
51 |
|
52 |
// Version
|
53 |
if( !defined( 'WPSTG_VERSION' ) ) {
|
54 |
-
define( 'WPSTG_VERSION', '2.5.
|
55 |
}
|
56 |
|
57 |
// Must use version of the optimizer
|
7 |
* Author: WP-Staging
|
8 |
* Author URI: https://wp-staging.com
|
9 |
* Contributors: ReneHermi, ilgityildirim
|
10 |
+
* Version: 2.5.5
|
11 |
* Text Domain: wp-staging
|
12 |
* Domain Path: /languages/
|
13 |
|
51 |
|
52 |
// Version
|
53 |
if( !defined( 'WPSTG_VERSION' ) ) {
|
54 |
+
define( 'WPSTG_VERSION', '2.5.5' );
|
55 |
}
|
56 |
|
57 |
// Must use version of the optimizer
|