MainWP Child - Version 3.5.3

Version Description

  • 12-19-18 =
  • Fixed: an issue with the X-Frame-Options configuration
  • Fixed: an issue with clearing WP Rocket cache
  • Fixed: an issue with saving BackWPup settings
  • Fixed: multiple compatibility issues for the Bulk Settings Manger extension
  • Fixed: an issue with submitting the Bulk Settings Manger keys on child sites protected with the HTTP Basic Authentication
  • Fixed: an issue with creating buckets in Backblaze remote option caused by disallowed characters
  • Fixed: an issue with tokens usage in the UpdraftPlus Webdav remote storage settings
  • Added: support for new WP Staging plugin options
  • Updated: update detection process in order to improve performance on some hosts
  • Updated: disabled site size calculation function as default state
  • Updated: support for the latest Wordfence version
Download this release

Release Info

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

Code changes from version 3.5.2 to 3.5.3

class/class-mainwp-child-back-up-buddy.php CHANGED
@@ -32,13 +32,24 @@ class MainWP_Child_Back_Up_Buddy {
32
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
33
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
34
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
 
35
  }
36
  }
37
 
 
 
 
 
 
38
  function remove_update_nag( $value ) {
39
  if ( isset( $_POST['mainwpsignature'] ) ) {
40
  return $value;
41
  }
 
 
 
 
 
42
  if ( isset( $value->response['backupbuddy/backupbuddy.php'] ) ) {
43
  unset( $value->response['backupbuddy/backupbuddy.php'] );
44
  }
32
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
33
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
34
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
35
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
36
  }
37
  }
38
 
39
+ function hide_update_notice( $slugs ) {
40
+ $slugs[] = 'backupbuddy/backupbuddy.php';
41
+ return $slugs;
42
+ }
43
+
44
  function remove_update_nag( $value ) {
45
  if ( isset( $_POST['mainwpsignature'] ) ) {
46
  return $value;
47
  }
48
+
49
+ if (! MainWP_Helper::is_screen_with_update()) {
50
+ return $value;
51
+ }
52
+
53
  if ( isset( $value->response['backupbuddy/backupbuddy.php'] ) ) {
54
  unset( $value->response['backupbuddy/backupbuddy.php'] );
55
  }
class/class-mainwp-child-back-up-wordpress.php CHANGED
@@ -35,13 +35,23 @@ class MainWP_Child_Back_Up_Wordpress {
35
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
36
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
37
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
 
38
  }
39
  }
40
 
 
 
 
 
 
41
  function remove_update_nag( $value ) {
42
  if ( isset( $_POST['mainwpsignature'] ) ) {
43
  return $value;
44
  }
 
 
 
 
45
  if ( isset( $value->response['backupwordpress/backupwordpress.php'] ) ) {
46
  unset( $value->response['backupwordpress/backupwordpress.php'] );
47
  }
35
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
36
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
37
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
38
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
39
  }
40
  }
41
 
42
+ function hide_update_notice( $slugs ) {
43
+ $slugs[] = 'backupwordpress/backupwordpress.php';
44
+ return $slugs;
45
+ }
46
+
47
  function remove_update_nag( $value ) {
48
  if ( isset( $_POST['mainwpsignature'] ) ) {
49
  return $value;
50
  }
51
+
52
+ if (! MainWP_Helper::is_screen_with_update()) {
53
+ return $value;
54
+ }
55
  if ( isset( $value->response['backupwordpress/backupwordpress.php'] ) ) {
56
  unset( $value->response['backupwordpress/backupwordpress.php'] );
57
  }
class/class-mainwp-child-back-wp-up.php CHANGED
@@ -1423,7 +1423,10 @@ class MainWP_Child_Back_WP_Up {
1423
 
1424
  update_site_option( 'backwpup_messages', array() );
1425
 
1426
- $backwpup = new BackWPup_Page_Settings();
 
 
 
1427
  $backwpup->save_post_form();
1428
 
1429
  if ( class_exists( 'BackWPup_Pro' ) ) {
1423
 
1424
  update_site_option( 'backwpup_messages', array() );
1425
 
1426
+ $settings_views = array();
1427
+ $settings_updaters = array();
1428
+
1429
+ $backwpup = new BackWPup_Page_Settings($settings_views, $settings_updaters);
1430
  $backwpup->save_post_form();
1431
 
1432
  if ( class_exists( 'BackWPup_Pro' ) ) {
class/class-mainwp-child-branding.php CHANGED
@@ -270,6 +270,17 @@ class MainWP_Child_Branding {
270
  if ( ! is_array( $extra_setting ) ) {
271
  $extra_setting = array();
272
  }
 
 
 
 
 
 
 
 
 
 
 
273
  $cancelled_branding = ( get_option( 'mainwp_child_branding_disconnected' ) === 'yes' ) && ! get_option( 'mainwp_branding_preserve_branding' );
274
  if ( $cancelled_branding ) {
275
  return;
@@ -277,9 +288,10 @@ class MainWP_Child_Branding {
277
  // enable branding in case child plugin is deactive
278
  add_filter( 'all_plugins', array( $this, 'branding_child_plugin' ) );
279
 
280
- // if ( self::is_branding() ) {
281
- // add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
282
- // }
 
283
 
284
  if ( get_option( 'mainwp_branding_ext_enabled' ) !== 'Y' ) {
285
  return;
@@ -856,6 +868,135 @@ class MainWP_Child_Branding {
856
  return 'MainWP';
857
  }
858
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
859
  public function branding_map_meta_cap( $caps, $cap, $user_id, $args ) {
860
 
861
  // this is causing of some plugin's menu not added
@@ -894,15 +1035,26 @@ class MainWP_Child_Branding {
894
  }
895
  }
896
 
897
- // function remove_update_nag( $value ) {
898
- // if ( isset( $_POST['mainwpsignature'] ) ) {
899
- // return $value;
900
- // }
901
- // if ( isset( $value->response['mainwp-child/mainwp-child.php'] ) ) {
902
- // unset( $value->response['mainwp-child/mainwp-child.php'] );
903
- // }
904
- // return $value;
905
- // }
 
 
 
 
 
 
 
 
 
 
 
906
 
907
  public function update_child_header( $plugins, $header ) {
908
  $plugin_key = '';
270
  if ( ! is_array( $extra_setting ) ) {
271
  $extra_setting = array();
272
  }
273
+
274
+ // to hide updates notice
275
+ if (is_admin()) {
276
+ // back end
277
+ add_action( 'in_admin_footer', array( $this, 'in_admin_footer' ) );
278
+ } else if (is_user_logged_in()) {
279
+ // front end
280
+ add_action( 'add_admin_bar_menus', array( $this, 'add_admin_bar_menus' ));
281
+ }
282
+
283
+
284
  $cancelled_branding = ( get_option( 'mainwp_child_branding_disconnected' ) === 'yes' ) && ! get_option( 'mainwp_branding_preserve_branding' );
285
  if ( $cancelled_branding ) {
286
  return;
288
  // enable branding in case child plugin is deactive
289
  add_filter( 'all_plugins', array( $this, 'branding_child_plugin' ) );
290
 
291
+ if ( self::is_branding() ) {
292
+ add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
293
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
294
+ }
295
 
296
  if ( get_option( 'mainwp_branding_ext_enabled' ) !== 'Y' ) {
297
  return;
868
  return 'MainWP';
869
  }
870
 
871
+ public function add_admin_bar_menus() {
872
+
873
+ $hide_slugs = apply_filters('mainwp_child_hide_update_notice' , array());
874
+
875
+ if (!is_array($hide_slugs))
876
+ $hide_slugs = array();
877
+
878
+ if (count($hide_slugs) == 0) {
879
+ return;
880
+ }
881
+
882
+ if (!function_exists('get_plugin_updates')) {
883
+ include_once( ABSPATH . '/wp-admin/includes/update.php' );
884
+ }
885
+
886
+ $count_hide = 0;
887
+
888
+ $updates = get_plugin_updates();
889
+ if (is_array($updates)) {
890
+ foreach($updates as $slug => $data) {
891
+ if (in_array($slug, $hide_slugs)) {
892
+ $count_hide++;
893
+ }
894
+ }
895
+ }
896
+
897
+ if ( $count_hide == 0) {
898
+ return;
899
+ }
900
+ // js for front end
901
+ ?>
902
+ <script type="text/javascript">
903
+ var mainwpCountHide = <?php echo esc_attr($count_hide); ?>;
904
+ document.addEventListener("DOMContentLoaded", function(event) {
905
+ var $adminBarUpdates = document.querySelector( '#wp-admin-bar-updates .ab-label' ),
906
+ itemCount;
907
+
908
+ if (typeof($adminBarUpdates) !== 'undefined' && $adminBarUpdates !== null) {
909
+ itemCount = $adminBarUpdates.textContent;
910
+ itemCount = parseInt(itemCount);
911
+
912
+ itemCount -= mainwpCountHide;
913
+ if (itemCount < 0)
914
+ itemCount = 0;
915
+
916
+ $adminBarUpdates.textContent = itemCount;
917
+ }
918
+ });
919
+ </script><?php
920
+
921
+ }
922
+
923
+ public function in_admin_footer() {
924
+
925
+ $hide_slugs = apply_filters('mainwp_child_hide_update_notice' , array());
926
+
927
+ if (!is_array($hide_slugs))
928
+ $hide_slugs = array();
929
+
930
+ $count_hide = 0;
931
+
932
+ $updates = get_plugin_updates();
933
+ if (is_array($updates)) {
934
+ foreach($updates as $slug => $data) {
935
+ if (in_array($slug, $hide_slugs)) {
936
+ $count_hide++;
937
+ }
938
+ }
939
+ }
940
+
941
+ if ( $count_hide == 0) {
942
+ return;
943
+ }
944
+
945
+ // to tweaks counting of update notification display
946
+ // js for admin end
947
+ ?>
948
+ <script type="text/javascript">
949
+ var mainwpCountHide = <?php echo esc_attr($count_hide); ?>;
950
+ document.addEventListener("DOMContentLoaded", function(event) {
951
+ if (typeof(pagenow) !== 'undefined' && pagenow == 'plugins') {
952
+ <?php
953
+ // hide update notice row
954
+ if (in_array('mainwp-child/mainwp-child.php', $hide_slugs)) {
955
+ ?>
956
+ var el = document.querySelector('tr#mainwp-child-update');
957
+ if (typeof(el) !== 'undefined' && el !== null) {
958
+ el.style.display = 'none';
959
+ }
960
+ <?php
961
+ }
962
+ // hide update notice row
963
+ if (in_array('mainwp-child-reports/mainwp-child-reports.php', $hide_slugs)) {
964
+ ?>
965
+ var el = document.querySelector('tr#mainwp-child-reports-update');
966
+ if (typeof(el) !== 'undefined' && el !== null) {
967
+ el.style.display = 'none';
968
+ }
969
+ <?php
970
+ }
971
+ ?>
972
+ }
973
+
974
+ if (mainwpCountHide > 0) {
975
+ jQuery( document ).ready( function () {
976
+
977
+ var $adminBarUpdates = jQuery( '#wp-admin-bar-updates' ),
978
+ $pluginsNavMenuUpdateCount = jQuery( 'a[href="plugins.php"] .update-plugins' ),
979
+ itemCount;
980
+ itemCount = $adminBarUpdates.find( '.ab-label' ).text();
981
+ itemCount -= mainwpCountHide;
982
+ if (itemCount < 0)
983
+ itemCount = 0;
984
+
985
+ itemPCount = $pluginsNavMenuUpdateCount.find( '.plugin-count' ).text();
986
+ itemPCount -= mainwpCountHide;
987
+
988
+ if (itemPCount < 0)
989
+ itemPCount = 0;
990
+
991
+ $adminBarUpdates.find( '.ab-label' ).text(itemCount);
992
+ $pluginsNavMenuUpdateCount.find( '.plugin-count' ).text( itemPCount );
993
+
994
+ });
995
+ }
996
+ });
997
+ </script><?php
998
+ }
999
+
1000
  public function branding_map_meta_cap( $caps, $cap, $user_id, $args ) {
1001
 
1002
  // this is causing of some plugin's menu not added
1035
  }
1036
  }
1037
 
1038
+ function hide_update_notice( $slugs ) {
1039
+ $slugs[] = 'mainwp-child/mainwp-child.php';
1040
+ return $slugs;
1041
+ }
1042
+
1043
+
1044
+ function remove_update_nag( $value ) {
1045
+ if ( isset( $_POST['mainwpsignature'] ) ) {
1046
+ return $value;
1047
+ }
1048
+
1049
+ if (! MainWP_Helper::is_screen_with_update()) {
1050
+ return $value;
1051
+ }
1052
+
1053
+ if ( isset( $value->response['mainwp-child/mainwp-child.php'] ) ) {
1054
+ unset( $value->response['mainwp-child/mainwp-child.php'] );
1055
+ }
1056
+ return $value;
1057
+ }
1058
 
1059
  public function update_child_header( $plugins, $header ) {
1060
  $plugin_key = '';
class/class-mainwp-child-server-information.php CHANGED
@@ -1250,7 +1250,8 @@ class MainWP_Child_Server_Information {
1250
  }
1251
 
1252
  protected static function getServerGetawayInterface() {
1253
- echo esc_html( $_SERVER['GATEWAY_INTERFACE'] );
 
1254
  }
1255
 
1256
  public static function getServerIP() {
1250
  }
1251
 
1252
  protected static function getServerGetawayInterface() {
1253
+ $gate = isset($_SERVER['GATEWAY_INTERFACE']) ? $_SERVER['GATEWAY_INTERFACE'] : '';
1254
+ echo esc_html( $gate );
1255
  }
1256
 
1257
  public static function getServerIP() {
class/class-mainwp-child-skeleton-key.php CHANGED
@@ -123,6 +123,9 @@ class MainWP_Child_Skeleton_Key {
123
 
124
  $full_url = add_query_arg( $get_args, get_site_url() . $url );
125
 
 
 
 
126
  $response = wp_remote_post( $full_url, $post_args );
127
 
128
  if ( is_wp_error( $response ) ) {
123
 
124
  $full_url = add_query_arg( $get_args, get_site_url() . $url );
125
 
126
+ global $mainWPChild;
127
+ add_filter( 'http_request_args', array( $mainWPChild, 'http_request_reject_unsafe_urls' ), 99, 2 );
128
+
129
  $response = wp_remote_post( $full_url, $post_args );
130
 
131
  if ( is_wp_error( $response ) ) {
class/class-mainwp-child-staging.php CHANGED
@@ -36,6 +36,7 @@ class MainWP_Child_Staging {
36
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
37
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
38
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
 
39
  }
40
  }
41
 
@@ -141,6 +142,7 @@ class MainWP_Child_Staging {
141
  'fileLimit',
142
  'batchSize',
143
  'cpuLoad',
 
144
  'disableAdminLogin',
145
  'querySRLimit',
146
  'maxFileSize',
@@ -393,10 +395,20 @@ class MainWP_Child_Staging {
393
  }
394
  }
395
 
 
 
 
 
 
396
  function remove_update_nag( $value ) {
397
  if ( isset( $_POST['mainwpsignature'] ) ) {
398
  return $value;
399
  }
 
 
 
 
 
400
  if ( isset( $value->response['wp-staging/wp-staging.php'] ) ) {
401
  unset( $value->response['wp-staging/wp-staging.php'] );
402
  }
36
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
37
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
38
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
39
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
40
  }
41
  }
42
 
142
  'fileLimit',
143
  'batchSize',
144
  'cpuLoad',
145
+ 'delayRequests',
146
  'disableAdminLogin',
147
  'querySRLimit',
148
  'maxFileSize',
395
  }
396
  }
397
 
398
+ function hide_update_notice( $slugs ) {
399
+ $slugs[] = 'wp-staging/wp-staging.php';
400
+ return $slugs;
401
+ }
402
+
403
  function remove_update_nag( $value ) {
404
  if ( isset( $_POST['mainwpsignature'] ) ) {
405
  return $value;
406
  }
407
+
408
+ if (! MainWP_Helper::is_screen_with_update()) {
409
+ return $value;
410
+ }
411
+
412
  if ( isset( $value->response['wp-staging/wp-staging.php'] ) ) {
413
  unset( $value->response['wp-staging/wp-staging.php'] );
414
  }
class/class-mainwp-child-timecapsule.php CHANGED
@@ -38,6 +38,7 @@ class MainWP_Child_Timecapsule {
38
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
39
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
40
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
 
41
  }
42
  }
43
 
@@ -1243,10 +1244,18 @@ function get_sibling_files_callback_wptc() {
1243
  }
1244
  }
1245
 
 
 
 
 
 
1246
  function remove_update_nag( $value ) {
1247
  if ( isset( $_POST['mainwpsignature'] ) ) {
1248
  return $value;
1249
  }
 
 
 
1250
  if ( isset( $value->response['wp-time-capsule/wp-time-capsule.php'] ) ) {
1251
  unset( $value->response['wp-time-capsule/wp-time-capsule.php'] );
1252
  }
38
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
39
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
40
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
41
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
42
  }
43
  }
44
 
1244
  }
1245
  }
1246
 
1247
+ function hide_update_notice( $slugs ) {
1248
+ $slugs[] = 'wp-time-capsule/wp-time-capsule.php';
1249
+ return $slugs;
1250
+ }
1251
+
1252
  function remove_update_nag( $value ) {
1253
  if ( isset( $_POST['mainwpsignature'] ) ) {
1254
  return $value;
1255
  }
1256
+ if (! MainWP_Helper::is_screen_with_update()) {
1257
+ return $value;
1258
+ }
1259
  if ( isset( $value->response['wp-time-capsule/wp-time-capsule.php'] ) ) {
1260
  unset( $value->response['wp-time-capsule/wp-time-capsule.php'] );
1261
  }
class/class-mainwp-child-updraft-plus-backups.php CHANGED
@@ -421,57 +421,60 @@ class MainWP_Child_Updraft_Plus_Backups {
421
  }
422
  UpdraftPlus_Options::update_updraft_option( $key, $opts );
423
  } else if ( 'updraft_googledrive' === $key ) {
424
- $opts = UpdraftPlus_Options::get_updraft_option( 'updraft_googledrive' );
425
- if (!is_array($opts))
426
- $opts = array();
427
- if(is_array($opts) && isset($opts['settings'])) {
428
- $settings_key = key($opts['settings']);
429
- // $opts['settings'][$settings_key]['clientid'] = $settings[ $key ]['clientid'];
430
- // $opts['settings'][$settings_key]['secret'] = $settings[ $key ]['secret'];
431
- $opts['settings'][$settings_key]['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
432
- } else {
433
- // $opts['clientid'] = $settings[ $key ]['clientid'];
434
- // $opts['secret'] = $settings[ $key ]['secret'];
435
- $opts['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
436
- }
437
- UpdraftPlus_Options::update_updraft_option( $key, $opts );
 
438
  } else if ( 'updraft_googlecloud' === $key ) {
439
- $opts = UpdraftPlus_Options::get_updraft_option( $key );
440
- if (!is_array($opts))
441
- $opts = array();
442
- if(is_array($opts) && isset($opts['settings'])) {
443
- $settings_key = key($opts['settings']);
444
- // $opts['settings'][$settings_key]['clientid'] = $settings[ $key ]['clientid'];
445
- // $opts['settings'][$settings_key]['secret'] = $settings[ $key ]['secret'];
446
- // $opts['settings'][$settings_key]['project_id'] = $settings[ $key ]['project_id'];
447
- // $opts['settings'][$settings_key]['bucket_path'] = $settings[ $key ]['bucket_path'];
448
- $opts['settings'][$settings_key]['storage_class'] = $settings[ $key ]['storage_class'];
449
- $opts['settings'][$settings_key]['bucket_location'] = $settings[ $key ]['bucket_location'];
450
- } else {
451
- // $opts['clientid'] = $settings[ $key ]['clientid'];
452
- // $opts['secret'] = $settings[ $key ]['secret'];
453
- // $opts['project_id'] = $settings[ $key ]['project_id'];
454
- // $opts['bucket_path'] = $settings[ $key ]['bucket_path'];
455
- $opts['storage_class'] = $settings[ $key ]['storage_class'];
456
- $opts['bucket_location'] = $settings[ $key ]['bucket_location'];
457
- }
458
- UpdraftPlus_Options::update_updraft_option( $key, $opts );
 
459
  } else if ( 'updraft_onedrive' === $key ) {
460
- $opts = UpdraftPlus_Options::get_updraft_option( 'updraft_onedrive' );
461
- if (!is_array($opts))
462
- $opts = array();
463
- if(is_array($opts) && isset($opts['settings'])) {
464
- $settings_key = key($opts['settings']);
465
- // $opts['settings'][$settings_key]['clientid'] = $settings[ $key ]['clientid'];
466
- // $opts['settings'][$settings_key]['secret'] = $settings[ $key ]['secret'];
467
- $opts['settings'][$settings_key]['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
468
- } else {
469
- // $opts['clientid'] = $settings[ $key ]['clientid'];
470
- // $opts['secret'] = $settings[ $key ]['secret'];
471
- $opts['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
472
- }
473
-
474
- UpdraftPlus_Options::update_updraft_option( $key, $opts );
 
475
  } else if ( 'updraft_email' === $key ) {
476
  $value = $settings[ $key ];
477
  // free version
@@ -600,10 +603,10 @@ class MainWP_Child_Updraft_Plus_Backups {
600
 
601
  if(is_array($opts) && isset($opts['settings'])) {
602
  $settings_key = key($opts['settings']);
603
- $opts['settings'][$settings_key]['url'] = $settings[ $key ]['url'];
604
  UpdraftPlus_Options::update_updraft_option( 'updraft_webdav', $opts );
605
  }
606
-
607
  } else if ( 'updraft_backblaze' === $key ) {
608
  $opts = UpdraftPlus_Options::get_updraft_option( 'updraft_backblaze' );
609
  if (!is_array($opts))
@@ -612,8 +615,14 @@ class MainWP_Child_Updraft_Plus_Backups {
612
  $settings_key = key($opts['settings']);
613
  $opts['settings'][$settings_key]['account_id'] = $settings[ $key ]['account_id'];
614
  $opts['settings'][$settings_key]['key'] = $settings[ $key ]['key'];
615
- $opts['settings'][$settings_key]['bucket_name'] = $this->replace_tokens( $settings[ $key ]['bucket_name'] );
616
- $opts['settings'][$settings_key]['backup_path'] = $this->replace_tokens( $settings[ $key ]['backup_path'] );
 
 
 
 
 
 
617
  UpdraftPlus_Options::update_updraft_option( $key, $opts );
618
  }
619
  } else {
@@ -899,7 +908,8 @@ class MainWP_Child_Updraft_Plus_Backups {
899
  'm' => '<strong>' . __( 'Start backup', 'updraftplus' ) . ':</strong> ' . htmlspecialchars( __( 'OK. You should soon see activity in the "Last log message" field below.', 'updraftplus' ) ),
900
  );
901
 
902
- $this->close_browser_connection( $msg );
 
903
 
904
  $options = array( 'nocloud' => $backupnow_nocloud, 'use_nonce' => $nonce );
905
  if ( ! empty( $_REQUEST['onlythisfileentity'] ) && is_string( $_REQUEST['onlythisfileentity'] ) ) {
@@ -910,6 +920,8 @@ class MainWP_Child_Updraft_Plus_Backups {
910
 
911
  do_action( $event, apply_filters( 'updraft_backupnow_options', $options, array() ) );
912
 
 
 
913
  // not used anymore
914
  // if (wp_schedule_single_event(time()+5, $event, array($backupnow_nocloud)) === false) {
915
  // $updraftplus->log("A backup run failed to schedule");
@@ -920,9 +932,9 @@ class MainWP_Child_Updraft_Plus_Backups {
920
  // //echo htmlspecialchars(__('OK. You should soon see activity in the "Last log message" field below.','updraftplus'))." <a href=\"http://updraftplus.com/faqs/my-scheduled-backups-and-pressing-backup-now-does-nothing-however-pressing-debug-backup-does-produce-a-backup/\"><br>".__('Nothing happening? Follow this link for help.','updraftplus')."</a></div>";
921
  // $updraftplus->log("A backup run has been scheduled");
922
  // }
923
- $out = array( 'result' => 'OK' );
924
-
925
- return $out;
926
  }
927
 
928
  function activejobs_list() {
@@ -3926,6 +3938,7 @@ ENDHERE;
3926
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
3927
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
3928
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
 
3929
  add_action( 'wp_before_admin_bar_render', array( $this, 'wp_before_admin_bar_render' ), 99 );
3930
  add_action( 'admin_init', array( $this, 'remove_notices' ) );
3931
  }
@@ -3972,10 +3985,19 @@ ENDHERE;
3972
  }
3973
  }
3974
 
 
 
 
 
 
3975
  function remove_update_nag( $value ) {
3976
  if ( isset( $_POST['mainwpsignature'] ) ) {
3977
  return $value;
3978
  }
 
 
 
 
3979
  if ( isset( $value->response['updraftplus/updraftplus.php'] ) ) {
3980
  unset( $value->response['updraftplus/updraftplus.php'] );
3981
  }
421
  }
422
  UpdraftPlus_Options::update_updraft_option( $key, $opts );
423
  } else if ( 'updraft_googledrive' === $key ) {
424
+ // do not saving from dashboard
425
+ // $opts = UpdraftPlus_Options::get_updraft_option( 'updraft_googledrive' );
426
+ // if (!is_array($opts))
427
+ // $opts = array();
428
+ // if(is_array($opts) && isset($opts['settings'])) {
429
+ // $settings_key = key($opts['settings']);
430
+ //// $opts['settings'][$settings_key]['clientid'] = $settings[ $key ]['clientid'];
431
+ //// $opts['settings'][$settings_key]['secret'] = $settings[ $key ]['secret'];
432
+ // $opts['settings'][$settings_key]['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
433
+ // } else {
434
+ //// $opts['clientid'] = $settings[ $key ]['clientid'];
435
+ //// $opts['secret'] = $settings[ $key ]['secret'];
436
+ // $opts['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
437
+ // }
438
+ // UpdraftPlus_Options::update_updraft_option( $key, $opts );
439
  } else if ( 'updraft_googlecloud' === $key ) {
440
+ // do not saving from dashboard
441
+ // $opts = UpdraftPlus_Options::get_updraft_option( $key );
442
+ // if (!is_array($opts))
443
+ // $opts = array();
444
+ // if(is_array($opts) && isset($opts['settings'])) {
445
+ // $settings_key = key($opts['settings']);
446
+ //// $opts['settings'][$settings_key]['clientid'] = $settings[ $key ]['clientid'];
447
+ //// $opts['settings'][$settings_key]['secret'] = $settings[ $key ]['secret'];
448
+ //// $opts['settings'][$settings_key]['project_id'] = $settings[ $key ]['project_id'];
449
+ //// $opts['settings'][$settings_key]['bucket_path'] = $settings[ $key ]['bucket_path'];
450
+ // $opts['settings'][$settings_key]['storage_class'] = $settings[ $key ]['storage_class'];
451
+ // $opts['settings'][$settings_key]['bucket_location'] = $settings[ $key ]['bucket_location'];
452
+ // } else {
453
+ //// $opts['clientid'] = $settings[ $key ]['clientid'];
454
+ //// $opts['secret'] = $settings[ $key ]['secret'];
455
+ //// $opts['project_id'] = $settings[ $key ]['project_id'];
456
+ //// $opts['bucket_path'] = $settings[ $key ]['bucket_path'];
457
+ // $opts['storage_class'] = $settings[ $key ]['storage_class'];
458
+ // $opts['bucket_location'] = $settings[ $key ]['bucket_location'];
459
+ // }
460
+ // UpdraftPlus_Options::update_updraft_option( $key, $opts );
461
  } else if ( 'updraft_onedrive' === $key ) {
462
+ // do not saving from dashboard
463
+ // $opts = UpdraftPlus_Options::get_updraft_option( 'updraft_onedrive' );
464
+ // if (!is_array($opts))
465
+ // $opts = array();
466
+ // if(is_array($opts) && isset($opts['settings'])) {
467
+ // $settings_key = key($opts['settings']);
468
+ //// $opts['settings'][$settings_key]['clientid'] = $settings[ $key ]['clientid'];
469
+ //// $opts['settings'][$settings_key]['secret'] = $settings[ $key ]['secret'];
470
+ // $opts['settings'][$settings_key]['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
471
+ // } else {
472
+ //// $opts['clientid'] = $settings[ $key ]['clientid'];
473
+ //// $opts['secret'] = $settings[ $key ]['secret'];
474
+ // $opts['folder'] = $this->replace_tokens($settings[ $key ]['folder']);
475
+ // }
476
+ //
477
+ // UpdraftPlus_Options::update_updraft_option( $key, $opts );
478
  } else if ( 'updraft_email' === $key ) {
479
  $value = $settings[ $key ];
480
  // free version
603
 
604
  if(is_array($opts) && isset($opts['settings'])) {
605
  $settings_key = key($opts['settings']);
606
+ $opts['settings'][$settings_key]['url'] = $this->replace_tokens( $settings[ $key ]['url'] );
607
  UpdraftPlus_Options::update_updraft_option( 'updraft_webdav', $opts );
608
  }
609
+
610
  } else if ( 'updraft_backblaze' === $key ) {
611
  $opts = UpdraftPlus_Options::get_updraft_option( 'updraft_backblaze' );
612
  if (!is_array($opts))
615
  $settings_key = key($opts['settings']);
616
  $opts['settings'][$settings_key]['account_id'] = $settings[ $key ]['account_id'];
617
  $opts['settings'][$settings_key]['key'] = $settings[ $key ]['key'];
618
+ $bname = $this->replace_tokens( $settings[ $key ]['bucket_name'] );
619
+ $bpath = $this->replace_tokens( $settings[ $key ]['backup_path'] );
620
+ $bname = str_replace('.', '-', $bname);
621
+ $bpath = str_replace('.', '-', $bpath);
622
+ $bname = str_replace('_', '', $bname); // to fix strange character
623
+ $bpath = str_replace('_', '', $bpath);
624
+ $opts['settings'][$settings_key]['bucket_name'] = $bname;
625
+ $opts['settings'][$settings_key]['backup_path'] = $bpath;
626
  UpdraftPlus_Options::update_updraft_option( $key, $opts );
627
  }
628
  } else {
908
  'm' => '<strong>' . __( 'Start backup', 'updraftplus' ) . ':</strong> ' . htmlspecialchars( __( 'OK. You should soon see activity in the "Last log message" field below.', 'updraftplus' ) ),
909
  );
910
 
911
+ // to fix issue for some site
912
+ //$this->close_browser_connection( $msg );
913
 
914
  $options = array( 'nocloud' => $backupnow_nocloud, 'use_nonce' => $nonce );
915
  if ( ! empty( $_REQUEST['onlythisfileentity'] ) && is_string( $_REQUEST['onlythisfileentity'] ) ) {
920
 
921
  do_action( $event, apply_filters( 'updraft_backupnow_options', $options, array() ) );
922
 
923
+ return $msg;
924
+
925
  // not used anymore
926
  // if (wp_schedule_single_event(time()+5, $event, array($backupnow_nocloud)) === false) {
927
  // $updraftplus->log("A backup run failed to schedule");
932
  // //echo htmlspecialchars(__('OK. You should soon see activity in the "Last log message" field below.','updraftplus'))." <a href=\"http://updraftplus.com/faqs/my-scheduled-backups-and-pressing-backup-now-does-nothing-however-pressing-debug-backup-does-produce-a-backup/\"><br>".__('Nothing happening? Follow this link for help.','updraftplus')."</a></div>";
933
  // $updraftplus->log("A backup run has been scheduled");
934
  // }
935
+ // $out = array( 'result' => 'OK' );
936
+ //
937
+ // return $out;
938
  }
939
 
940
  function activejobs_list() {
3938
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
3939
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
3940
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
3941
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
3942
  add_action( 'wp_before_admin_bar_render', array( $this, 'wp_before_admin_bar_render' ), 99 );
3943
  add_action( 'admin_init', array( $this, 'remove_notices' ) );
3944
  }
3985
  }
3986
  }
3987
 
3988
+ function hide_update_notice( $slugs ) {
3989
+ $slugs[] = 'updraftplus/updraftplus.php';
3990
+ return $slugs;
3991
+ }
3992
+
3993
  function remove_update_nag( $value ) {
3994
  if ( isset( $_POST['mainwpsignature'] ) ) {
3995
  return $value;
3996
  }
3997
+ if (! MainWP_Helper::is_screen_with_update()) {
3998
+ return $value;
3999
+ }
4000
+
4001
  if ( isset( $value->response['updraftplus/updraftplus.php'] ) ) {
4002
  unset( $value->response['updraftplus/updraftplus.php'] );
4003
  }
class/class-mainwp-child-wordfence.php CHANGED
@@ -666,33 +666,35 @@ class MainWP_Child_Wordfence {
666
  $lastcheck = time() - 3600 * 24 * 10; // check 10 days ago
667
  }
668
 
669
- $status_table = $wpdb->base_prefix . 'wfStatus';
 
670
  // to fix prepare sql empty
671
- $sql = sprintf( "SELECT * FROM {$status_table} WHERE ctime >= %d AND level = 1 AND type = 'info' AND msg LIKE ", $lastcheck );
672
- $sql .= " 'Scan Complete. %';";
673
  $rows = MainWP_Child_DB::_query( $sql, $wpdb->dbh );
674
 
 
675
  if ( $rows ) {
676
  while ( $row = MainWP_Child_DB::fetch_array( $rows ) ) {
677
- $message = "Wordfence scan completed";
678
- $scan_time = $row['ctime'];
 
679
 
680
- $sql = sprintf( "SELECT * FROM {$status_table} WHERE ctime > %d AND ctime < %d AND level = 10 AND type = 'info' AND msg LIKE ", $scan_time, $scan_time + 100 ); // to get nearest SUM_FINAL msg
 
 
 
681
  $sql .= " 'SUM_FINAL:Scan complete.%';";
 
682
  $sum_rows = MainWP_Child_DB::_query( $sql, $wpdb->dbh );
683
  $result = '';
684
  if ($sum_rows) {
685
  $sum_row = MainWP_Child_DB::fetch_array( $sum_rows );
686
  if (is_array($sum_row) && isset($sum_row['msg'])) {
687
- if ( false !== strpos( $sum_row['msg'], 'Congratulations, no problems found' ) ) {
688
- $result = 'No issues detected';
689
- } else {
690
- $result = 'Issues Detected';
691
- }
692
  }
693
  }
694
- $details = $row['msg'];
695
- do_action( 'mainwp_reports_wordfence_scan', $message, $scan_time, $details, $result );
696
  }
697
  }
698
 
@@ -830,10 +832,11 @@ class MainWP_Child_Wordfence {
830
 
831
  public function count_attacks_blocked($maxAgeDays) {
832
  global $wpdb;
 
833
  $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval ' . $maxAgeDays . ' day)) / 86400)';
834
  return $wpdb->get_var(<<<SQL
835
  SELECT SUM(blockCount) as blockCount
836
- FROM {$wpdb->prefix}wfBlockedIPLog
837
  WHERE unixday >= {$interval}
838
  SQL
839
  );
@@ -841,10 +844,9 @@ SQL
841
 
842
 
843
  function get_lastscan() {
844
- global $wpdb;
845
  $wfdb = new wfDB();
846
- $p = $wpdb->base_prefix;
847
- $ctime = $wfdb->querySingle("SELECT MAX(ctime) FROM $p"."wfStatus WHERE msg LIKE '%SUM_PREP:Preparing a new scan.%'");
848
  return $ctime;
849
  }
850
 
@@ -1145,9 +1147,8 @@ SQL
1145
  if (in_array('other_WFNet', $saving_opts)) {
1146
  if ( ! $opts['other_WFNet'] ) {
1147
  $wfdb = new wfDB();
1148
- global $wpdb;
1149
- $p = $wpdb->base_prefix;
1150
- $wfdb->queryWrite( "delete from $p" . 'wfBlocks where wfsn=1 and permanent=0' );
1151
  }
1152
  }
1153
 
@@ -1158,7 +1159,7 @@ SQL
1158
  $regenerateHtaccess = true;
1159
  }
1160
  }
1161
- //error_log(print_r($opts, true));
1162
  // $to_fix_boolean_values = array(
1163
  // 'scansEnabled_checkGSB',
1164
  // 'spamvertizeCheck',
@@ -1372,9 +1373,8 @@ SQL
1372
 
1373
  if ( ! $opts['other_WFNet'] ) {
1374
  $wfdb = new wfDB();
1375
- global $wpdb;
1376
- $p = $wpdb->base_prefix;
1377
- $wfdb->queryWrite( "delete from $p" . 'wfBlocks where wfsn=1 and permanent=0' );
1378
  }
1379
 
1380
  $regenerateHtaccess = false;
@@ -1493,51 +1493,109 @@ SQL
1493
  }
1494
 
1495
  public function export_settings(){
1496
- /** @var wpdb $wpdb */
1497
- global $wpdb;
1498
 
 
 
 
 
1499
  $keys = wfConfig::getExportableOptionsKeys();
1500
- $export = array();
1501
- foreach($keys as $key){
1502
  $export[$key] = wfConfig::get($key, '');
1503
  }
1504
- $export['scanScheduleJSON'] = json_encode(wfConfig::get_ser('scanSched', array()));
1505
- $export['schedMode'] = wfConfig::get('schedMode', '');
1506
 
1507
- // Any user supplied blocked IPs.
1508
- $export['_blockedIPs'] = $wpdb->get_results('SELECT *, HEX(IP) as IP FROM ' . $wpdb->base_prefix . 'wfBlocks WHERE wfsn = 0 AND permanent = 1');
1509
 
1510
- // Any advanced blocking stuff too.
1511
- $export['_advancedBlocking'] = $wpdb->get_results('SELECT * FROM ' . $wpdb->base_prefix . 'wfBlocksAdv');
1512
 
 
1513
  try {
1514
  $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion());
1515
- $res = $api->call('export_options', array(), $export);
1516
- if($res['ok'] && $res['token']){
1517
  return array(
1518
  'ok' => 1,
1519
  'token' => $res['token'],
1520
  );
1521
- } else {
1522
- throw new Exception("Invalid response: " . var_export($res, true));
1523
  }
1524
- } catch(Exception $e){
1525
- return array('errorExport' => "An error occurred: " . $e->getMessage());
 
 
 
 
 
 
 
1526
  }
1527
  }
1528
 
1529
  public function import_settings(){
1530
  $token = $_POST['token'];
1531
- try {
1532
- $totalSet = wordfence::importSettings($token);
1533
- return array(
1534
- 'ok' => 1,
1535
- 'totalSet' => $totalSet,
1536
- 'settings' => $this->get_settings()
1537
- );
1538
- } catch(Exception $e){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1539
  return array('errorImport' => "An error occurred: " . $e->getMessage());
1540
  }
 
1541
  }
1542
 
1543
  function get_settings() {
@@ -1553,15 +1611,15 @@ SQL
1553
 
1554
  function ticker() {
1555
  $wfdb = new wfDB();
1556
- global $wpdb;
1557
- $p = $wpdb->base_prefix;
1558
 
1559
  $serverTime = $wfdb->querySingle( 'select unix_timestamp()' );
1560
 
 
 
1561
  $jsonData = array(
1562
  'serverTime' => $serverTime,
1563
- 'serverMicrotime' => microtime(true),
1564
- 'msg' => $wfdb->querySingle( "select msg from $p" . 'wfStatus where level < 3 order by ctime desc limit 1' ),
1565
  );
1566
 
1567
  $events = array();
666
  $lastcheck = time() - 3600 * 24 * 10; // check 10 days ago
667
  }
668
 
669
+ $table_wfStatus = wfDB::networkTable('wfStatus');
670
+
671
  // to fix prepare sql empty
672
+ $sql = sprintf( "SELECT * FROM {$table_wfStatus} WHERE ctime >= %d AND level = 1 AND type = 'info' AND msg LIKE ", $lastcheck );
673
+ $sql .= " 'Scan Complete.%';";
674
  $rows = MainWP_Child_DB::_query( $sql, $wpdb->dbh );
675
 
676
+ $scan_time = array();
677
  if ( $rows ) {
678
  while ( $row = MainWP_Child_DB::fetch_array( $rows ) ) {
679
+ $scan_time[$row['ctime']] = $row['msg'];
680
+ }
681
+ }
682
 
683
+ if ($scan_time) {
684
+ $message = "Wordfence scan completed";
685
+ foreach($scan_time as $ctime => $details) {
686
+ $sql = sprintf( "SELECT * FROM {$table_wfStatus} WHERE ctime > %d AND ctime < %d AND level = 10 AND type = 'info' AND msg LIKE ", $ctime, $ctime + 100 ); // to get nearest SUM_FINAL msg
687
  $sql .= " 'SUM_FINAL:Scan complete.%';";
688
+
689
  $sum_rows = MainWP_Child_DB::_query( $sql, $wpdb->dbh );
690
  $result = '';
691
  if ($sum_rows) {
692
  $sum_row = MainWP_Child_DB::fetch_array( $sum_rows );
693
  if (is_array($sum_row) && isset($sum_row['msg'])) {
694
+ $result = $sum_row['msg'];
 
 
 
 
695
  }
696
  }
697
+ do_action( 'mainwp_reports_wordfence_scan', $message, $ctime, $details, $result );
 
698
  }
699
  }
700
 
832
 
833
  public function count_attacks_blocked($maxAgeDays) {
834
  global $wpdb;
835
+ $table_wfBlockedIPLog = wfDB::networkTable('wfBlockedIPLog');
836
  $interval = 'FLOOR(UNIX_TIMESTAMP(DATE_SUB(NOW(), interval ' . $maxAgeDays . ' day)) / 86400)';
837
  return $wpdb->get_var(<<<SQL
838
  SELECT SUM(blockCount) as blockCount
839
+ FROM {$table_wfBlockedIPLog}
840
  WHERE unixday >= {$interval}
841
  SQL
842
  );
844
 
845
 
846
  function get_lastscan() {
 
847
  $wfdb = new wfDB();
848
+ $table_wfStatus = wfDB::networkTable('wfStatus');
849
+ $ctime = $wfdb->querySingle("SELECT MAX(ctime) FROM {$table_wfStatus} WHERE msg LIKE '%SUM_PREP:Preparing a new scan.%'");
850
  return $ctime;
851
  }
852
 
1147
  if (in_array('other_WFNet', $saving_opts)) {
1148
  if ( ! $opts['other_WFNet'] ) {
1149
  $wfdb = new wfDB();
1150
+ $table_wfBlocks7 = wfDB::networkTable('wfBlocks7');
1151
+ $wfdb->queryWrite( "delete from {$table_wfBlocks7} where wfsn=1 and permanent=0" );
 
1152
  }
1153
  }
1154
 
1159
  $regenerateHtaccess = true;
1160
  }
1161
  }
1162
+
1163
  // $to_fix_boolean_values = array(
1164
  // 'scansEnabled_checkGSB',
1165
  // 'spamvertizeCheck',
1373
 
1374
  if ( ! $opts['other_WFNet'] ) {
1375
  $wfdb = new wfDB();
1376
+ $table_wfBlocks7 = wfDB::networkTable('wfBlocks7');
1377
+ $wfdb->queryWrite( "delete from {$table_wfBlocks7} where wfsn=1 and permanent=0" );
 
1378
  }
1379
 
1380
  $regenerateHtaccess = false;
1493
  }
1494
 
1495
  public function export_settings(){
 
 
1496
 
1497
+
1498
+ $export = array();
1499
+
1500
+ //Basic Options
1501
  $keys = wfConfig::getExportableOptionsKeys();
1502
+ foreach ($keys as $key) {
 
1503
  $export[$key] = wfConfig::get($key, '');
1504
  }
 
 
1505
 
1506
+ //Serialized Options
1507
+ $export['scanSched'] = wfConfig::get_ser('scanSched', array());
1508
 
1509
+ //Table-based Options
1510
+ $export['blocks'] = wfBlock::exportBlocks();
1511
 
1512
+ //Make the API call
1513
  try {
1514
  $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion());
1515
+ $res = $api->call('export_options', array(), array('export' => json_encode($export)));
1516
+ if ($res['ok'] && $res['token']) {
1517
  return array(
1518
  'ok' => 1,
1519
  'token' => $res['token'],
1520
  );
 
 
1521
  }
1522
+ else if ($res['err']) {
1523
+ return array('errorExport' => __("An error occurred: ", 'wordfence') . $res['err']);
1524
+ }
1525
+ else {
1526
+ throw new Exception(__("Invalid response: ", 'wordfence') . var_export($res, true));
1527
+ }
1528
+ }
1529
+ catch (Exception $e) {
1530
+ return array('errorExport' => __("An error occurred: ", 'wordfence') . $e->getMessage());
1531
  }
1532
  }
1533
 
1534
  public function import_settings(){
1535
  $token = $_POST['token'];
1536
+ try {
1537
+ $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion());
1538
+ $res = $api->call('import_options', array(), array('token' => $token));
1539
+ if ($res['ok'] && $res['export']) {
1540
+ $totalSet = 0;
1541
+ $import = @json_decode($res['export'], true);
1542
+ if (!is_array($import)) {
1543
+ return array('errorImport' => __("An error occurred: Invalid options format received.", 'wordfence'));
1544
+ }
1545
+
1546
+ //Basic Options
1547
+ $keys = wfConfig::getExportableOptionsKeys();
1548
+ $toSet = array();
1549
+ foreach ($keys as $key) {
1550
+ if (isset($import[$key])) {
1551
+ $toSet[$key] = $import[$key];
1552
+ }
1553
+ }
1554
+
1555
+ if (count($toSet)) {
1556
+ $validation = wfConfig::validate($toSet);
1557
+ $skipped = array();
1558
+ if ($validation !== true) {
1559
+ foreach ($validation as $error) {
1560
+ $skipped[$error['option']] = $error['error'];
1561
+ unset($toSet[$error['option']]);
1562
+ }
1563
+ }
1564
+
1565
+ $totalSet += count($toSet);
1566
+ wfConfig::save(wfConfig::clean($toSet));
1567
+ }
1568
+
1569
+ //Serialized Options
1570
+ if (isset($import['scanSched']) && is_array($import['scanSched'])) {
1571
+ wfConfig::set_ser('scanSched', $import['scanSched']);
1572
+ wfScanner::shared()->scheduleScans();
1573
+ $totalSet++;
1574
+ }
1575
+
1576
+ //Table-based Options
1577
+ if (isset($import['blocks']) && is_array($import['blocks'])) {
1578
+ wfBlock::importBlocks($import['blocks']);
1579
+ $totalSet += count($import['blocks']);
1580
+ }
1581
+
1582
+ return array(
1583
+ 'ok' => 1,
1584
+ 'totalSet' => $totalSet,
1585
+ 'settings' => $this->get_settings()
1586
+ );
1587
+ }
1588
+ else if ($res['err']) {
1589
+ return array('errorImport' => "An error occurred: " . $res['err']);
1590
+ }
1591
+ else {
1592
+ throw new Exception("Invalid response: " . var_export($res, true));
1593
+ }
1594
+ }
1595
+ catch (Exception $e) {
1596
  return array('errorImport' => "An error occurred: " . $e->getMessage());
1597
  }
1598
+
1599
  }
1600
 
1601
  function get_settings() {
1611
 
1612
  function ticker() {
1613
  $wfdb = new wfDB();
 
 
1614
 
1615
  $serverTime = $wfdb->querySingle( 'select unix_timestamp()' );
1616
 
1617
+ $table_wfStatus = wfDB::networkTable('wfStatus');
1618
+
1619
  $jsonData = array(
1620
  'serverTime' => $serverTime,
1621
+ 'serverMicrotime' => microtime(true),
1622
+ 'msg' => $wfdb->querySingle( "select msg from {$table_wfStatus} where level < 3 order by ctime desc limit 1" ),
1623
  );
1624
 
1625
  $events = array();
class/class-mainwp-child-wp-rocket.php CHANGED
@@ -12,7 +12,7 @@ class MainWP_Child_WP_Rocket {
12
  }
13
 
14
  public function __construct() {
15
-
16
  }
17
 
18
  public function init() {
@@ -21,25 +21,26 @@ class MainWP_Child_WP_Rocket {
21
  }
22
 
23
  add_filter( 'mainwp-site-sync-others-data', array( $this, 'syncOthersData' ), 10, 2 );
24
-
25
  if ( get_option( 'mainwp_wprocket_hide_plugin' ) === 'hide' ) {
26
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
27
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
28
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
 
29
  add_action( 'wp_before_admin_bar_render', array( $this, 'wp_before_admin_bar_render' ), 99 );
30
  add_action( 'admin_init', array( $this, 'remove_notices' ) );
31
  }
32
  }
33
-
34
  // ok
35
- public function syncOthersData( $information, $data = array() ) {
36
- if ( isset( $data['syncWPRocketData'] ) && ( 'yes' === $data['syncWPRocketData'] ) ) {
37
  try{
38
- $data = array( 'rocket_boxes' => get_user_meta( $GLOBALS['current_user']->ID, 'rocket_boxes', true ));
39
- $information['syncWPRocketData'] = $data;
40
  } catch(Exception $e) {
41
  }
42
- }
43
  return $information;
44
  }
45
 
@@ -79,10 +80,20 @@ class MainWP_Child_WP_Rocket {
79
  }
80
  }
81
 
 
 
 
 
 
82
  function remove_update_nag( $value ) {
83
  if ( isset( $_POST['mainwpsignature'] ) ) {
84
  return $value;
85
  }
 
 
 
 
 
86
  if ( isset( $value->response['wp-rocket/wp-rocket.php'] ) ) {
87
  unset( $value->response['wp-rocket/wp-rocket.php'] );
88
  }
@@ -195,7 +206,7 @@ class MainWP_Child_WP_Rocket {
195
  }
196
  }
197
 
198
- function purge_cache_all() {
199
  if ( function_exists( 'rocket_clean_domain' ) || function_exists( 'rocket_clean_minify' ) || function_exists( 'create_rocket_uniqid' ) ) {
200
  set_transient( 'rocket_clear_cache', 'all', HOUR_IN_SECONDS );
201
  // Remove all cache files
@@ -208,7 +219,11 @@ class MainWP_Child_WP_Rocket {
208
  if ( function_exists( 'rocket_clean_cache_busting' )) {
209
  rocket_clean_cache_busting();
210
  }
211
-
 
 
 
 
212
  // Generate a new random key for minify cache file
213
  $options = get_option( WP_ROCKET_SLUG );
214
  $options['minify_css_key'] = create_rocket_uniqid();
@@ -248,7 +263,7 @@ class MainWP_Child_WP_Rocket {
248
  }
249
  }
250
  if (isset($_POST['do_database_optimization']) && !empty($_POST['do_database_optimization'])) {
251
- $_POST['wp_rocket_settings']['submit_optimize'] = 1; // simulate POST
252
  }
253
 
254
  update_option( WP_ROCKET_SLUG, $options );
@@ -328,7 +343,7 @@ class MainWP_Child_WP_Rocket {
328
  'deferred_js_files' => array(),
329
  'lazyload' => 0,
330
  'lazyload_iframes' => 0,
331
- 'lazyload_youtube' =>0,
332
  'minify_css' => 0,
333
  // 'minify_css_key' => $minify_css_key,
334
  'minify_concatenate_css' => 0,
12
  }
13
 
14
  public function __construct() {
15
+
16
  }
17
 
18
  public function init() {
21
  }
22
 
23
  add_filter( 'mainwp-site-sync-others-data', array( $this, 'syncOthersData' ), 10, 2 );
24
+
25
  if ( get_option( 'mainwp_wprocket_hide_plugin' ) === 'hide' ) {
26
  add_filter( 'all_plugins', array( $this, 'all_plugins' ) );
27
  add_action( 'admin_menu', array( $this, 'remove_menu' ) );
28
  add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
29
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
30
  add_action( 'wp_before_admin_bar_render', array( $this, 'wp_before_admin_bar_render' ), 99 );
31
  add_action( 'admin_init', array( $this, 'remove_notices' ) );
32
  }
33
  }
34
+
35
  // ok
36
+ public function syncOthersData( $information, $data = array() ) {
37
+ if ( isset( $data['syncWPRocketData'] ) && ( 'yes' === $data['syncWPRocketData'] ) ) {
38
  try{
39
+ $data = array( 'rocket_boxes' => get_user_meta( $GLOBALS['current_user']->ID, 'rocket_boxes', true ));
40
+ $information['syncWPRocketData'] = $data;
41
  } catch(Exception $e) {
42
  }
43
+ }
44
  return $information;
45
  }
46
 
80
  }
81
  }
82
 
83
+ function hide_update_notice( $slugs ) {
84
+ $slugs[] = 'wp-rocket/wp-rocket.php';
85
+ return $slugs;
86
+ }
87
+
88
  function remove_update_nag( $value ) {
89
  if ( isset( $_POST['mainwpsignature'] ) ) {
90
  return $value;
91
  }
92
+
93
+ if (! MainWP_Helper::is_screen_with_update()) {
94
+ return $value;
95
+ }
96
+
97
  if ( isset( $value->response['wp-rocket/wp-rocket.php'] ) ) {
98
  unset( $value->response['wp-rocket/wp-rocket.php'] );
99
  }
206
  }
207
  }
208
 
209
+ function purge_cache_all() {
210
  if ( function_exists( 'rocket_clean_domain' ) || function_exists( 'rocket_clean_minify' ) || function_exists( 'create_rocket_uniqid' ) ) {
211
  set_transient( 'rocket_clear_cache', 'all', HOUR_IN_SECONDS );
212
  // Remove all cache files
219
  if ( function_exists( 'rocket_clean_cache_busting' )) {
220
  rocket_clean_cache_busting();
221
  }
222
+
223
+ if ( !function_exists( 'rocket_dismiss_boxes' ) && defined('WP_ROCKET_ADMIN_PATH')) {
224
+ require_once WP_ROCKET_ADMIN_PATH . 'admin.php';
225
+ }
226
+
227
  // Generate a new random key for minify cache file
228
  $options = get_option( WP_ROCKET_SLUG );
229
  $options['minify_css_key'] = create_rocket_uniqid();
263
  }
264
  }
265
  if (isset($_POST['do_database_optimization']) && !empty($_POST['do_database_optimization'])) {
266
+ $_POST['wp_rocket_settings']['submit_optimize'] = 1; // simulate POST
267
  }
268
 
269
  update_option( WP_ROCKET_SLUG, $options );
343
  'deferred_js_files' => array(),
344
  'lazyload' => 0,
345
  'lazyload_iframes' => 0,
346
+ 'lazyload_youtube' =>0,
347
  'minify_css' => 0,
348
  // 'minify_css_key' => $minify_css_key,
349
  'minify_concatenate_css' => 0,
class/class-mainwp-child.php CHANGED
@@ -57,6 +57,14 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
57
  }
58
 
59
  if ( empty( $nonce ) ) {
 
 
 
 
 
 
 
 
60
  // to help tracing the conflict verify nonce with other plugins
61
  @ob_start();
62
  @debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
@@ -64,8 +72,8 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
64
  die( '<mainwp>' . base64_encode( json_encode( array( 'error' => 'You dont send nonce: ' . $action . '<br/>Trace: ' .$stackTrace) ) ) . '</mainwp>' );
65
  }
66
 
67
- // To fix verify nonce conflict #1
68
- // this is fake nonce to fix some conflict of wp_verify_nonce
69
  // just return false to unverify nonce, does not exit
70
  if ($nonce == 'mainwp-bsm-unverify-nonce') {
71
  return false;
@@ -87,8 +95,8 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
87
  return 2;
88
  }
89
 
90
- // To fix verify nonce conflict #2
91
- // this is fake post field to fix some conflict of wp_verify_nonce
92
  // just return false to unverify nonce, does not exit
93
  if ( isset($_POST[$action]) && ($_POST[$action] == 'mainwp-bsm-unverify-nonce')) {
94
  return false;
@@ -107,7 +115,7 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
107
  }
108
 
109
  class MainWP_Child {
110
- public static $version = '3.5.2';
111
  private $update_version = '1.3';
112
 
113
  private $callableFunctions = array(
@@ -1344,8 +1352,8 @@ class MainWP_Child {
1344
  exit();
1345
  }
1346
 
1347
- remove_action( 'admin_init', 'send_frame_options_header' );
1348
- remove_action( 'login_init', 'send_frame_options_header' );
1349
 
1350
  // Call Heatmap
1351
  if ( 'yes' === get_option( 'heatMapExtensionLoaded' ) ) {
@@ -3729,7 +3737,7 @@ class MainWP_Child {
3729
  }
3730
  $information['categories'] = $categories;
3731
  $get_file_size = apply_filters('mainwp-child-get-total-size', true);
3732
- if ($get_file_size) {
3733
  $max_exe = ini_get( 'max_execution_time' ); // to fix issue of some hosts have limit of execution time
3734
  if ($max_exe > 20) {
3735
  $information['totalsize'] = $this->getTotalFileSize();
57
  }
58
 
59
  if ( empty( $nonce ) ) {
60
+
61
+ // To fix verify nonce conflict #1
62
+ // this is fake post field to fix some conflict of wp_verify_nonce()
63
+ // just return false to unverify nonce, does not exit
64
+ if ( isset($_POST[$action]) && ($_POST[$action] == 'mainwp-bsm-unverify-nonce')) {
65
+ return false;
66
+ }
67
+
68
  // to help tracing the conflict verify nonce with other plugins
69
  @ob_start();
70
  @debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
72
  die( '<mainwp>' . base64_encode( json_encode( array( 'error' => 'You dont send nonce: ' . $action . '<br/>Trace: ' .$stackTrace) ) ) . '</mainwp>' );
73
  }
74
 
75
+ // To fix verify nonce conflict #2
76
+ // this is fake nonce to fix some conflict of wp_verify_nonce()
77
  // just return false to unverify nonce, does not exit
78
  if ($nonce == 'mainwp-bsm-unverify-nonce') {
79
  return false;
95
  return 2;
96
  }
97
 
98
+ // To fix verify nonce conflict #3
99
+ // this is fake post field to fix some conflict of wp_verify_nonce()
100
  // just return false to unverify nonce, does not exit
101
  if ( isset($_POST[$action]) && ($_POST[$action] == 'mainwp-bsm-unverify-nonce')) {
102
  return false;
115
  }
116
 
117
  class MainWP_Child {
118
+ public static $version = '3.5.3';
119
  private $update_version = '1.3';
120
 
121
  private $callableFunctions = array(
1352
  exit();
1353
  }
1354
 
1355
+ // remove_action( 'admin_init', 'send_frame_options_header' );
1356
+ // remove_action( 'login_init', 'send_frame_options_header' );
1357
 
1358
  // Call Heatmap
1359
  if ( 'yes' === get_option( 'heatMapExtensionLoaded' ) ) {
3737
  }
3738
  $information['categories'] = $categories;
3739
  $get_file_size = apply_filters('mainwp-child-get-total-size', true);
3740
+ if ( $get_file_size && isset( $_POST['cloneSites'] ) && ( '0' !== $_POST['cloneSites'] ) ) {
3741
  $max_exe = ini_get( 'max_execution_time' ); // to fix issue of some hosts have limit of execution time
3742
  if ($max_exe > 20) {
3743
  $information['totalsize'] = $this->getTotalFileSize();
class/class-mainwp-client-report.php CHANGED
@@ -439,6 +439,19 @@ class MainWP_Client_Report {
439
  }
440
  }
441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
  }
443
 
444
  $count ++;
@@ -716,7 +729,20 @@ class MainWP_Client_Report {
716
  case 'details':
717
  case 'result':
718
  if ( 'wordfence' === $context || 'maintenance' === $context ) {
719
- $token_values[ $token ] = $this->get_stream_meta_data( $record, $data );
 
 
 
 
 
 
 
 
 
 
 
 
 
720
  }
721
  break;
722
  case 'destination': // backup cases
@@ -781,7 +807,7 @@ class MainWP_Client_Report {
781
  }
782
 
783
  function set_showhide() {
784
- MainWP_Helper::update_option( 'mainwp_creport_ext_branding_enabled', 'Y', 'yes' );
785
  $hide = isset( $_POST['showhide'] ) && ( 'hide' === $_POST['showhide'] ) ? 'hide' : '';
786
  MainWP_Helper::update_option( 'mainwp_creport_branding_stream_hide', $hide, 'yes' );
787
  $information['result'] = 'SUCCESS';
@@ -790,21 +816,41 @@ class MainWP_Client_Report {
790
  }
791
 
792
  public function creport_init() {
793
- if ( get_option( 'mainwp_creport_ext_branding_enabled' ) !== 'Y' ) {
794
- return;
795
- }
796
 
 
797
  if ( get_option( 'mainwp_creport_branding_stream_hide' ) === 'hide' ) {
798
  add_filter( 'all_plugins', array( $this, 'creport_branding_plugin' ) );
799
  add_action( 'admin_menu', array( $this, 'creport_remove_menu' ) );
800
- add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
801
  }
 
 
 
 
 
 
 
 
 
802
  }
803
 
 
 
 
 
 
804
  function remove_update_nag( $value ) {
805
- if ( isset( $_POST['mainwpsignature'] ) ) {
806
  return $value;
807
  }
 
 
 
 
 
808
  if ( isset( $value->response['mainwp-child-reports/mainwp-child-reports.php'] ) ) {
809
  unset( $value->response['mainwp-child-reports/mainwp-child-reports.php'] );
810
  }
439
  }
440
  }
441
 
442
+ // to avoid WC order_note, action_log
443
+ if ( 'comments' === $context ) {
444
+ if ( isset( $record->meta ) ) {
445
+ if ( isset( $record->meta[ 'comment_type' ] ) && is_array($record->meta[ 'comment_type' ])) {
446
+ $cmtype = current($record->meta[ 'comment_type' ]);
447
+ if ( $cmtype == 'order_note' || $cmtype == 'action_log') {
448
+ continue;
449
+ }
450
+ }
451
+ }
452
+ }
453
+
454
+
455
  }
456
 
457
  $count ++;
729
  case 'details':
730
  case 'result':
731
  if ( 'wordfence' === $context || 'maintenance' === $context ) {
732
+ $meta_value = $this->get_stream_meta_data( $record, $data );
733
+ // to fix
734
+ if ('wordfence' === $context && $data == 'result') {
735
+ // SUM_FINAL:Scan complete. You have xxx new issues to fix. See below.
736
+ // SUM_FINAL:Scan complete. Congratulations, no new problems found
737
+ if (stripos($meta_value, 'Congratulations')) {
738
+ $meta_value = 'No issues detected';
739
+ } else if (stripos($meta_value, 'You have')) {
740
+ $meta_value = 'Issues Detected';
741
+ } else {
742
+ $meta_value = '';
743
+ }
744
+ }
745
+ $token_values[ $token ] = $meta_value;
746
  }
747
  break;
748
  case 'destination': // backup cases
807
  }
808
 
809
  function set_showhide() {
810
+ // MainWP_Helper::update_option( 'mainwp_creport_ext_branding_enabled', 'Y', 'yes' );
811
  $hide = isset( $_POST['showhide'] ) && ( 'hide' === $_POST['showhide'] ) ? 'hide' : '';
812
  MainWP_Helper::update_option( 'mainwp_creport_branding_stream_hide', $hide, 'yes' );
813
  $information['result'] = 'SUCCESS';
816
  }
817
 
818
  public function creport_init() {
819
+ // if ( get_option( 'mainwp_creport_ext_branding_enabled' ) !== 'Y' ) {
820
+ // return;
821
+ // }
822
 
823
+ $hide_nag = false;
824
  if ( get_option( 'mainwp_creport_branding_stream_hide' ) === 'hide' ) {
825
  add_filter( 'all_plugins', array( $this, 'creport_branding_plugin' ) );
826
  add_action( 'admin_menu', array( $this, 'creport_remove_menu' ) );
827
+ $hide_nag = true;
828
  }
829
+
830
+ if ( MainWP_Child_Branding::is_branding() ) {
831
+ $hide_nag = true;
832
+ }
833
+
834
+ if ($hide_nag) {
835
+ add_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );
836
+ add_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );
837
+ }
838
  }
839
 
840
+ function hide_update_notice( $slugs ) {
841
+ $slugs[] = 'mainwp-child-reports/mainwp-child-reports.php';
842
+ return $slugs;
843
+ }
844
+
845
  function remove_update_nag( $value ) {
846
+ if ( isset( $_POST['mainwpsignature'] ) ) {
847
  return $value;
848
  }
849
+
850
+ if (! MainWP_Helper::is_screen_with_update()) {
851
+ return $value;
852
+ }
853
+
854
  if ( isset( $value->response['mainwp-child-reports/mainwp-child-reports.php'] ) ) {
855
  unset( $value->response['mainwp-child-reports/mainwp-child-reports.php'] );
856
  }
class/class-mainwp-helper.php CHANGED
@@ -1417,6 +1417,22 @@ static function remove_filters_with_method_name( $hook_name = '', $method_name =
1417
  return function_exists( 'openssl_verify' );
1418
  }
1419
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1420
  public static function check_files_exists( $files = array(), $return = false ) {
1421
  $missing = array();
1422
  if (is_array($files)) {
1417
  return function_exists( 'openssl_verify' );
1418
  }
1419
 
1420
+ public static function is_screen_with_update() {
1421
+
1422
+ if ( ( defined('DOING_AJAX') && DOING_AJAX ) || ( defined('DOING_CRON') && DOING_CRON ) )
1423
+ return false;
1424
+
1425
+ if (function_exists('get_current_screen')) {
1426
+ $screen = get_current_screen();
1427
+ if ( $screen ) {
1428
+ if ( $screen->base == 'update-core' && $screen->parent_file == 'index.php' ) {
1429
+ return true;
1430
+ }
1431
+ }
1432
+ }
1433
+ return false;
1434
+ }
1435
+
1436
  public static function check_files_exists( $files = array(), $return = false ) {
1437
  $missing = array();
1438
  if (is_array($files)) {
mainwp-child.php CHANGED
@@ -6,11 +6,11 @@
6
  Author: MainWP
7
  Author URI: https://mainwp.com
8
  Text Domain: mainwp-child
9
- Version: 3.5.2
10
  */
11
- if ( ( isset( $_REQUEST['heatmap'] ) && '1' === $_REQUEST['heatmap'] ) || ( isset( $_REQUEST['mainwpsignature'] ) && ( ! empty( $_REQUEST['mainwpsignature'] ) ) ) ) {
12
- header( 'X-Frame-Options: ALLOWALL' );
13
- }
14
  //header('X-Frame-Options: GOFORIT');
15
  include_once( ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'version.php' ); //Version information from wordpress
16
 
@@ -35,7 +35,7 @@ function mainwp_child_autoload( $class_name ) {
35
 
36
  if ( function_exists( 'spl_autoload_register' ) ) {
37
  spl_autoload_register( 'mainwp_child_autoload' );
38
- }
39
 
40
  $mainWPChild = new MainWP_Child( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . plugin_basename( __FILE__ ) );
41
  register_activation_hook( __FILE__, array( $mainWPChild, 'activation' ) );
6
  Author: MainWP
7
  Author URI: https://mainwp.com
8
  Text Domain: mainwp-child
9
+ Version: 3.5.3
10
  */
11
+ //if ( ( isset( $_REQUEST['heatmap'] ) && '1' === $_REQUEST['heatmap'] ) || ( isset( $_REQUEST['mainwpsignature'] ) && ( ! empty( $_REQUEST['mainwpsignature'] ) ) ) ) {
12
+ // header( 'X-Frame-Options: ALLOWALL' );
13
+ //}
14
  //header('X-Frame-Options: GOFORIT');
15
  include_once( ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'version.php' ); //Version information from wordpress
16
 
35
 
36
  if ( function_exists( 'spl_autoload_register' ) ) {
37
  spl_autoload_register( 'mainwp_child_autoload' );
38
+ }
39
 
40
  $mainWPChild = new MainWP_Child( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . plugin_basename( __FILE__ ) );
41
  register_activation_hook( __FILE__, array( $mainWPChild, 'activation' ) );
readme.txt CHANGED
@@ -6,8 +6,8 @@ Author: mainwp
6
  Author URI: https://mainwp.com
7
  Plugin URI: https://mainwp.com
8
  Requires at least: 3.6
9
- Tested up to: 5.0
10
- Stable tag: 3.5.2
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -71,6 +71,19 @@ To see full documentation and FAQs please visit [MainWP Documentation](https://m
71
 
72
  == Changelog ==
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  = 3.5.2 - 11-27-18 =
75
  * Fixed: an issue with detecting updates when a custom branding is applied
76
  * Fixed: an issue with passing WebDav remote storage info for the UpdraftPlus Extension
6
  Author URI: https://mainwp.com
7
  Plugin URI: https://mainwp.com
8
  Requires at least: 3.6
9
+ Tested up to: 5.0.1
10
+ Stable tag: 3.5.3
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
71
 
72
  == Changelog ==
73
 
74
+ = 3.5.3 - 12-19-18 =
75
+ * Fixed: an issue with the X-Frame-Options configuration
76
+ * Fixed: an issue with clearing WP Rocket cache
77
+ * Fixed: an issue with saving BackWPup settings
78
+ * Fixed: multiple compatibility issues for the Bulk Settings Manger extension
79
+ * Fixed: an issue with submitting the Bulk Settings Manger keys on child sites protected with the HTTP Basic Authentication
80
+ * Fixed: an issue with creating buckets in Backblaze remote option caused by disallowed characters
81
+ * Fixed: an issue with tokens usage in the UpdraftPlus Webdav remote storage settings
82
+ * Added: support for new WP Staging plugin options
83
+ * Updated: update detection process in order to improve performance on some hosts
84
+ * Updated: disabled site size calculation function as default state
85
+ * Updated: support for the latest Wordfence version
86
+
87
  = 3.5.2 - 11-27-18 =
88
  * Fixed: an issue with detecting updates when a custom branding is applied
89
  * Fixed: an issue with passing WebDav remote storage info for the UpdraftPlus Extension