MainWP Child - Version 4.1.4

Version Description

  • 1-21-21 =
  • Updated: Compatibility with the latest WP Staging plugin version
  • Updated: Compatibility with the latest WP Time Capsule plugin version
  • Updated: Multiple DocBlock comments
  • Preventative: Multiple security improvements
Download this release

Release Info

Developer mainwp
Plugin Icon 128x128 MainWP Child
Version 4.1.4
Comparing to
See all releases

Code changes from version 4.1.3.1 to 4.1.4

class/class-mainwp-child-staging.php CHANGED
@@ -45,6 +45,13 @@ class MainWP_Child_Staging {
45
  */
46
  public $is_plugin_installed = false;
47
 
 
 
 
 
 
 
 
48
  /**
49
  * Create a public static instance of MainWP_Child_Staging.
50
  *
@@ -161,7 +168,7 @@ class MainWP_Child_Staging {
161
  MainWP_Helper::write( array( 'error' => __( 'Please install WP Staging plugin on child website', 'mainwp-child' ) ) );
162
  }
163
 
164
- if ( ! class_exists( '\WPStaging\WPStaging' ) ) {
165
  if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php' ) ) {
166
  require_once WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php';
167
  } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Core/WPStaging.php' ) ) {
@@ -169,7 +176,14 @@ class MainWP_Child_Staging {
169
  }
170
  }
171
 
172
- \WPStaging\WPStaging::getInstance();
 
 
 
 
 
 
 
173
  $information = array();
174
 
175
  if ( 'Y' !== get_option( 'mainwp_wp_staging_ext_enabled' ) ) {
@@ -309,8 +323,8 @@ class MainWP_Child_Staging {
309
 
310
  $return = array(
311
  'options' => serialize( $options ), // phpcs:ignore -- to compatible http encoding.
 
312
  'directoryListing' => $scan->directoryListing(),
313
- 'prefix' => \WPStaging\WPStaging::getTablePrefix(),
314
  );
315
  return $return;
316
  }
45
  */
46
  public $is_plugin_installed = false;
47
 
48
+ /**
49
+ * Public variable to hold the information if the WP Staging plugin is installed on the child site.
50
+ *
51
+ * @var string version string.
52
+ */
53
+ public $plugin_version = false;
54
+
55
  /**
56
  * Create a public static instance of MainWP_Child_Staging.
57
  *
168
  MainWP_Helper::write( array( 'error' => __( 'Please install WP Staging plugin on child website', 'mainwp-child' ) ) );
169
  }
170
 
171
+ if ( ! class_exists( '\WPStaging\WPStaging' ) && ! class_exists( '\WPStaging\Core\WPStaging' ) ) {
172
  if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php' ) ) {
173
  require_once WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php';
174
  } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Core/WPStaging.php' ) ) {
176
  }
177
  }
178
 
179
+ if ( class_exists( '\WPStaging\Core\WPStaging' ) ) {
180
+ $this->plugin_version = '2.8';
181
+ \WPStaging\Core\WPStaging::getInstance();
182
+ } elseif ( class_exists( '\WPStaging\WPStaging' ) ) {
183
+ $this->plugin_version = '2.7';
184
+ \WPStaging\WPStaging::getInstance();
185
+ }
186
+
187
  $information = array();
188
 
189
  if ( 'Y' !== get_option( 'mainwp_wp_staging_ext_enabled' ) ) {
323
 
324
  $return = array(
325
  'options' => serialize( $options ), // phpcs:ignore -- to compatible http encoding.
326
+ 'prefix' => '2.8' == $this->plugin_version ? \WPStaging\Core\WPStaging::getTablePrefix() : \WPStaging\WPStaging::getTablePrefix(),
327
  'directoryListing' => $scan->directoryListing(),
 
328
  );
329
  return $return;
330
  }
class/class-mainwp-child-timecapsule.php CHANGED
@@ -161,6 +161,10 @@ class MainWP_Child_Timecapsule {
161
  MainWP_Helper::write( array( 'error' => $error ) );
162
  }
163
 
 
 
 
 
164
  $information = array();
165
 
166
  $options_helper = new \Wptc_Options_Helper();
161
  MainWP_Helper::write( array( 'error' => $error ) );
162
  }
163
 
164
+ if ( method_exists( 'wptc_load_files' ) ) {
165
+ wptc_load_files();
166
+ }
167
+
168
  $information = array();
169
 
170
  $options_helper = new \Wptc_Options_Helper();
class/class-mainwp-child.php CHANGED
@@ -33,7 +33,7 @@ class MainWP_Child {
33
  *
34
  * @var string MainWP Child plugin version.
35
  */
36
- public static $version = '4.1.3.1';
37
 
38
  /**
39
  * Private variable containing the latest MainWP Child update version.
33
  *
34
  * @var string MainWP Child plugin version.
35
  */
36
+ public static $version = '4.1.4';
37
 
38
  /**
39
  * Private variable containing the latest MainWP Child update version.
class/class-tar-archiver.php CHANGED
@@ -310,7 +310,7 @@ class Tar_Archiver {
310
  * @uses Tar_Archiver::prepare_append() Prepare to append.
311
  * @uses Tar_Archiver::create() Create backup archive file.
312
  * @uses Tar_Archiver::include_core_files() Include WordPress core files.
313
- * @uses Tar_Archiver::create_backup_db() Crate database backup.
314
  * @uses Tar_Archiver::add_file() Add file to backup archive file.
315
  * @uses Tar_Archiver::add_dir() Add directory to backup archive file.
316
  * @uses Tar_Archiver::add_config() Add config file to backup archive file.
310
  * @uses Tar_Archiver::prepare_append() Prepare to append.
311
  * @uses Tar_Archiver::create() Create backup archive file.
312
  * @uses Tar_Archiver::include_core_files() Include WordPress core files.
313
+ * @uses Tar_Archiver::create_backup_db() Create database backup.
314
  * @uses Tar_Archiver::add_file() Add file to backup archive file.
315
  * @uses Tar_Archiver::add_dir() Add directory to backup archive file.
316
  * @uses Tar_Archiver::add_config() Add config file to backup archive file.
mainwp-child.php CHANGED
@@ -12,7 +12,7 @@
12
  * Author: MainWP
13
  * Author URI: https://mainwp.com
14
  * Text Domain: mainwp-child
15
- * Version: 4.1.3.1
16
  * Requires at least: 3.6
17
  * Requires PHP: 7.0
18
  */
12
  * Author: MainWP
13
  * Author URI: https://mainwp.com
14
  * Text Domain: mainwp-child
15
+ * Version: 4.1.4
16
  * Requires at least: 3.6
17
  * Requires PHP: 7.0
18
  */
readme.txt CHANGED
@@ -5,9 +5,9 @@ Author: mainwp
5
  Author URI: https://mainwp.com
6
  Plugin URI: https://mainwp.com
7
  Requires at least: 3.6
8
- Tested up to: 5.6
9
  Requires PHP: 7.0
10
- Stable tag: 4.1.3.1
11
  License: GPLv3 or later
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -107,6 +107,12 @@ Sure we have a quick FAQ with a lot more questions and answers [here](https://ma
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
110
  = 4.1.3.1 - 12-30-20 =
111
  * Fixed: An issue with uploading images in posts and pages
112
  * Updated: New WP Rocket plugin version compatibility
5
  Author URI: https://mainwp.com
6
  Plugin URI: https://mainwp.com
7
  Requires at least: 3.6
8
+ Tested up to: 5.7
9
  Requires PHP: 7.0
10
+ Stable tag: 4.1.4
11
  License: GPLv3 or later
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
107
 
108
  == Changelog ==
109
 
110
+ = 4.1.4 - 1-21-21 =
111
+ * Updated: Compatibility with the latest WP Staging plugin version
112
+ * Updated: Compatibility with the latest WP Time Capsule plugin version
113
+ * Updated: Multiple DocBlock comments
114
+ * Preventative: Multiple security improvements
115
+
116
  = 4.1.3.1 - 12-30-20 =
117
  * Fixed: An issue with uploading images in posts and pages
118
  * Updated: New WP Rocket plugin version compatibility