WP Staging – DB & File Duplicator & Migration - Version 1.1.5

Version Description

  • Fix: Admin notice is throwing a false positive write permission error
  • New: Move log folder to wp-content/uploads/wp-staging/logs
  • New: Tested up to WP 4.7.3
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 WP Staging – DB & File Duplicator & Migration
Version 1.1.5
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.5

includes/admin/admin-notices.php CHANGED
@@ -34,11 +34,11 @@ function wpstg_admin_messages() {
34
  echo '<p><strong>WP Staging Folder Permission error: </strong>' . wpstg_get_upload_dir() . ' is not write and/or readable. <br> Check if the folder <strong>'.wpstg_get_upload_dir().'</strong> exists! File permissions should be chmod 755 or 777.</p>';
35
  echo '</div>';
36
  }
37
- if ( wpstg_is_admin_page() && !wp_is_writable( WPSTG_PLUGIN_DIR . 'logs' ) ){
38
- echo '<div class="error">';
39
- echo '<p><strong>WP Staging Folder Permission error: </strong>' . WPSTG_PLUGIN_DIR . 'logs' . ' is not write and/or readable. <br> Check if the folder <strong>'.WPSTG_PLUGIN_DIR . 'logs'.'</strong> exists! File permissions should be chmod 755 or 777.</p>';
40
- echo '</div>';
41
- }
42
  $path = wpstg_get_upload_dir() . '/clone_details.json';
43
  if ( wpstg_is_admin_page() && !wpstg_clonedetailsjson_exists() || !is_readable( $path ) ){
44
  echo '<div class="error">';
34
  echo '<p><strong>WP Staging Folder Permission error: </strong>' . wpstg_get_upload_dir() . ' is not write and/or readable. <br> Check if the folder <strong>'.wpstg_get_upload_dir().'</strong> exists! File permissions should be chmod 755 or 777.</p>';
35
  echo '</div>';
36
  }
37
+ // if ( wpstg_is_admin_page() && !wp_is_writable( WPSTG_PLUGIN_DIR . 'logs' ) ){
38
+ // echo '<div class="error">';
39
+ // echo '<p><strong>WP Staging Folder Permission error: </strong>' . WPSTG_PLUGIN_DIR . 'logs' . ' is not write and/or readable. <br> Check if the folder <strong>'.WPSTG_PLUGIN_DIR . 'logs'.'</strong> exists! File permissions should be chmod 755 or 777.</p>';
40
+ // echo '</div>';
41
+ // }
42
  $path = wpstg_get_upload_dir() . '/clone_details.json';
43
  if ( wpstg_is_admin_page() && !wpstg_clonedetailsjson_exists() || !is_readable( $path ) ){
44
  echo '<div class="error">';
includes/admin/admin-pages.php CHANGED
@@ -49,8 +49,9 @@ function wpstg_is_admin_page() {
49
 
50
  global $wpstg_parent_page, $pagenow, $typenow, $wpstg_settings_page, $wpstg_add_ons_page, $wpstg_tools_page, $wpstg_clone_page;
51
 
52
- if ( 'wpstg-settings' == $currentpage || 'wpstg-addons' == $currentpage || 'wpstg-tools' == $currentpage || 'wpstg-clone' == $currentpage || 'wpstg_clone' == $currentpage) {
53
- //mashdebug()->info("wpstg_is_admin_page() = true");
54
  return true;
55
- }
 
 
56
  }
49
 
50
  global $wpstg_parent_page, $pagenow, $typenow, $wpstg_settings_page, $wpstg_add_ons_page, $wpstg_tools_page, $wpstg_clone_page;
51
 
52
+ if ( 'wpstg-settings' == $currentpage || 'wpstg-addons' == $currentpage || 'wpstg-tools' == $currentpage || 'wpstg_clone' == $currentpage) {
 
53
  return true;
54
+ }
55
+
56
+ return false;
57
  }
includes/admin/settings/register-settings.php CHANGED
@@ -194,7 +194,7 @@ function wpstg_get_registered_settings() {
194
  'debug_mode' => array(
195
  'id' => 'debug_mode',
196
  'name' => __( 'Debug Mode', 'mashsb' ),
197
- 'desc' => __( 'This will enable an extended debug mode which creates additional entries in <strong>wp-content/wp-staging/logs</strong>. Please enable this when we ask you to do so.', 'mashsb' ),
198
  'type' => 'checkbox'
199
  ),
200
  'uninstall_on_delete' => array(
@@ -784,7 +784,7 @@ add_filter( 'option_page_capability_wpstg_settings', 'wpstg_set_settings_cap' );
784
  function wpstg_log_permissions(){
785
  global $wpstg_options;
786
  if (!WPSTG()->logger->checkDir() ){
787
- return '<br><strong style="color:red;">' . __('Log file directory not writable! Set FTP permission to 755 or 777 for /wp-content/plugins/wp-staging/logs/', 'wpstg') . '</strong> <br> Read here more about <a href="http://codex.wordpress.org/Changing_File_Permissions" target="_blank">file permissions</a> ';
788
  }
789
  }
790
 
194
  'debug_mode' => array(
195
  'id' => 'debug_mode',
196
  'name' => __( 'Debug Mode', 'mashsb' ),
197
+ 'desc' => __( 'This will enable an extended debug mode which creates additional entries in <strong>wp-content/uploads/wp-staging/logs</strong>. Please enable this when we ask you to do so.', 'mashsb' ),
198
  'type' => 'checkbox'
199
  ),
200
  'uninstall_on_delete' => array(
784
  function wpstg_log_permissions(){
785
  global $wpstg_options;
786
  if (!WPSTG()->logger->checkDir() ){
787
+ return '<br><strong style="color:red;">' . __('Log file directory not writable! Set FTP permission to 755 or 777 for /wp-content/uploads/wp-staging/logs/', 'wpstg') . '</strong> <br> Read here more about <a href="http://codex.wordpress.org/Changing_File_Permissions" target="_blank">file permissions</a> ';
788
  }
789
  }
790
 
includes/admin/template-functions.php CHANGED
@@ -1641,7 +1641,7 @@ function wpstg_get_log_data($progress){
1641
  return $log_data_header = '###########################################<br>'
1642
  . '&nbsp;&nbsp;&nbsp; WP Staging working log <br>'
1643
  . '&nbsp;&nbsp;&nbsp; You find all log files in: <br>'
1644
- . '&nbsp;&nbsp;&nbsp; wp-content/plugins/wp-staging/logs <br>'
1645
  . '###########################################<br>';
1646
  } else {
1647
  return '';
1641
  return $log_data_header = '###########################################<br>'
1642
  . '&nbsp;&nbsp;&nbsp; WP Staging working log <br>'
1643
  . '&nbsp;&nbsp;&nbsp; You find all log files in: <br>'
1644
+ . '&nbsp;&nbsp;&nbsp; wp-content/uploads/wp-staging/logs <br>'
1645
  . '###########################################<br>';
1646
  } else {
1647
  return '';
includes/logger.php CHANGED
@@ -20,8 +20,8 @@ class wpstgLogger {
20
  {
21
  $this->file = $file;
22
  $this->level = $level;
23
- $this->path = str_replace('\\', '/', WPSTG_PLUGIN_DIR . "logs/$this->file");
24
- $this->folder = str_replace('\\', '/', WPSTG_PLUGIN_DIR . "logs");
25
  $this->start();
26
  }
27
 
20
  {
21
  $this->file = $file;
22
  $this->level = $level;
23
+ $this->path = str_replace('\\', '/', wpstg_get_upload_dir() . "logs/$this->file");
24
+ $this->folder = str_replace('\\', '/', wpstg_get_upload_dir() . "logs");
25
  $this->start();
26
  }
27
 
readme.txt CHANGED
@@ -8,8 +8,8 @@ License: GPLv2 or later
8
  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: 4.7.2
12
- Stable tag: 1.1.4
13
 
14
  A duplicator plugin! Clone, duplicate and migrate live sites to independent staging and development sites that are available only to administrators.
15
 
@@ -143,6 +143,11 @@ After installation goto the settings page 'Staging' and do your adjustments ther
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
146
  = 1.1.4 =
147
  * Fix: Fatal error Unsupported operand types
148
 
8
  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: 4.7.9
12
+ Stable tag: 1.1.5
13
 
14
  A duplicator plugin! Clone, duplicate and migrate live sites to independent staging and development sites that are available only to administrators.
15
 
143
 
144
  == Changelog ==
145
 
146
+ = 1.1.5 =
147
+ * Fix: Admin notice is throwing a false positive write permission error
148
+ * New: Move log folder to wp-content/uploads/wp-staging/logs
149
+ * New: Tested up to WP 4.7.3
150
+
151
  = 1.1.4 =
152
  * Fix: Fatal error Unsupported operand types
153
 
wp-staging.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Create a staging clone site for testing & developing
7
  * Author: WP-Staging, René Hermenau
8
  * Author URI: https://wordpress.org/plugins/wp-staging
9
- * Version: 1.1.4
10
  * Text Domain: wpstg
11
  * Domain Path: languages
12
 
@@ -34,11 +34,11 @@ if ( !defined('ABSPATH') )
34
 
35
  // Plugin version
36
  if ( !defined('WPSTG_VERSION') ) {
37
- define('WPSTG_VERSION', '1.1.4');
38
  }
39
  // Is compatible up to WordPress version
40
  if ( !defined('WPSTG_WP_COMPATIBLE') ) {
41
- define('WPSTG_WP_COMPATIBLE', '4.7.2');
42
  }
43
 
44
  // Plugin Folder Path
6
  * Description: Create a staging clone site for testing & developing
7
  * Author: WP-Staging, René Hermenau
8
  * Author URI: https://wordpress.org/plugins/wp-staging
9
+ * Version: 1.1.5
10
  * Text Domain: wpstg
11
  * Domain Path: languages
12
 
34
 
35
  // Plugin version
36
  if ( !defined('WPSTG_VERSION') ) {
37
+ define('WPSTG_VERSION', '1.1.5');
38
  }
39
  // Is compatible up to WordPress version
40
  if ( !defined('WPSTG_WP_COMPATIBLE') ) {
41
+ define('WPSTG_WP_COMPATIBLE', '4.7.4');
42
  }
43
 
44
  // Plugin Folder Path