MainWP Child - Version 4.1.6.1

Version Description

  • 4-16-21 =
  • Fixed: An issue with disconnecting sites
  • Fixed: An issue with applying custom branding
Download this release

Release Info

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

Code changes from version 4.1.6 to 4.1.6.1

class/class-mainwp-child-ithemes-security.php CHANGED
@@ -322,7 +322,7 @@ class MainWP_Child_IThemes_Security {
322
  if ( 'wordpress-salts' == $module ) {
323
  $settings['last_generated'] = \ITSEC_Modules::get_setting( $module, 'last_generated' );
324
  } elseif ( 'global' == $module ) {
325
- $keep_olds = array( 'did_upgrade', 'log_info', 'show_new_dashboard_notice', 'show_security_check', 'nginx_file', 'manage_group' );
326
  foreach ( $keep_olds as $key ) {
327
  $settings[ $key ] = \ITSEC_Modules::get_setting( $module, $key );
328
  }
@@ -897,16 +897,10 @@ class MainWP_Child_IThemes_Security {
897
  if ( ! class_exists( '\ITSEC_File_Change_Scanner' ) ) {
898
  require_once $mainwp_itsec_modules_path . 'file-change/scanner.php';
899
  }
900
-
901
- $results = \ITSEC_File_Change_Scanner::schedule_start();
902
-
903
- if ( is_wp_error( $results ) ) {
904
- $error = $results->get_error_message();
905
- $return['result'] = 'failed';
906
- $return['scan_error'] = $error;
907
- } else {
908
  $return['result'] = 'success';
909
- $return['scan_result'] = $results;
910
  }
911
  return $return;
912
  }
322
  if ( 'wordpress-salts' == $module ) {
323
  $settings['last_generated'] = \ITSEC_Modules::get_setting( $module, 'last_generated' );
324
  } elseif ( 'global' == $module ) {
325
+ $keep_olds = array( 'did_upgrade', 'log_info', 'show_new_dashboard_notice', 'show_security_check', 'nginx_file' );
326
  foreach ( $keep_olds as $key ) {
327
  $settings[ $key ] = \ITSEC_Modules::get_setting( $module, $key );
328
  }
897
  if ( ! class_exists( '\ITSEC_File_Change_Scanner' ) ) {
898
  require_once $mainwp_itsec_modules_path . 'file-change/scanner.php';
899
  }
900
+ $result = \ITSEC_File_Change_Scanner::run_scan( false );
901
+ if ( false === $result || true === $result || -1 === $result ) {
 
 
 
 
 
 
902
  $return['result'] = 'success';
903
+ $return['scan_result'] = $result;
904
  }
905
  return $return;
906
  }
class/class-mainwp-child-woocommerce-status.php CHANGED
@@ -452,8 +452,7 @@ class MainWP_Child_WooCommerce_Status {
452
 
453
  $data = apply_filters( 'mainwp_child_woocom_get_data', $data );
454
 
455
- $information['data'] = $data;
456
-
457
  $information['need_db_update'] = $this->check_db_update();
458
  return $information;
459
  }
452
 
453
  $data = apply_filters( 'mainwp_child_woocom_get_data', $data );
454
 
455
+ $information['data'] = $data;
 
456
  $information['need_db_update'] = $this->check_db_update();
457
  return $information;
458
  }
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.6';
37
 
38
  /**
39
  * Private variable containing the latest MainWP Child update version.
@@ -101,9 +101,18 @@ class MainWP_Child {
101
  }
102
 
103
  MainWP_Connect::instance()->check_other_auth();
 
 
 
104
  MainWP_Client_Report::instance()->init();
 
 
105
  MainWP_Utility::instance()->run_saved_snippets();
106
 
 
 
 
 
107
  if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
108
  if ( isset( $_GET['mainwp_child_run'] ) && ! empty( $_GET['mainwp_child_run'] ) ) {
109
  add_action( 'init', array( MainWP_Utility::get_class_name(), 'cron_active' ), PHP_INT_MAX );
@@ -282,10 +291,6 @@ class MainWP_Child {
282
  MainWP_Connect::instance()->register_site(); // register the site and exit.
283
  }
284
 
285
- if ( ( ! isset( $_POST['mainwpsignature'] ) && ! isset( $_POST['function'] ) ) || ! defined( 'WP_ADMIN' ) ) {
286
- return;
287
- }
288
-
289
  $mainwpsignature = isset( $_POST['mainwpsignature'] ) ? rawurldecode( wp_unslash( $_POST['mainwpsignature'] ) ) : '';
290
  $function = isset( $_POST['function'] ) ? sanitize_text_field( wp_unslash( $_POST['function'] ) ) : null;
291
  $nonce = isset( $_POST['nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
@@ -339,19 +344,6 @@ class MainWP_Child {
339
  if ( MainWP_Helper::is_admin() && is_admin() ) {
340
  MainWP_Clone::instance()->init_ajax();
341
  }
342
-
343
- if ( ! get_option( 'mainwp_child_pubkey' ) ) {
344
- MainWP_Child_Branding::instance()->save_branding_options( 'branding_disconnected', 'yes' );
345
- }
346
-
347
- if ( get_option( 'mainwp_child_clone_permalink' ) || get_option( 'mainwp_child_restore_permalink' ) ) {
348
- add_action( 'admin_notices', array( MainWP_Clone_Page::get_class_name(), 'permalink_admin_notice' ) );
349
- }
350
-
351
- MainWP_Clone::instance()->init();
352
- MainWP_Child_Server_Information::init();
353
- MainWP_Child_Plugins_Check::instance();
354
- MainWP_Child_Themes_Check::instance();
355
  }
356
 
357
  /**
33
  *
34
  * @var string MainWP Child plugin version.
35
  */
36
+ public static $version = '4.1.6.1';
37
 
38
  /**
39
  * Private variable containing the latest MainWP Child update version.
101
  }
102
 
103
  MainWP_Connect::instance()->check_other_auth();
104
+
105
+ MainWP_Clone::instance()->init();
106
+ MainWP_Child_Server_Information::init();
107
  MainWP_Client_Report::instance()->init();
108
+ MainWP_Child_Plugins_Check::instance();
109
+ MainWP_Child_Themes_Check::instance();
110
  MainWP_Utility::instance()->run_saved_snippets();
111
 
112
+ if ( ! get_option( 'mainwp_child_pubkey' ) ) {
113
+ MainWP_Child_Branding::instance()->save_branding_options( 'branding_disconnected', 'yes' );
114
+ }
115
+
116
  if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
117
  if ( isset( $_GET['mainwp_child_run'] ) && ! empty( $_GET['mainwp_child_run'] ) ) {
118
  add_action( 'init', array( MainWP_Utility::get_class_name(), 'cron_active' ), PHP_INT_MAX );
291
  MainWP_Connect::instance()->register_site(); // register the site and exit.
292
  }
293
 
 
 
 
 
294
  $mainwpsignature = isset( $_POST['mainwpsignature'] ) ? rawurldecode( wp_unslash( $_POST['mainwpsignature'] ) ) : '';
295
  $function = isset( $_POST['function'] ) ? sanitize_text_field( wp_unslash( $_POST['function'] ) ) : null;
296
  $nonce = isset( $_POST['nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
344
  if ( MainWP_Helper::is_admin() && is_admin() ) {
345
  MainWP_Clone::instance()->init_ajax();
346
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  }
348
 
349
  /**
class/class-mainwp-clone.php CHANGED
@@ -185,6 +185,9 @@ class MainWP_Clone {
185
  */
186
  public function init() {
187
  add_action( 'check_admin_referer', array( self::get_class_name(), 'permalink_changed' ) );
 
 
 
188
  }
189
 
190
  /**
185
  */
186
  public function init() {
187
  add_action( 'check_admin_referer', array( self::get_class_name(), 'permalink_changed' ) );
188
+ if ( get_option( 'mainwp_child_clone_permalink' ) || get_option( 'mainwp_child_restore_permalink' ) ) {
189
+ add_action( 'admin_notices', array( MainWP_Clone_Page::get_class_name(), 'permalink_admin_notice' ) );
190
+ }
191
  }
192
 
193
  /**
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.6
16
  * Requires at least: 5.4
17
  * Requires PHP: 7.0
18
  */
12
  * Author: MainWP
13
  * Author URI: https://mainwp.com
14
  * Text Domain: mainwp-child
15
+ * Version: 4.1.6.1
16
  * Requires at least: 5.4
17
  * Requires PHP: 7.0
18
  */
readme.txt CHANGED
@@ -7,7 +7,7 @@ Plugin URI: https://mainwp.com
7
  Requires at least: 5.4
8
  Tested up to: 5.7.1
9
  Requires PHP: 7.0
10
- Stable tag: 4.1.6
11
  License: GPLv3 or later
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -107,6 +107,10 @@ Sure we have a quick FAQ with a lot more questions and answers [here](https://ma
107
 
108
  == Changelog ==
109
 
 
 
 
 
110
  = 4.1.6 - 4-15-21 =
111
  * Added: Support for the function to trigger Check for Abandoned plugins and themes process
112
  * Updated: Multiple performance improvements
7
  Requires at least: 5.4
8
  Tested up to: 5.7.1
9
  Requires PHP: 7.0
10
+ Stable tag: 4.1.6.1
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.6.1 - 4-16-21 =
111
+ * Fixed: An issue with disconnecting sites
112
+ * Fixed: An issue with applying custom branding
113
+
114
  = 4.1.6 - 4-15-21 =
115
  * Added: Support for the function to trigger Check for Abandoned plugins and themes process
116
  * Updated: Multiple performance improvements