WordPress Backup and Migrate Plugin – Backup Guard - Version 1.4.5

Version Description

  • Fixed alert issue after clicking backup
  • Minor fixes
Download this release

Release Info

Developer BackupGuard
Plugin Icon 128x128 WordPress Backup and Migrate Plugin – Backup Guard
Version 1.4.5
Comparing to
See all releases

Code changes from version 1.4.4 to 1.4.5

BackupGuard.php CHANGED
@@ -116,6 +116,9 @@ function getBackupPageContentClassName($pageName = '')
116
 
117
  function includeAllPages()
118
  {
 
 
 
119
  backup_guard_backups_page();
120
  backup_guard_cloud_page();
121
  backup_guard_system_info_page();
@@ -126,6 +129,8 @@ function includeAllPages()
126
  backup_guard_settings_page();
127
 
128
  require_once(plugin_dir_path(__FILE__).'public/pagesContent.php');
 
 
129
  }
130
 
131
  function backup_guard_system_info_page()
116
 
117
  function includeAllPages()
118
  {
119
+ if (!backupGuardValidateLicense()) {
120
+ return false;
121
+ }
122
  backup_guard_backups_page();
123
  backup_guard_cloud_page();
124
  backup_guard_system_info_page();
129
  backup_guard_settings_page();
130
 
131
  require_once(plugin_dir_path(__FILE__).'public/pagesContent.php');
132
+
133
+ return true;
134
  }
135
 
136
  function backup_guard_system_info_page()
README.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://backup-guard.com/products/backup-wordpress
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.5
9
- Stable tag: 1.4.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -60,7 +60,7 @@ See <strong>BackupGuard Free</strong> in action here: <a href="https://www.youtu
60
 
61
  See <strong>BackupGuard Pro</strong> in action here: <a href="https://www.youtube.com/watch?v=TSPgmrSu-ls">https://www.youtube.com/watch?v=TSPgmrSu-ls</a>
62
 
63
- <h4>A SPECIAL NOTE ON WORDPRESS MIGRATION/h4>
64
 
65
  A WordPress site migration is an easy task if performed properly. There are three different migration scenarios:
66
  <ul>
@@ -167,6 +167,10 @@ When you are facing an issue of any kind with any of our products, the first thi
167
  6. Site backup customization
168
 
169
  == Changelog ==
 
 
 
 
170
  = 1.4.4 =
171
  * WordPress 5.5 Backup "Import" Issue Fix
172
  * Improvement in Backup Guard Admin Panel Architecture
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.5
9
+ Stable tag: 1.4.5
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
60
 
61
  See <strong>BackupGuard Pro</strong> in action here: <a href="https://www.youtube.com/watch?v=TSPgmrSu-ls">https://www.youtube.com/watch?v=TSPgmrSu-ls</a>
62
 
63
+ <h4>A SPECIAL NOTE ON WORDPRESS MIGRATION</h4>
64
 
65
  A WordPress site migration is an easy task if performed properly. There are three different migration scenarios:
66
  <ul>
167
  6. Site backup customization
168
 
169
  == Changelog ==
170
+ = 1.4.5 =
171
+ * Fixed alert issue after clicking backup
172
+ * Minor fixes
173
+
174
  = 1.4.4 =
175
  * WordPress 5.5 Backup "Import" Issue Fix
176
  * Improvement in Backup Guard Admin Panel Architecture
backup.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Backup
5
  * Plugin URI: https://backup-guard.com/products/backup-wordpress
6
  * Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
7
- * Version: 1.4.4
8
  * Author: BackupGuard
9
  * Author URI: https://backup-guard.com/products/backup-wordpress
10
  * License: GPL-2.0+
@@ -16,7 +16,7 @@ if (function_exists('activate_backup_guard')) {
16
  }
17
 
18
  if (!defined('SG_BACKUP_GUARD_VERSION')) {
19
- define('SG_BACKUP_GUARD_VERSION', '1.4.4');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
4
  * Plugin Name: Backup
5
  * Plugin URI: https://backup-guard.com/products/backup-wordpress
6
  * Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
7
+ * Version: 1.4.5
8
  * Author: BackupGuard
9
  * Author URI: https://backup-guard.com/products/backup-wordpress
10
  * License: GPL-2.0+
16
  }
17
 
18
  if (!defined('SG_BACKUP_GUARD_VERSION')) {
19
+ define('SG_BACKUP_GUARD_VERSION', '1.4.5');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
com/core/functions.php CHANGED
@@ -626,8 +626,8 @@ function backupGuardGetBackupTablesHTML($defaultChecked = false){
626
  ?>
627
 
628
  <div class="checkbox">
629
- <label for="custombackupdb-chbx">
630
- <input type="checkbox" class="sg-custom-option" name="backupDatabase" id="custombackupdb-chbx" <?php echo $defaultChecked?'checked':'' ?>>
631
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Backup database'); ?></span>
632
  </label>
633
  <div class="col-md-12 sg-checkbox sg-backup-db-options">
626
  ?>
627
 
628
  <div class="checkbox">
629
+ <label for="custom-backupdb-chbx">
630
+ <input type="checkbox" class="sg-custom-option" name="backupDatabase" id="custom-backupdb-chbx" <?php echo $defaultChecked?'checked':'' ?>>
631
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Backup database'); ?></span>
632
  </label>
633
  <div class="col-md-12 sg-checkbox sg-backup-db-options">
public/ajax/modalManualBackup.php CHANGED
@@ -28,30 +28,30 @@
28
  </div>
29
  <div class="col-md-12">
30
  <div class="radio">
31
- <label for="fullbackup-radio">
32
- <input type="radio" name="backupType" id="fullbackup-radio" value="1" checked="checked">
33
  <?php _backupGuardT('Full backup'); ?>
34
  </label>
35
  </div>
36
  <div class="radio">
37
- <label for="custombackup-radio">
38
- <input type="radio" name="backupType" id="custombackup-radio" value="2">
39
  <?php _backupGuardT('Custom backup'); ?>
40
  </label>
41
  </div>
42
  <div class="col-md-12 sg-custom-backup">
43
  <?php backupGuardGetBackupTablesHTML(); ?>
44
  <div class="checkbox sg-no-padding-top">
45
- <label for="custombackupfiles-chbx">
46
- <input type="checkbox" class="sg-custom-option" name="backupFiles" id="custombackupfiles-chbx">
47
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Backup files'); ?></span>
48
  </label>
49
  <!--Files-->
50
  <div class="col-md-12 sg-checkbox sg-custom-backup-files">
51
  <?php foreach ($directories as $directory): ?>
52
  <div class="checkbox">
53
- <label for="<?php echo 'sg'.$directory?>">
54
- <input type="checkbox" name="directory[]" id="<?php echo 'sg'.$directory;?>" value="<?php echo $directory;?>">
55
  <span class="sg-checkbox-label-text"><?php echo basename($directory);?></span>
56
  </label>
57
  </div>
@@ -63,8 +63,8 @@
63
  <?php if(SGBoot::isFeatureAvailable('STORAGE')): ?>
64
  <!--Cloud-->
65
  <div class="checkbox sg-no-padding-top">
66
- <label for="custombackupcloud-chbx">
67
- <input type="checkbox" name="backupCloud" id="custombackupcloud-chbx">
68
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Upload to cloud'); ?></span>
69
  </label>
70
  <!--Storages-->
@@ -119,8 +119,8 @@
119
  <!-- Background mode -->
120
  <?php if(SGBoot::isFeatureAvailable('BACKGROUND_MODE')): ?>
121
  <div class="checkbox">
122
- <label for="background-chbx">
123
- <input type="checkbox" name="backgroundMode" id="background-chbx">
124
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Background mode'); ?></span>
125
  </label>
126
  </div>
28
  </div>
29
  <div class="col-md-12">
30
  <div class="radio">
31
+ <label for="full-backup-radio">
32
+ <input type="radio" name="backupType" id="full-backup-radio" value="1" checked="checked">
33
  <?php _backupGuardT('Full backup'); ?>
34
  </label>
35
  </div>
36
  <div class="radio">
37
+ <label for="custom-backup-radio">
38
+ <input type="radio" name="backupType" id="custom-backup-radio" value="2">
39
  <?php _backupGuardT('Custom backup'); ?>
40
  </label>
41
  </div>
42
  <div class="col-md-12 sg-custom-backup">
43
  <?php backupGuardGetBackupTablesHTML(); ?>
44
  <div class="checkbox sg-no-padding-top">
45
+ <label for="custom-backupfiles-chbx">
46
+ <input type="checkbox" class="sg-custom-option" name="backupFiles" id="custom-backupfiles-chbx">
47
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Backup files'); ?></span>
48
  </label>
49
  <!--Files-->
50
  <div class="col-md-12 sg-checkbox sg-custom-backup-files">
51
  <?php foreach ($directories as $directory): ?>
52
  <div class="checkbox">
53
+ <label for="<?php echo 'sgbg'.$directory?>">
54
+ <input type="checkbox" name="directory[]" id="<?php echo 'sgbg'.$directory;?>" value="<?php echo $directory;?>">
55
  <span class="sg-checkbox-label-text"><?php echo basename($directory);?></span>
56
  </label>
57
  </div>
63
  <?php if(SGBoot::isFeatureAvailable('STORAGE')): ?>
64
  <!--Cloud-->
65
  <div class="checkbox sg-no-padding-top">
66
+ <label for="custom-backupcloud-chbx">
67
+ <input type="checkbox" name="backupCloud" id="custom-backupcloud-chbx">
68
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Upload to cloud'); ?></span>
69
  </label>
70
  <!--Storages-->
119
  <!-- Background mode -->
120
  <?php if(SGBoot::isFeatureAvailable('BACKGROUND_MODE')): ?>
121
  <div class="checkbox">
122
+ <label for="sg-background-chbx">
123
+ <input type="checkbox" name="backgroundMode" id="sg-background-chbx">
124
  <span class="sg-checkbox-label-text"><?php _backupGuardT('Background mode'); ?></span>
125
  </label>
126
  </div>
public/backups.php CHANGED
@@ -101,7 +101,7 @@ $contentClassName = getBackupPageContentClassName('backups');
101
  <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Delete')?></span>
102
  </a>
103
  <div class="clearfix"></div><br/>
104
- <table class="table table-striped paginated sg-backup-table">
105
  <thead>
106
  <tr>
107
  <th><input type="checkbox" id="sg-checkbox-select-all" autocomplete="off"></th>
@@ -193,7 +193,7 @@ $contentClassName = getBackupPageContentClassName('backups');
193
  </tbody>
194
  </table>
195
 
196
- <div class="text-right">
197
  <ul class="pagination"></ul>
198
  </div>
199
  </fieldset>
101
  <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Delete')?></span>
102
  </a>
103
  <div class="clearfix"></div><br/>
104
+ <table class="table table-striped paginated sg-backup-table sg-backups">
105
  <thead>
106
  <tr>
107
  <th><input type="checkbox" id="sg-checkbox-select-all" autocomplete="off"></th>
193
  </tbody>
194
  </table>
195
 
196
+ <div class="text-right sg-backups">
197
  <ul class="pagination"></ul>
198
  </div>
199
  </fieldset>
public/js/main.js CHANGED
@@ -404,21 +404,22 @@ sgBackup.showReviewModal = function(){
404
  }
405
  };
406
 
407
- sgBackup.initTablePagination = function(){
 
408
  jQuery.fn.sgTablePagination = function(opts){
409
  var jQuerythis = this,
410
  defaults = {
411
  perPage: 7,
412
  showPrevNext: false,
413
  hidePageNumbers: false,
414
- pagerSelector: 'pagination'
415
  },
416
  settings = jQuery.extend(defaults, opts);
417
 
418
  var listElement = jQuerythis.children('tbody');
419
  var perPage = settings.perPage;
420
  var children = listElement.children();
421
- var pager = jQuery('.pager');
422
 
423
  if (typeof settings.childSelector!="undefined") {
424
  children = listElement.find(settings.childSelector);
@@ -445,7 +446,7 @@ sgBackup.initTablePagination = function(){
445
 
446
  if(curr<=1){
447
  jQuery(settings.pagerSelector).parent('div').hide();
448
- jQuery('.page_link').hide();
449
  }
450
 
451
  if (settings.showPrevNext){
@@ -512,7 +513,7 @@ sgBackup.initTablePagination = function(){
512
 
513
  }
514
  };
515
- jQuery('table.paginated').sgTablePagination({pagerSelector:'.pagination',showPrevNext:true,hidePageNumbers:false,perPage:7});
516
  };
517
 
518
  sgBackup.logout = function()
404
  }
405
  };
406
 
407
+ sgBackup.initTablePagination = function(pageName){
408
+ var callBack = pageName+'';
409
  jQuery.fn.sgTablePagination = function(opts){
410
  var jQuerythis = this,
411
  defaults = {
412
  perPage: 7,
413
  showPrevNext: false,
414
  hidePageNumbers: false,
415
+ pagerSelector: '.'+pageName+' .pagination'
416
  },
417
  settings = jQuery.extend(defaults, opts);
418
 
419
  var listElement = jQuerythis.children('tbody');
420
  var perPage = settings.perPage;
421
  var children = listElement.children();
422
+ var pager = jQuery('.'+pageName+'.pager');
423
 
424
  if (typeof settings.childSelector!="undefined") {
425
  children = listElement.find(settings.childSelector);
446
 
447
  if(curr<=1){
448
  jQuery(settings.pagerSelector).parent('div').hide();
449
+ jQuery('.'+pageName+'.page_link').hide();
450
  }
451
 
452
  if (settings.showPrevNext){
513
 
514
  }
515
  };
516
+ jQuery('table.paginated.'+pageName).sgTablePagination({pagerSelector:'.'+pageName+' .pagination',showPrevNext:true,hidePageNumbers:false,perPage:7});
517
  };
518
 
519
  sgBackup.logout = function()
public/js/sgbackup.js CHANGED
@@ -16,7 +16,7 @@ jQuery(document).on('change', '.btn-file :file', function() {
16
  });
17
 
18
  jQuery(document).ready( function() {
19
- sgBackup.initTablePagination();
20
  sgBackup.initActiveAction();
21
  sgBackup.initBackupDeletion();
22
  sgBackup.toggleMultiDeleteButton();
16
  });
17
 
18
  jQuery(document).ready( function() {
19
+ sgBackup.initTablePagination('sg-backups');
20
  sgBackup.initActiveAction();
21
  sgBackup.initBackupDeletion();
22
  sgBackup.toggleMultiDeleteButton();
public/js/sgschedule.js CHANGED
@@ -5,7 +5,7 @@ BG_SCHEDULE_INTERVAL_MONTHLY = 3;
5
  BG_SCHEDULE_INTERVAL_YEARLY = 4;
6
 
7
  jQuery(document).ready( function() {
8
- // sgBackup.initTablePagination();
9
  sgBackup.initScheduleCreation();
10
  });
11
 
@@ -147,9 +147,9 @@ sgBackup.schedule = function(){
147
 
148
  sgBackup.initScheduleSwitchButtons = function() {
149
  jQuery('.sg-switch').bootstrapSwitch();
150
- if(jQuery('#sg-backup-page-content-schedule .sg-switch').is(':checked'))
151
  {
152
- jQuery('sg-backup-page-content-schedule .sg-schedule-settings').show();
153
  }
154
  jQuery('.sg-switch').on('switchChange.bootstrapSwitch', function (event, state) {
155
  var url = jQuery(this).attr('data-remote');
5
  BG_SCHEDULE_INTERVAL_YEARLY = 4;
6
 
7
  jQuery(document).ready( function() {
8
+ sgBackup.initTablePagination('sg-schedule');
9
  sgBackup.initScheduleCreation();
10
  });
11
 
147
 
148
  sgBackup.initScheduleSwitchButtons = function() {
149
  jQuery('.sg-switch').bootstrapSwitch();
150
+ if(jQuery('#sg-backup-page-content-schedule .sg-switch').is(':checked'))
151
  {
152
+ jQuery('#sg-backup-page-content-schedule .sg-schedule-settings').show();
153
  }
154
  jQuery('.sg-switch').on('switchChange.bootstrapSwitch', function (event, state) {
155
  var url = jQuery(this).attr('data-remote');
public/js/sgsettings.js CHANGED
@@ -1,5 +1,3 @@
1
- isDirty = false;
2
-
3
  jQuery(document).ready( function() {
4
  sgBackup.initGeneralSettingsSwitchButtons();
5
  AMOUNT_OF_BACKUPS_TO_KEEP = jQuery("#amount-of-backups-to-keep").val();
@@ -8,9 +6,10 @@ jQuery(document).ready( function() {
8
 
9
  window.onbeforeunload = function(){
10
  var msg = 'You haven\'t saved your changes.';
11
- isDirty = false;
12
-
13
- jQuery(':input').each(function () {
 
14
 
15
  if (jQuery(this).attr('type') == 'checkbox') {
16
  value = jQuery(this).prop('checked');
 
 
1
  jQuery(document).ready( function() {
2
  sgBackup.initGeneralSettingsSwitchButtons();
3
  AMOUNT_OF_BACKUPS_TO_KEEP = jQuery("#amount-of-backups-to-keep").val();
6
 
7
  window.onbeforeunload = function(){
8
  var msg = 'You haven\'t saved your changes.';
9
+ var isDirty = false;
10
+ var value;
11
+
12
+ jQuery('.sg-settings-container :input').each(function () {
13
 
14
  if (jQuery(this).attr('type') == 'checkbox') {
15
  value = jQuery(this).prop('checked');
public/pagesContent.php CHANGED
@@ -3,7 +3,7 @@ require_once(dirname(__FILE__).'/boot.php');
3
  require_once(SG_BACKUP_PATH.'SGBackup.php');
4
  require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
5
  require_once(SG_PUBLIC_INCLUDE_PATH.'sidebar.php');
6
-
7
  $pluginCapabilities = backupGuardGetCapabilities();
8
  ?>
9
  <div class="sg-top-info"><?php echo backupGuardLoggedMessage(); ?></div>
@@ -16,7 +16,11 @@ $pluginCapabilities = backupGuardGetCapabilities();
16
  <?php require_once(plugin_dir_path(__FILE__).'systemInfo.php'); ?>
17
  <?php require_once(plugin_dir_path(__FILE__).'services.php'); ?>
18
  <?php require_once(plugin_dir_path(__FILE__).'support.php'); ?>
19
- <?php require_once(plugin_dir_path(__FILE__).'proFeatures.php'); ?>
 
 
 
 
20
  </div>
21
  </div>
22
  <div class="clearfix"></div>
3
  require_once(SG_BACKUP_PATH.'SGBackup.php');
4
  require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
5
  require_once(SG_PUBLIC_INCLUDE_PATH.'sidebar.php');
6
+ $pluginCapabilities = backupGuardGetCapabilities();
7
  $pluginCapabilities = backupGuardGetCapabilities();
8
  ?>
9
  <div class="sg-top-info"><?php echo backupGuardLoggedMessage(); ?></div>
16
  <?php require_once(plugin_dir_path(__FILE__).'systemInfo.php'); ?>
17
  <?php require_once(plugin_dir_path(__FILE__).'services.php'); ?>
18
  <?php require_once(plugin_dir_path(__FILE__).'support.php'); ?>
19
+ <?php
20
+ if ($pluginCapabilities == BACKUP_GUARD_CAPABILITIES_FREE) {
21
+ require_once(plugin_dir_path(__FILE__).'proFeatures.php');
22
+ }
23
+ ?>
24
  </div>
25
  </div>
26
  <div class="clearfix"></div>