Backup and Restore WordPress – WPBackItUp Backup Plugin - Version 1.20.0

Version Description

Download this release

Release Info

Developer cssimmon
Plugin Icon 128x128 Backup and Restore WordPress – WPBackItUp Backup Plugin
Version 1.20.0
Comparing to
See all releases

Code changes from version 1.19.0 to 1.20.0

lib/includes/class-usage.php CHANGED
@@ -111,38 +111,39 @@ class WPBackItUp_Usage {
111
 
112
  $plugins = array_keys( get_plugins() );
113
  $active_plugins = get_option( 'active_plugins', array());
 
114
 
115
  $current_path = dirname(plugin_basename(__FILE__));
116
  $current_root = current(explode("/",$current_path));
117
  $current_plugin=$current_root;
118
 
119
  foreach ( $plugins as $key => $plugin ) {
120
- if ( in_array( $plugin, $active_plugins ) ) {
121
  // Remove active plugins from list so we can show active and inactive separately
122
- unset( $plugins[ $key ] );
123
-
124
- //Current Plugin
125
- if (strpos($plugin, $current_root) !== false) {
126
- $current_plugin=$plugin;
127
- }
128
  }
129
  }
 
 
 
 
 
 
130
  $data['source'] = $current_plugin;
131
  $data['active_plugins'] = $active_plugins;
132
- $data['inactive_plugins'] = $plugins;
 
133
  $data['locale'] = get_locale();
134
 
135
 
136
  /** Plugin Data Points **/
137
-
138
  $data['wpbackitup_version'] = WPBACKITUP__VERSION;
139
-
140
- $wpb_license = new WPBackItUp_License();
141
- $data['wpbackitup_license_key'] = $wpb_license->get_license_key();
142
-
143
  $data['wpbackitup_backup_count'] = WPBackItUp_Utility::get_option( 'successful_backup_count' );
 
144
 
145
- $this->data = $data;
146
 
147
  } catch (Exception $e) {
148
  WPBackItUp_Logger::log_error($this->log_name,__METHOD__,'Exception: ' .$e);
@@ -176,13 +177,13 @@ class WPBackItUp_Usage {
176
  //get last send date
177
  $last_send = $this->get_last_send();
178
 
179
- // Never send more than once per day
180
  if ( is_numeric( $last_send ) && $last_send > strtotime( '-1 day' )) {
181
  WPBackItUp_Logger::log_info($this->log_name,__METHOD__,'Exit 2' );
182
  return false;
183
  }
184
 
185
- // send once per week
186
  if ( is_numeric( $last_send ) && $last_send > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
187
  WPBackItUp_Logger::log_info($this->log_name,__METHOD__,'Exit 3' );
188
  return false;
@@ -256,22 +257,6 @@ class WPBackItUp_Usage {
256
  return (bool) WPBackItUp_Utility::get_option( 'tracking_notice',false );
257
  }
258
 
259
-
260
- /**
261
- * Schedule a weekly checkin
262
- *
263
- * We send once a week (while tracking is allowed) to check in, which can be
264
- * used to determine active sites.
265
- *
266
- * @return void
267
- */
268
- public function schedule_events() {
269
- if ( WPBackItUp_Cron::doing_cron() ) {
270
- add_action( 'wpbackitup_weekly_scheduled_events', array( $this, 'ut_event' ) );
271
- //add_action( 'wpbackitup_daily_scheduled_events', array( $this, 'ut_event' ) );
272
- }
273
- }
274
-
275
  /**
276
  * Check for a new opt-in via the admin notice
277
  *
@@ -349,5 +334,16 @@ class WPBackItUp_Usage {
349
  echo '</p></div>';
350
  }
351
  }
 
 
 
 
 
 
 
 
 
 
 
352
  }
353
  $wpb_tracking = new WPBackItUp_Usage();
111
 
112
  $plugins = array_keys( get_plugins() );
113
  $active_plugins = get_option( 'active_plugins', array());
114
+ $inactive_plugins = array();
115
 
116
  $current_path = dirname(plugin_basename(__FILE__));
117
  $current_root = current(explode("/",$current_path));
118
  $current_plugin=$current_root;
119
 
120
  foreach ( $plugins as $key => $plugin ) {
121
+ if ( ! in_array( $plugin, $active_plugins ) ) {
122
  // Remove active plugins from list so we can show active and inactive separately
123
+ //unset( $plugins[ $key ] );
124
+ $inactive_plugins[] = $plugins[ $key ];
 
 
 
 
125
  }
126
  }
127
+
128
+ $mu_plugins = array();
129
+ foreach ( get_mu_plugins() as $mu_key => $mu_plugin ) {
130
+ $mu_plugins[]=$mu_key;
131
+ }
132
+
133
  $data['source'] = $current_plugin;
134
  $data['active_plugins'] = $active_plugins;
135
+ $data['inactive_plugins'] = $inactive_plugins;
136
+ $data['mu_plugins'] = $mu_plugins;
137
  $data['locale'] = get_locale();
138
 
139
 
140
  /** Plugin Data Points **/
 
141
  $data['wpbackitup_version'] = WPBACKITUP__VERSION;
142
+ $data['wpbackitup_license_key'] = 'lite';
 
 
 
143
  $data['wpbackitup_backup_count'] = WPBackItUp_Utility::get_option( 'successful_backup_count' );
144
+ $data['wpbackitup_backup_last_run_date'] = date("Y-m-d",WPBackItUp_Utility::get_option( 'backup_lastrun_date' ));
145
 
146
+ $this->data = apply_filters('wpbackitup_ut_data',$data);
147
 
148
  } catch (Exception $e) {
149
  WPBackItUp_Logger::log_error($this->log_name,__METHOD__,'Exception: ' .$e);
177
  //get last send date
178
  $last_send = $this->get_last_send();
179
 
180
+ //Exit IF we sent within last day - never send more than once per day
181
  if ( is_numeric( $last_send ) && $last_send > strtotime( '-1 day' )) {
182
  WPBackItUp_Logger::log_info($this->log_name,__METHOD__,'Exit 2' );
183
  return false;
184
  }
185
 
186
+ //Exit IF we have sent within last week - only send once per week IF allowed
187
  if ( is_numeric( $last_send ) && $last_send > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
188
  WPBackItUp_Logger::log_info($this->log_name,__METHOD__,'Exit 3' );
189
  return false;
257
  return (bool) WPBackItUp_Utility::get_option( 'tracking_notice',false );
258
  }
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  /**
261
  * Check for a new opt-in via the admin notice
262
  *
334
  echo '</p></div>';
335
  }
336
  }
337
+ /**
338
+ * Schedule a daily check to see if we have checked in lately
339
+ *
340
+ * @return void
341
+ */
342
+ public function schedule_events() {
343
+ if ( WPBackItUp_Cron::doing_cron() ) {
344
+ add_action( 'wpbackitup_daily_scheduled_events', array( $this, 'ut_event' ) );
345
+ }
346
+ }
347
+
348
  }
349
  $wpb_tracking = new WPBackItUp_Usage();
lib/includes/class-wpbackitup-admin.php CHANGED
@@ -133,6 +133,7 @@ class WPBackitup_Admin {
133
  }
134
 
135
  // Route requests for form processing
 
136
  add_action( 'admin_init', array( &$this, 'route' ) );
137
 
138
  // Add a settings link next to the "Deactivate" link on the plugin listing page
@@ -530,9 +531,6 @@ class WPBackitup_Admin {
530
  $languages_path
531
  );
532
 
533
- //admin activation hook does NOT get called on plugin update to this needs to stay here
534
- $this->maybe_update(); //Check version and update database if needed
535
-
536
  //display any active notices
537
  $notices = new WPBackitup_Admin_Notices();
538
  $notices->run();//display any active notices
133
  }
134
 
135
  // Route requests for form processing
136
+ add_action( 'admin_init', array( &$this, 'maybe_update' ) );
137
  add_action( 'admin_init', array( &$this, 'route' ) );
138
 
139
  // Add a settings link next to the "Deactivate" link on the plugin listing page
531
  $languages_path
532
  );
533
 
 
 
 
534
  //display any active notices
535
  $notices = new WPBackitup_Admin_Notices();
536
  $notices->run();//display any active notices
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: backup, backups, back up, backup plugin, database backup, multisite backup
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
- Stable tag: 1.18
8
  Author URI: https://www.wpbackitup.com
9
  Donate link: https://www.wpbackitup.com
10
  License: GPLv2 or later
@@ -215,6 +215,12 @@ Our online documentation and full list of FAQs can be found at [support.wpbackit
215
 
216
 
217
  == Changelog ==
 
 
 
 
 
 
218
  = 1.19 =
219
  *Release Date - May 25, 2018
220
 
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
+ Stable tag: 1.19.0
8
  Author URI: https://www.wpbackitup.com
9
  Donate link: https://www.wpbackitup.com
10
  License: GPLv2 or later
215
 
216
 
217
  == Changelog ==
218
+ = 1.20 =
219
+ *Release Date - June 1, 2018
220
+
221
+ * FIX: Fix broken links on support tab for multi-site
222
+ * UPDATE: Minor updates to ut actions
223
+
224
  = 1.19 =
225
  *Release Date - May 25, 2018
226
 
views/about.php CHANGED
@@ -55,13 +55,13 @@ class WPBackItUp_Welcome {
55
 
56
  ?>
57
  <h1 class="nav-tab-wrapper">
58
- <a class="nav-tab <?php echo $selected == 'getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wp-backitup-about' ), 'admin.php' ) ) ); ?>">
59
  <?php _e( 'Getting Started', 'wp-backitup' ); ?>
60
  </a>
61
- <!-- <a class="nav-tab --><?php //echo $selected == 'whats-new' ? 'nav-tab-active' : ''; ?><!--" href="--><?php //echo esc_url( admin_url( add_query_arg( array( 'page' => 'wp-backitup-about','tab'=>'whats-new' ), 'admin.php' ) ) ); ?><!--">-->
62
  <!-- --><?php //_e( "What's New", 'wp-backitup'); ?>
63
  <!-- </a>-->
64
- <a class="nav-tab <?php echo $selected == 'premium' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wp-backitup-about','tab'=>'premium' ), 'admin.php' ) ) ); ?>">
65
  <?php _e( 'Premium Plugin', 'wp-backitup' ); ?>
66
  </a>
67
  </h1>
@@ -143,7 +143,7 @@ class WPBackItUp_Welcome {
143
  <img src="<?php echo WPBACKITUP__PLUGIN_URL . 'images/backup_inprogress.png'?>" />
144
  </div>
145
  <div class="feature-section-content">
146
- <h4><a href="<?php echo admin_url( 'admin.php?page=wp-backitup-backup' ) ?>"><?php printf( __( 'One Click &rarr; Backup', 'wp-backitup' )); ?></a></h4>
147
  <p><?php printf( __( 'The backup menu option is the starting point for all things related to backups. To create your first backup, simply click the <em>Backup</em> button and WPBackItUp will backup your entire site. This includes your database, plugins, themes, and even all your media files.', 'wp-backitup' )); ?></p>
148
 
149
 
@@ -307,7 +307,7 @@ class WPBackItUp_Welcome {
307
 
308
  <div class="return-to-dashboard">
309
  <?php _e( 'Want to see the entire changelog?', 'wp-backitup' ); ?> &mdash;
310
- <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wp-backitup-about','tab'=>'changelog' ), 'admin.php' ) )); ?>"><?php _e( 'View the Full Changelog', 'wp-backitup' ); ?></a>
311
  </div>
312
  <?php
313
  }
55
 
56
  ?>
57
  <h1 class="nav-tab-wrapper">
58
+ <a class="nav-tab <?php echo $selected == 'getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( network_admin_url( add_query_arg( array( 'page' => 'wp-backitup-about' ), 'admin.php' ) ) ); ?>">
59
  <?php _e( 'Getting Started', 'wp-backitup' ); ?>
60
  </a>
61
+ <!-- <a class="nav-tab --><?php //echo $selected == 'whats-new' ? 'nav-tab-active' : ''; ?><!--" href="--><?php //echo esc_url( network_admin_url( add_query_arg( array( 'page' => 'wp-backitup-about','tab'=>'whats-new' ), 'admin.php' ) ) ); ?><!--">-->
62
  <!-- --><?php //_e( "What's New", 'wp-backitup'); ?>
63
  <!-- </a>-->
64
+ <a class="nav-tab <?php echo $selected == 'premium' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( network_admin_url( add_query_arg( array( 'page' => 'wp-backitup-about','tab'=>'premium' ), 'admin.php' ) ) ); ?>">
65
  <?php _e( 'Premium Plugin', 'wp-backitup' ); ?>
66
  </a>
67
  </h1>
143
  <img src="<?php echo WPBACKITUP__PLUGIN_URL . 'images/backup_inprogress.png'?>" />
144
  </div>
145
  <div class="feature-section-content">
146
+ <h4><a href="<?php echo network_admin_url( 'admin.php?page=wp-backitup-backup' ) ?>"><?php printf( __( 'One Click &rarr; Backup', 'wp-backitup' )); ?></a></h4>
147
  <p><?php printf( __( 'The backup menu option is the starting point for all things related to backups. To create your first backup, simply click the <em>Backup</em> button and WPBackItUp will backup your entire site. This includes your database, plugins, themes, and even all your media files.', 'wp-backitup' )); ?></p>
148
 
149
 
307
 
308
  <div class="return-to-dashboard">
309
  <?php _e( 'Want to see the entire changelog?', 'wp-backitup' ); ?> &mdash;
310
+ <a href="<?php echo esc_url( network_admin_url( add_query_arg( array( 'page' => 'wp-backitup-about','tab'=>'changelog' ), 'admin.php' ) )); ?>"><?php _e( 'View the Full Changelog', 'wp-backitup' ); ?></a>
311
  </div>
312
  <?php
313
  }
views/support.php CHANGED
@@ -63,23 +63,22 @@ class WPBackItUp_Support {
63
  */
64
  private function tabs() {
65
  $selected = isset( $_GET['tab'] ) ? $_GET['tab'] : 'support';
66
-
67
  ?>
68
  <h1 class="nav-tab-wrapper">
69
- <a class="nav-tab <?php echo $selected == 'support' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wp-backitup-support' ), 'admin.php' ) ) ); ?>">
70
  <?php _e( 'Support', 'wp-backitup' ); ?>
71
  </a>
72
- <a class="nav-tab <?php echo $selected == 'send-logs' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'send-logs'), 'admin.php' ) ) ); ?>">
73
  <?php _e( "Send Logs", 'wp-backitup' ); ?>
74
  </a>
75
 
76
- <a class="nav-tab <?php echo $selected == 'download-logs' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'download-logs'), 'admin.php' ) ) ); ?>">
77
  <?php _e( "Download Logs", 'wp-backitup' ); ?>
78
  </a>
79
 
80
  <?php //hide tab unless navigate directly
81
  if ( $selected == 'advanced') : ?>
82
- <a class="nav-tab <?php echo $selected == 'advanced' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'advanced'), 'admin.php' ) ) ); ?>">
83
  <?php _e( "Advanced", 'wp-backitup' ); ?>
84
  </a>
85
  <?php endif; ?>
@@ -138,7 +137,7 @@ class WPBackItUp_Support {
138
  <h4><a href="http://support.wpbackitup.com/support/tickets" target="_blank"><?php printf( __( 'Check &rarr; Status', 'wp-backitup' )); ?></a></h4>
139
  <p><?php _e( 'To check ticket status or update a previously submitted ticket you will first need to login. Our support portal provides a history of your current and past support requests complete with responses.', 'wp-backitup' );?></p>
140
 
141
- <h4><a href="<?php echo esc_url( admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'send-logs'), 'admin.php' ))) ?>"><?php printf( __( 'Send &rarr; Logs', 'wp-backitup' )); ?></a></h4>
142
  <p><?php _e( 'Sometimes it may be necessary for you to send your log files to support. If that ever happens, just click the link above and we will show you what to do.', 'wp-backitup' );?></p>
143
 
144
  </div>
63
  */
64
  private function tabs() {
65
  $selected = isset( $_GET['tab'] ) ? $_GET['tab'] : 'support';
 
66
  ?>
67
  <h1 class="nav-tab-wrapper">
68
+ <a class="nav-tab <?php echo $selected == 'support' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( network_admin_url( add_query_arg( array( 'page' => 'wp-backitup-support' ), 'admin.php' ) ) ); ?>">
69
  <?php _e( 'Support', 'wp-backitup' ); ?>
70
  </a>
71
+ <a class="nav-tab <?php echo $selected == 'send-logs' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( network_admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'send-logs'), 'admin.php' ) ) ); ?>">
72
  <?php _e( "Send Logs", 'wp-backitup' ); ?>
73
  </a>
74
 
75
+ <a class="nav-tab <?php echo $selected == 'download-logs' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( network_admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'download-logs'), 'admin.php' ) ) ); ?>">
76
  <?php _e( "Download Logs", 'wp-backitup' ); ?>
77
  </a>
78
 
79
  <?php //hide tab unless navigate directly
80
  if ( $selected == 'advanced') : ?>
81
+ <a class="nav-tab <?php echo $selected == 'advanced' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( network_admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'advanced'), 'admin.php' ) ) ); ?>">
82
  <?php _e( "Advanced", 'wp-backitup' ); ?>
83
  </a>
84
  <?php endif; ?>
137
  <h4><a href="http://support.wpbackitup.com/support/tickets" target="_blank"><?php printf( __( 'Check &rarr; Status', 'wp-backitup' )); ?></a></h4>
138
  <p><?php _e( 'To check ticket status or update a previously submitted ticket you will first need to login. Our support portal provides a history of your current and past support requests complete with responses.', 'wp-backitup' );?></p>
139
 
140
+ <h4><a href="<?php echo esc_url( network_admin_url( add_query_arg( array('page' => 'wp-backitup-support','tab' => 'send-logs'), 'admin.php' ))) ?>"><?php printf( __( 'Send &rarr; Logs', 'wp-backitup' )); ?></a></h4>
141
  <p><?php _e( 'Sometimes it may be necessary for you to send your log files to support. If that ever happens, just click the link above and we will show you what to do.', 'wp-backitup' );?></p>
142
 
143
  </div>
wp-backitup.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
7
  * Author: WPBackItUp
8
  * Author URI: https://www.wpbackitup.com
9
- * Version: 1.19
10
  * Text Domain: wp-backitup
11
  *
12
  * License: GPL3
@@ -32,7 +32,7 @@ define( 'WPBACKITUP__NAMESPACE', 'wp-backitup' );
32
  define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
33
 
34
  define( 'WPBACKITUP__MAJOR_VERSION', 1);
35
- define( 'WPBACKITUP__MINOR_VERSION', 19);
36
  define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
37
  define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
38
 
6
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
7
  * Author: WPBackItUp
8
  * Author URI: https://www.wpbackitup.com
9
+ * Version: 1.20
10
  * Text Domain: wp-backitup
11
  *
12
  * License: GPL3
32
  define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
33
 
34
  define( 'WPBACKITUP__MAJOR_VERSION', 1);
35
+ define( 'WPBACKITUP__MINOR_VERSION', 20);
36
  define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
37
  define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
38