Version Description
- "Send usage data" setting addition
- Support section improvement
Download this release
Release Info
Developer | BackupGuard |
Plugin | WordPress Backup and Migrate Plugin – Backup Guard |
Version | 1.4.6 |
Comparing to | |
See all releases |
Code changes from version 1.4.5 to 1.4.6
- BackupGuard.php +14 -1
- README.txt +5 -1
- backup.php +2 -2
- com/config/config.wordpress.free.php +1 -1
- com/core/SGBoot.php +1 -0
- com/lib/SGStatsRequests.php +66 -0
- public/ajax/sendUsageStatus.php +8 -0
- public/ajax/storeSubscriberInfo.php +1 -0
- public/backups.php +153 -131
- public/css/bgstyle.less.css +44 -1
- public/css/bgstyle.wordpress.css +10 -5
- public/img/popupClose.png +0 -0
- public/include/sidebar.php +1 -1
- public/js/main.js +27 -1
- public/js/sgbackup.js +72 -66
- public/pagesContent.php +1 -1
- public/settings.php +10 -0
BackupGuard.php
CHANGED
@@ -435,7 +435,8 @@ function backup_guard_register_ajax_callbacks()
|
|
435 |
add_action('wp_ajax_backup_guard_checkBackupCreation', 'backup_guard_check_backup_creation');
|
436 |
add_action('wp_ajax_backup_guard_checkRestoreCreation', 'backup_guard_check_restore_creation');
|
437 |
add_action('wp_ajax_backup_guard_cloudDropbox', 'backup_guard_cloud_dropbox');
|
438 |
-
|
|
|
439 |
$pluginCapabilities = backupGuardGetCapabilities();
|
440 |
if ($pluginCapabilities != BACKUP_GUARD_CAPABILITIES_FREE) {
|
441 |
require_once dirname(__FILE__).'/BackupGuardPro.php';
|
@@ -607,6 +608,15 @@ function backup_guard_cloud_dropbox()
|
|
607 |
}
|
608 |
}
|
609 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
function backup_guard_curl_checker()
|
611 |
{
|
612 |
check_ajax_referer('backupGuardAjaxNonce', 'token');
|
@@ -779,6 +789,9 @@ function sgBackupAdminInit() {
|
|
779 |
'filterUpdateChecks'
|
780 |
));
|
781 |
}
|
|
|
|
|
|
|
782 |
}
|
783 |
|
784 |
add_action('admin_init', 'sgBackupAdminInit');
|
435 |
add_action('wp_ajax_backup_guard_checkBackupCreation', 'backup_guard_check_backup_creation');
|
436 |
add_action('wp_ajax_backup_guard_checkRestoreCreation', 'backup_guard_check_restore_creation');
|
437 |
add_action('wp_ajax_backup_guard_cloudDropbox', 'backup_guard_cloud_dropbox');
|
438 |
+
add_action('wp_ajax_backup_guard_send_usage_status', 'backup_guard_send_usage_status');
|
439 |
+
|
440 |
$pluginCapabilities = backupGuardGetCapabilities();
|
441 |
if ($pluginCapabilities != BACKUP_GUARD_CAPABILITIES_FREE) {
|
442 |
require_once dirname(__FILE__).'/BackupGuardPro.php';
|
608 |
}
|
609 |
}
|
610 |
|
611 |
+
function backup_guard_send_usage_status()
|
612 |
+
{
|
613 |
+
|
614 |
+
if (current_user_can('activate_plugins')) {
|
615 |
+
check_ajax_referer('backupGuardAjaxNonce', 'token');
|
616 |
+
require_once(SG_PUBLIC_AJAX_PATH . 'sendUsageStatus.php');
|
617 |
+
}
|
618 |
+
}
|
619 |
+
|
620 |
function backup_guard_curl_checker()
|
621 |
{
|
622 |
check_ajax_referer('backupGuardAjaxNonce', 'token');
|
789 |
'filterUpdateChecks'
|
790 |
));
|
791 |
}
|
792 |
+
|
793 |
+
require_once(SG_LIB_PATH.'SGStatsRequests.php');
|
794 |
+
SGStatsRequests::initialSync();
|
795 |
}
|
796 |
|
797 |
add_action('admin_init', 'sgBackupAdminInit');
|
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.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -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.5 =
|
171 |
* Fixed alert issue after clicking backup
|
172 |
* Minor fixes
|
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.6
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
167 |
6. Site backup customization
|
168 |
|
169 |
== Changelog ==
|
170 |
+
= 1.4.6 =
|
171 |
+
* "Send usage data" setting addition
|
172 |
+
* Support section improvement
|
173 |
+
|
174 |
= 1.4.5 =
|
175 |
* Fixed alert issue after clicking backup
|
176 |
* Minor fixes
|
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.
|
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.
|
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.6
|
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.6');
|
20 |
}
|
21 |
|
22 |
if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
|
com/config/config.wordpress.free.php
CHANGED
@@ -38,5 +38,5 @@ define('SG_STORAGE_DROPBOX_REDIRECT_URI', 'https://backup-guard.com/dropbox/');
|
|
38 |
define('SG_PRODUCT_IDENTIFIER', 'backup-guard-wp-free');
|
39 |
|
40 |
//BackupGuard Support URL
|
41 |
-
define('SG_BACKUP_SUPPORT_URL', 'https://backup-guard.com/
|
42 |
define('BG_UPGRADE_URL', 'https://backup-guard.com/products/backup-wordpress#pricing');
|
38 |
define('SG_PRODUCT_IDENTIFIER', 'backup-guard-wp-free');
|
39 |
|
40 |
//BackupGuard Support URL
|
41 |
+
define('SG_BACKUP_SUPPORT_URL', 'https://help.backup-guard.com/en/');
|
42 |
define('BG_UPGRADE_URL', 'https://backup-guard.com/products/backup-wordpress#pricing');
|
com/core/SGBoot.php
CHANGED
@@ -95,6 +95,7 @@ class SGBoot
|
|
95 |
('SG_BACKUP_SYNCHRONOUS_STORAGE_UPLOAD','1'),
|
96 |
('SG_NOTIFICATIONS_ENABLED','0'),
|
97 |
('SG_SHOW_STATISTICS_WIDGET','1'),
|
|
|
98 |
('SG_NOTIFICATIONS_EMAIL_ADDRESS',''),
|
99 |
('SG_STORAGE_BACKUPS_FOLDER_NAME','sg_backups');"
|
100 |
);
|
95 |
('SG_BACKUP_SYNCHRONOUS_STORAGE_UPLOAD','1'),
|
96 |
('SG_NOTIFICATIONS_ENABLED','0'),
|
97 |
('SG_SHOW_STATISTICS_WIDGET','1'),
|
98 |
+
('SG_BACKUP_SEND_USAGE_STATUS','0'),
|
99 |
('SG_NOTIFICATIONS_EMAIL_ADDRESS',''),
|
100 |
('SG_STORAGE_BACKUPS_FOLDER_NAME','sg_backups');"
|
101 |
);
|
com/lib/SGStatsRequests.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
use BackupGuard\Helper;
|
3 |
+
|
4 |
+
class SGStatsRequests
|
5 |
+
{
|
6 |
+
public static function initialSync()
|
7 |
+
{
|
8 |
+
$allowDataCollection = SGConfig::get('SG_BACKUP_SEND_USAGE_STATUS');
|
9 |
+
$allowInitialSync = SGConfig::get('SG_BACKUP_INITIAL_SYNC');
|
10 |
+
|
11 |
+
if ($allowDataCollection && !$allowInitialSync) {
|
12 |
+
SGConfig::set('SG_BACKUP_INITIAL_SYNC', 1);
|
13 |
+
$data = self::getInitialSyncData();
|
14 |
+
Helper::sendPostRequest(
|
15 |
+
'/stats/init',
|
16 |
+
$data
|
17 |
+
);
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
private static function getInitialSyncData()
|
22 |
+
{
|
23 |
+
$ip = self::getIpAddress();
|
24 |
+
$pluginVersion = SG_BACKUP_GUARD_VERSION;
|
25 |
+
global $wp_version;
|
26 |
+
$url = get_site_url();
|
27 |
+
$capabilities = backupGuardGetCapabilities();
|
28 |
+
|
29 |
+
$data = array(
|
30 |
+
'ip' => $ip,
|
31 |
+
'pluginVersion' => $pluginVersion,
|
32 |
+
'WPVersion' => $wp_version,
|
33 |
+
'URL' => $url,
|
34 |
+
'pluginPackage' => $capabilities,
|
35 |
+
);
|
36 |
+
|
37 |
+
return apply_filters('sgBackupInitialSyncData', $data);
|
38 |
+
}
|
39 |
+
|
40 |
+
public static function getIpAddress()
|
41 |
+
{
|
42 |
+
$ipAddress = 'UNKNOWN';
|
43 |
+
|
44 |
+
if (getenv('HTTP_CLIENT_IP')) {
|
45 |
+
$ipAddress = getenv('HTTP_CLIENT_IP');
|
46 |
+
}
|
47 |
+
else if (getenv('HTTP_X_FORWARDED_FOR')) {
|
48 |
+
$ipAddress = getenv('HTTP_X_FORWARDED_FOR');
|
49 |
+
}
|
50 |
+
else if (getenv('HTTP_X_FORWARDED')) {
|
51 |
+
$ipAddress = getenv('HTTP_X_FORWARDED');
|
52 |
+
}
|
53 |
+
else if (getenv('HTTP_FORWARDED_FOR')) {
|
54 |
+
$ipAddress = getenv('HTTP_FORWARDED_FOR');
|
55 |
+
}
|
56 |
+
else if (getenv('HTTP_FORWARDED')) {
|
57 |
+
$ipAddress = getenv('HTTP_FORWARDED');
|
58 |
+
}
|
59 |
+
else if (getenv('REMOTE_ADDR')) {
|
60 |
+
$ipAddress = getenv('REMOTE_ADDR');
|
61 |
+
}
|
62 |
+
|
63 |
+
return $ipAddress;
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
public/ajax/sendUsageStatus.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__).'/../boot.php');
|
3 |
+
|
4 |
+
if(backupGuardIsAjax() && count($_POST)) {
|
5 |
+
|
6 |
+
$usageStatus = $_POST['currentStatus'] == "true" ? 1 : 0;
|
7 |
+
SGConfig::set('SG_BACKUP_SEND_USAGE_STATUS', $usageStatus);
|
8 |
+
}
|
public/ajax/storeSubscriberInfo.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
require_once(dirname(__FILE__).'/../boot.php');
|
4 |
require_once(SG_LIB_PATH.'BackupGuard/Client.php');
|
|
|
5 |
|
6 |
if(backupGuardIsAjax() && count($_POST)) {
|
7 |
$_POST = backupGuardRemoveSlashes($_POST);
|
2 |
|
3 |
require_once(dirname(__FILE__).'/../boot.php');
|
4 |
require_once(SG_LIB_PATH.'BackupGuard/Client.php');
|
5 |
+
require_once(dirname(__FILE__).'/sendUsageStatus.php');
|
6 |
|
7 |
if(backupGuardIsAjax() && count($_POST)) {
|
8 |
$_POST = backupGuardRemoveSlashes($_POST);
|
public/backups.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
$backups = SGBackup::getAllBackups();
|
3 |
$downloadUrl = admin_url('admin-post.php?action=backup_guard_downloadBackup&');
|
4 |
$contentClassName = getBackupPageContentClassName('backups');
|
|
|
5 |
?>
|
6 |
<div id="sg-backup-page-content-backups" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
7 |
<?php if(SGConfig::get('SG_REVIEW_POPUP_STATE') == SG_SHOW_REVIEW_POPUP): ?>
|
@@ -14,45 +15,56 @@ $contentClassName = getBackupPageContentClassName('backups');
|
|
14 |
<div class="bg-verify-user-info-popup-tbl">
|
15 |
<div class="bg-verify-user-info-popup-cel">
|
16 |
<div class="bg-verify-user-info-popup-content">
|
17 |
-
<a href="javascript:void(0)" class="bg-verify-user-info-cancel"><img src="<?php echo SG_IMAGE_URL.'
|
18 |
<div class="bg-verify-user-info-popup-inner-content">
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
<p class="bg-verify-user-info-desc">
|
21 |
-
<?php _backupGuardT('
|
|
|
|
|
22 |
</p>
|
23 |
<form>
|
24 |
<div class="bg-verify-user-info-form-group">
|
25 |
<div class="bg-verify-user-info-form-twocol">
|
26 |
-
<input name="bg-verify-user-info-name" id="bg-verify-user-info-name" class="regular-text" type="text" value="" placeholder="First Name" />
|
27 |
<span id="bg-verify-user-info-name-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter First Name.'); ?></span>
|
28 |
</div>
|
29 |
<div class="bg-verify-user-info-form-twocol">
|
30 |
-
<input name="bg-verify-user-info-last-name" id="bg-verify-user-info-last-name" class="regular-text" type="text" value="" placeholder="Last Name" />
|
31 |
<span id="bg-verify-user-info-last-name-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Last Name.'); ?></span>
|
32 |
</div>
|
33 |
</div>
|
34 |
<div class="bg-verify-user-info-form-group">
|
35 |
<div class="bg-verify-user-info-form-onecol">
|
36 |
-
<input name="bg-verify-user-info-email" id="bg-verify-user-info-email" class="regular-text" type="text" value="" placeholder="Email Address" />
|
37 |
<span id="bg-verify-user-info-email-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Valid Email Address.'); ?></span>
|
38 |
</div>
|
39 |
</div>
|
40 |
<div class="bg-verify-user-info-form-group">
|
41 |
<div class="bg-verify-user-info-form-onecol">
|
42 |
<select name="bg-verify-user-prioraty" id="bg-verify-user-prioraty">
|
43 |
-
<option value=""><?php _backupGuardT('
|
44 |
<option value="local backup"><?php _backupGuardT('Local Backup') ?></option>
|
45 |
<option value="cloud backup"><?php _backupGuardT('Cloud Backup') ?></option>
|
46 |
-
<option value="scheduling"><?php _backupGuardT('Scheduling') ?></option>
|
47 |
<option value="migration"><?php _backupGuardT('Migration') ?></option>
|
48 |
-
<option value="other"><?php _backupGuardT('Other') ?></option>
|
49 |
</select>
|
50 |
<span id="bg-verify-user-info-priority-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Select Your Priority.'); ?></span>
|
51 |
</div>
|
52 |
</div>
|
53 |
<div class="bg-verify-user-info-form-group">
|
54 |
<div class="bg-verify-user-info-form-onecol">
|
55 |
-
<input name="bg-verify-user-priorati-custom" id="bg-verify-user-priorati-custom" class="regular-text" type="text" placeholder="<?php _backupGuardT('
|
56 |
<span id="bg-verify-user-info-priority-custom-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Your Priority.'); ?></span>
|
57 |
</div>
|
58 |
</div>
|
@@ -60,8 +72,18 @@ $contentClassName = getBackupPageContentClassName('backups');
|
|
60 |
<button class="bg-verify-user-info-verify-email button button-primary"><?php _backupGuardT("Subscribe") ?></button>
|
61 |
</div>
|
62 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</div>
|
64 |
-
<div class="bg-privacy-links-container">
|
65 |
<a href="<?php echo BACKUP_GUARD_TERMS_OF_SERVICE_URL ?>" target="_blank"><?php _backupGuardT('Terms of Service'); ?></a>
|
66 |
<a href="<?php echo BACKUP_GUARD_PRIVACY_POLICY_URL ?>" target="_blank"><?php _backupGuardT('Privacy Policy'); ?></a>
|
67 |
</div>
|
@@ -71,131 +93,131 @@ $contentClassName = getBackupPageContentClassName('backups');
|
|
71 |
</div>
|
72 |
|
73 |
<?php endif; ?>
|
74 |
-
|
75 |
-
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
<div class="clearfix"></div>
|
201 |
</div>
|
2 |
$backups = SGBackup::getAllBackups();
|
3 |
$downloadUrl = admin_url('admin-post.php?action=backup_guard_downloadBackup&');
|
4 |
$contentClassName = getBackupPageContentClassName('backups');
|
5 |
+
$allowDataCollection = SGConfig::get('SG_BACKUP_SEND_USAGE_STATUS');
|
6 |
?>
|
7 |
<div id="sg-backup-page-content-backups" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
8 |
<?php if(SGConfig::get('SG_REVIEW_POPUP_STATE') == SG_SHOW_REVIEW_POPUP): ?>
|
15 |
<div class="bg-verify-user-info-popup-tbl">
|
16 |
<div class="bg-verify-user-info-popup-cel">
|
17 |
<div class="bg-verify-user-info-popup-content">
|
18 |
+
<a href="javascript:void(0)" class="bg-verify-user-info-cancel"><img src="<?php echo SG_IMAGE_URL.'popupClose.png' ?>" class="wp_fm_loader" /></a>
|
19 |
<div class="bg-verify-user-info-popup-inner-content">
|
20 |
+
<?php
|
21 |
+
$displayName = 'Admin';
|
22 |
+
if (function_exists('wp_get_current_user')) {
|
23 |
+
$currentUser = wp_get_current_user();
|
24 |
+
}
|
25 |
+
if (!empty($currentUser)) {
|
26 |
+
$displayName = $currentUser->display_name;
|
27 |
+
$displayName = ucfirst($displayName);
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
<h3 class="sgbg-welcome-title"><?php _backupGuardT('Hey');echo " ".$displayName;?>!</h3>
|
31 |
<p class="bg-verify-user-info-desc">
|
32 |
+
<?php _backupGuardT('Thank you for choosing Backup Guard - the greatest WordPress backup plugin.
|
33 |
+
We recommend filling in the form below before starting to use the plugin.
|
34 |
+
This will provide us with an opportunity to make the experience so much better for you!'); ?>
|
35 |
</p>
|
36 |
<form>
|
37 |
<div class="bg-verify-user-info-form-group">
|
38 |
<div class="bg-verify-user-info-form-twocol">
|
39 |
+
<input name="bg-verify-user-info-name" id="bg-verify-user-info-name" class="regular-text sg-backup-input" type="text" value="" placeholder="First Name" />
|
40 |
<span id="bg-verify-user-info-name-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter First Name.'); ?></span>
|
41 |
</div>
|
42 |
<div class="bg-verify-user-info-form-twocol">
|
43 |
+
<input name="bg-verify-user-info-last-name" id="bg-verify-user-info-last-name" class="regular-text sg-backup-input" type="text" value="" placeholder="Last Name" />
|
44 |
<span id="bg-verify-user-info-last-name-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Last Name.'); ?></span>
|
45 |
</div>
|
46 |
</div>
|
47 |
<div class="bg-verify-user-info-form-group">
|
48 |
<div class="bg-verify-user-info-form-onecol">
|
49 |
+
<input name="bg-verify-user-info-email" id="bg-verify-user-info-email" class="regular-text sg-backup-input" type="text" value="" placeholder="Email Address" />
|
50 |
<span id="bg-verify-user-info-email-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Valid Email Address.'); ?></span>
|
51 |
</div>
|
52 |
</div>
|
53 |
<div class="bg-verify-user-info-form-group">
|
54 |
<div class="bg-verify-user-info-form-onecol">
|
55 |
<select name="bg-verify-user-prioraty" id="bg-verify-user-prioraty">
|
56 |
+
<option value=""><?php _backupGuardT('What will you use the plugin for?') ?></option>
|
57 |
<option value="local backup"><?php _backupGuardT('Local Backup') ?></option>
|
58 |
<option value="cloud backup"><?php _backupGuardT('Cloud Backup') ?></option>
|
|
|
59 |
<option value="migration"><?php _backupGuardT('Migration') ?></option>
|
60 |
+
<option value="other"><?php _backupGuardT('Other Feature(s)') ?></option>
|
61 |
</select>
|
62 |
<span id="bg-verify-user-info-priority-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Select Your Priority.'); ?></span>
|
63 |
</div>
|
64 |
</div>
|
65 |
<div class="bg-verify-user-info-form-group">
|
66 |
<div class="bg-verify-user-info-form-onecol">
|
67 |
+
<input name="bg-verify-user-priorati-custom" id="bg-verify-user-priorati-custom" class="regular-text sg-backup-input" type="text" placeholder="<?php _backupGuardT('Feature(s)') ?>" hidden>
|
68 |
<span id="bg-verify-user-info-priority-custom-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Your Priority.'); ?></span>
|
69 |
</div>
|
70 |
</div>
|
72 |
<button class="bg-verify-user-info-verify-email button button-primary"><?php _backupGuardT("Subscribe") ?></button>
|
73 |
</div>
|
74 |
</form>
|
75 |
+
<div class="row sgbg-send-usage-data-wrapper">
|
76 |
+
<div class="sg-data-collection-label">
|
77 |
+
<label class="sg-control-label"><?php _backupGuardT('Automatically send anonymous diagnostic and usage data')?></label>
|
78 |
+
</div>
|
79 |
+
<div class="backup-send-usage-data-status-wrapper">
|
80 |
+
<label class="sg-switch-container">
|
81 |
+
<input type="checkbox" name="backup-send-usage-data-status" class="sg-switch backup-send-usage-data-status" checked="checked">
|
82 |
+
</label>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
</div>
|
86 |
+
<div class="bg-initial-privacy-links-container">
|
87 |
<a href="<?php echo BACKUP_GUARD_TERMS_OF_SERVICE_URL ?>" target="_blank"><?php _backupGuardT('Terms of Service'); ?></a>
|
88 |
<a href="<?php echo BACKUP_GUARD_PRIVACY_POLICY_URL ?>" target="_blank"><?php _backupGuardT('Privacy Policy'); ?></a>
|
89 |
</div>
|
93 |
</div>
|
94 |
|
95 |
<?php endif; ?>
|
96 |
+
<fieldset>
|
97 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Backups')?></h1></div>
|
98 |
|
99 |
+
<a href="javascript:void(0)" id="sg-manual-backup" class="pull-left btn btn-success sg-backup-action-buttons" data-toggle="modal" data-modal-name="manual-backup" data-remote="modalManualBackup" sg-data-backup-type="<?php echo SG_BACKUP_METHOD_STANDARD ?>">
|
100 |
+
<span class="sg-backup-start sg-backup-buttons-content"></span>
|
101 |
+
<span class="sg-backup-buttons-content sg-backup-buttons-text"><?php _backupGuardT('Backup')?></span>
|
102 |
+
</a>
|
103 |
|
104 |
+
<a href="javascript:void(0)" id="sg-backup-with-migration" class="pull-left btn btn-primary sg-backup-action-buttons" data-toggle="modal" data-modal-name="manual-backup" data-remote="modalManualBackup" sg-data-backup-type="<?php echo SG_BACKUP_METHOD_MIGRATE ?>"<?php echo SGBoot::isFeatureAvailable('BACKUP_WITH_MIGRATION')?'':'disabled' ?>>
|
105 |
+
<span class="sg-backup-migrate sg-backup-buttons-content"></span>
|
106 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Migrate')?></span>
|
107 |
+
</a>
|
108 |
+
<a href="javascript:void(0)" id="sg-import" class="btn btn-primary sg-margin-left-12 pull-left sg-backup-action-buttons" data-toggle="modal" data-modal-name="import" data-remote="modalImport">
|
109 |
+
<span class="sg-backup-import sg-backup-buttons-content"></span>
|
110 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Import')?><span>
|
111 |
+
</a>
|
112 |
+
<?php if ($pluginCapabilities == BACKUP_GUARD_CAPABILITIES_FREE): ?>
|
113 |
+
<a href="<?php echo BACKUP_GUARD_WORDPRESS_SUPPORT_URL; ?>" target="_blank">
|
114 |
+
<button type="button" id="sg-report-problem-button" class="btn btn btn-primary sg-margin-left-12 pull-right sg-backup-action-buttons sg-button-red pull-right">
|
115 |
+
<span class="sg-backup-report"></span>
|
116 |
|
117 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Report issue')?></span>
|
118 |
+
</button>
|
119 |
+
</a>
|
120 |
+
<?php endif; ?>
|
121 |
+
<a id="sg-delete-multi-backups" class="pull-right btn btn-danger sg-margin-left-12 sg-backup-action-buttons">
|
122 |
+
<span class="sg-backup-delete sg-backup-buttons-content"></span>
|
123 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Delete')?></span>
|
124 |
+
</a>
|
125 |
+
<div class="clearfix"></div><br/>
|
126 |
+
<table class="table table-striped paginated sg-backup-table sg-backups">
|
127 |
+
<thead>
|
128 |
+
<tr>
|
129 |
+
<th><input type="checkbox" id="sg-checkbox-select-all" autocomplete="off"></th>
|
130 |
+
<th><?php _backupGuardT('Filename')?></th>
|
131 |
+
<th><?php _backupGuardT('Size')?></th>
|
132 |
+
<th><?php _backupGuardT('Date')?></th>
|
133 |
+
<th><?php _backupGuardT('Status')?></th>
|
134 |
+
<th><?php _backupGuardT('Actions')?></th>
|
135 |
+
</tr>
|
136 |
+
</thead>
|
137 |
+
<tbody>
|
138 |
+
<?php if(empty($backups)):?>
|
139 |
+
<tr>
|
140 |
+
<td colspan="6"><?php _backupGuardT('No backups found.')?></td>
|
141 |
+
</tr>
|
142 |
+
<?php endif;?>
|
143 |
+
<?php foreach($backups as $backup): ?>
|
144 |
+
<tr>
|
145 |
+
<td><input type="checkbox" autocomplete="off" value="<?php echo $backup['name']?>" <?php echo $backup['active']?'disabled':''?>></td>
|
146 |
+
<td><?php echo $backup['name'] ?></td>
|
147 |
+
<td><?php echo !$backup['active']?$backup['size']:'' ?></td>
|
148 |
+
<td><?php echo backupGuardConvertDateTimezone($backup['date']) ?></td>
|
149 |
+
<td id="sg-status-tabe-data-<?php echo $backup['id']?>" <?php echo $backup['active']?'data-toggle="tooltip" data-placement="top" data-original-title="" data-container="#sg-wrapper"':''?>>
|
150 |
+
<?php if($backup['active']):
|
151 |
+
$filteredStatuses = backupGuardFilterStatusesByActionType($backup, $backup['options']);
|
152 |
+
?>
|
153 |
+
<input type="hidden" class="sg-active-action-id" value="<?php echo $backup['id'];?>"/>
|
154 |
+
<?php foreach ($filteredStatuses as $statusCode): ?>
|
155 |
+
<span class="btn-xs sg-status-icon sg-status-<?php echo $statusCode; ?>"> </span>
|
156 |
+
<?php endforeach; ?>
|
157 |
+
<div class="sg-progress progress">
|
158 |
+
<div class="progress-bar"></div>
|
159 |
+
</div>
|
160 |
+
<?php else: ?>
|
161 |
+
<?php if ($backup['status'] == SG_ACTION_STATUS_FINISHED_WARNINGS): ?>
|
162 |
+
<span class="btn-xs text-warning" data-toggle="tooltip" data-placement="top" data-original-title="<?php if($backup['type']==SG_ACTION_TYPE_BACKUP): echo _backupGuardT('Warnings found during backup',true); elseif($backup['type']==SG_ACTION_TYPE_RESTORE): echo _backupGuardT('Warnings found during restore',true); else: echo _backupGuardT('Warnings found during upload',true); endif; ?>" data-container="#sg-wrapper"><?php _backupGuardT('Warning')?></span>
|
163 |
+
<?php elseif ($backup['status'] == SG_ACTION_STATUS_ERROR): ?>
|
164 |
+
<span class="btn-xs text-danger" data-toggle="tooltip" data-placement="top" data-original-title="<?php if($backup['type']==SG_ACTION_TYPE_BACKUP): echo _backupGuardT('Errors found during backup',true); elseif($backup['type']==SG_ACTION_TYPE_RESTORE): echo _backupGuardT('Errors found during restore',true); else: echo _backupGuardT('Errors found during upload',true);
|
165 |
+
endif; ?>" data-container="#sg-wrapper"><?php _backupGuardT('Failed')?></span>
|
166 |
+
<?php else: ?>
|
167 |
+
<span class="btn-xs sg-text-success"><?php _backupGuardT('Success')?></span>
|
168 |
+
<?php endif;?>
|
169 |
+
<?php endif; ?>
|
170 |
+
</td>
|
171 |
+
<td class="sg-backup-actions-td">
|
172 |
+
<?php if($backup['active']): ?>
|
173 |
+
<?php if($backup['type'] != SG_ACTION_TYPE_RESTORE): ?>
|
174 |
+
<a class="btn-xs sg-cancel-backup" sg-data-backup-id="<?php echo $backup['id']?>" href="javascript:void(0)" title="<?php _backupGuardT('Stop')?>"> </a>
|
175 |
+
<?php endif; ?>
|
176 |
+
<?php else: ?>
|
177 |
+
<a href="javascript:void(0)" data-sgbackup-name="<?php echo htmlspecialchars($backup['name']);?>" data-remote="deleteBackup" class="sg-remove-backup btn-xs" title="<?php _backupGuardT('Delete')?>"> </a>
|
178 |
+
<div class="btn-group">
|
179 |
+
<a href="javascript:void(0)" class="sg-bg-download-button btn-xs" data-toggle="dropdown1" aria-expanded="false" title="<?php _backupGuardT('Download')?>">
|
180 |
|
181 |
+
</a>
|
182 |
+
<ul class="dropdown-menu">
|
183 |
+
<?php if($backup['files']):?>
|
184 |
+
<li>
|
185 |
+
<a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_SGBP ?>">
|
186 |
+
<i class="glyphicon glyphicon-hdd" aria-hidden="true"></i> <?php _backupGuardT('Backup')?>
|
187 |
+
</a>
|
188 |
+
</li>
|
189 |
+
<?php endif;?>
|
190 |
+
<?php if($backup['backup_log']):?>
|
191 |
+
<li>
|
192 |
+
<a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_BACKUP_LOG ?>">
|
193 |
+
<i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i> <?php _backupGuardT('Backup log')?>
|
194 |
+
</a>
|
195 |
+
</li>
|
196 |
+
<?php endif;?>
|
197 |
+
<?php if($backup['restore_log']):?>
|
198 |
+
<li>
|
199 |
+
<a href="<?php echo $downloadUrl.'backupName='.@$backup['name'].'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_RESTORE_LOG ?>">
|
200 |
+
<i class="glyphicon glyphicon-th-list" aria-hidden="true"></i> <?php _backupGuardT('Restore log')?>
|
201 |
+
</a>
|
202 |
+
</li>
|
203 |
+
<?php endif;?>
|
204 |
+
</ul>
|
205 |
+
</div>
|
206 |
+
<?php if(file_exists(SG_BACKUP_DIRECTORY.$backup['name'].'/'.$backup['name'].'.sgbp')):?>
|
207 |
+
<a href="javascript:void(0)" title="<?php _backupGuardT('Restore')?>" class="sg-restore-button btn-xs" data-toggle="modal" data-modal-name="manual-restore" data-remote="modalManualRestore" data-sgbp-params="<?php echo htmlspecialchars($backup['name']) ?>">
|
208 |
|
209 |
+
</a>
|
210 |
+
<?php endif;?>
|
211 |
+
<?php endif; ?>
|
212 |
+
</td>
|
213 |
+
</tr>
|
214 |
+
<?php endforeach; ?>
|
215 |
+
</tbody>
|
216 |
+
</table>
|
217 |
|
218 |
+
<div class="text-right sg-backups">
|
219 |
+
<ul class="pagination"></ul>
|
220 |
+
</div>
|
221 |
+
</fieldset>
|
222 |
<div class="clearfix"></div>
|
223 |
</div>
|
public/css/bgstyle.less.css
CHANGED
@@ -8258,4 +8258,47 @@ a#sg-logo:focus {
|
|
8258 |
height: 137px;
|
8259 |
}
|
8260 |
}
|
8261 |
-
/*Pricing table page CSS*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8258 |
height: 137px;
|
8259 |
}
|
8260 |
}
|
8261 |
+
/*Pricing table page CSS*/
|
8262 |
+
|
8263 |
+
.sgbg-welcome-title {
|
8264 |
+
margin-top: 0 !important;
|
8265 |
+
margin-bottom: 6px !important;
|
8266 |
+
}
|
8267 |
+
|
8268 |
+
.sg-data-collection-label {
|
8269 |
+
text-align: left;
|
8270 |
+
display: inline-block;
|
8271 |
+
margin-right: 10px;
|
8272 |
+
vertical-align: text-bottom;
|
8273 |
+
}
|
8274 |
+
|
8275 |
+
.sg-data-collection-label label {
|
8276 |
+
font-weight: normal;
|
8277 |
+
}
|
8278 |
+
|
8279 |
+
.backup-send-usage-data-status-wrapper {
|
8280 |
+
text-align: left;
|
8281 |
+
display: inline-block;
|
8282 |
+
}
|
8283 |
+
|
8284 |
+
.bg-initial-privacy-links-container {
|
8285 |
+
border-top: 1px solid #ddd;
|
8286 |
+
padding-top: 20px;
|
8287 |
+
margin-top: 20px;;
|
8288 |
+
}
|
8289 |
+
|
8290 |
+
.bg-initial-privacy-links-container a {
|
8291 |
+
font-size: 16px;
|
8292 |
+
text-decoration: none;
|
8293 |
+
margin: 0 15px;
|
8294 |
+
color: #016cb0;
|
8295 |
+
}
|
8296 |
+
|
8297 |
+
.sgbg-send-usage-data-wrapper {
|
8298 |
+
margin-top: 20px;
|
8299 |
+
text-align: center;
|
8300 |
+
}
|
8301 |
+
|
8302 |
+
.sgbg-send-usage-data-wrapper span.bootstrap-switch-handle-on.bootstrap-switch-primary {
|
8303 |
+
background: #007cba;
|
8304 |
+
}
|
public/css/bgstyle.wordpress.css
CHANGED
@@ -62,7 +62,7 @@
|
|
62 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content a.bg-verify-user-info-cancel {
|
63 |
position: absolute;
|
64 |
right: 15px;
|
65 |
-
top:
|
66 |
text-decoration: none;
|
67 |
/* font-size: 24px; */
|
68 |
/* color: #016cb0; */
|
@@ -76,12 +76,13 @@
|
|
76 |
transition: all 0.5s ease;
|
77 |
-webkit-transition: all 0.5s ease;
|
78 |
}
|
|
|
79 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content .bg-verify-user-info-cancel img {
|
80 |
|
81 |
border: 2px solid grey;
|
82 |
border-radius: 50%;
|
83 |
width: 28px;
|
84 |
-
}
|
85 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content a.bg-verify-user-info-cancel:hover{
|
86 |
/*color:#fff;
|
87 |
background:#016cb0;*/
|
@@ -91,14 +92,15 @@
|
|
91 |
}
|
92 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content .bg-verify-user-info-desc {
|
93 |
/* text-transform: uppercase; */
|
94 |
-
font-size:
|
95 |
-
max-width: 450px;
|
96 |
margin: 0 auto;
|
97 |
margin-bottom: 30px;
|
98 |
color: #808080;
|
|
|
99 |
}
|
100 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content h3 {
|
101 |
-
font-size:
|
102 |
font-family:'Raleway';
|
103 |
font-weight:700;
|
104 |
color:#000;
|
@@ -123,13 +125,16 @@ padding: 0 5px;
|
|
123 |
border: 1px solid #ddd;
|
124 |
box-shadow: none !important;
|
125 |
padding: 10px;
|
|
|
126 |
}
|
127 |
.bg-verify-user-info-container .bg-verify-user-info-form-group select {
|
128 |
width: 100%;
|
|
|
129 |
border: 1px solid #ddd;
|
130 |
box-shadow: none !important;
|
131 |
height: 43px;
|
132 |
padding-left: 10px;
|
|
|
133 |
}
|
134 |
.bg-verify-user-info-container .bg-privacy-links-container {
|
135 |
border-top:1px solid #ddd;
|
62 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content a.bg-verify-user-info-cancel {
|
63 |
position: absolute;
|
64 |
right: 15px;
|
65 |
+
top: 13px;
|
66 |
text-decoration: none;
|
67 |
/* font-size: 24px; */
|
68 |
/* color: #016cb0; */
|
76 |
transition: all 0.5s ease;
|
77 |
-webkit-transition: all 0.5s ease;
|
78 |
}
|
79 |
+
/*
|
80 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content .bg-verify-user-info-cancel img {
|
81 |
|
82 |
border: 2px solid grey;
|
83 |
border-radius: 50%;
|
84 |
width: 28px;
|
85 |
+
} */
|
86 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content a.bg-verify-user-info-cancel:hover{
|
87 |
/*color:#fff;
|
88 |
background:#016cb0;*/
|
92 |
}
|
93 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content .bg-verify-user-info-desc {
|
94 |
/* text-transform: uppercase; */
|
95 |
+
font-size: 15px;
|
96 |
+
/* max-width: 450px; */
|
97 |
margin: 0 auto;
|
98 |
margin-bottom: 30px;
|
99 |
color: #808080;
|
100 |
+
text-align: left;
|
101 |
}
|
102 |
.bg-verify-user-info-container .bg-verify-user-info-popup-tbl .bg-verify-user-info-popup-cel .bg-verify-user-info-popup-content h3 {
|
103 |
+
font-size: 33px;
|
104 |
font-family:'Raleway';
|
105 |
font-weight:700;
|
106 |
color:#000;
|
125 |
border: 1px solid #ddd;
|
126 |
box-shadow: none !important;
|
127 |
padding: 10px;
|
128 |
+
border-radius: 0;
|
129 |
}
|
130 |
.bg-verify-user-info-container .bg-verify-user-info-form-group select {
|
131 |
width: 100%;
|
132 |
+
max-width: 100%;
|
133 |
border: 1px solid #ddd;
|
134 |
box-shadow: none !important;
|
135 |
height: 43px;
|
136 |
padding-left: 10px;
|
137 |
+
border-radius: 0;
|
138 |
}
|
139 |
.bg-verify-user-info-container .bg-privacy-links-container {
|
140 |
border-top:1px solid #ddd;
|
public/img/popupClose.png
ADDED
Binary file
|
public/include/sidebar.php
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
<div class="title">
|
36 |
<span class="sg-action-menu-arrow"></span>
|
37 |
</div>
|
38 |
-
|
39 |
<nav class="sidebar dark sg-backup-sidebar-nav">
|
40 |
<ul>
|
41 |
<li class="<?php echo strpos($page,'backups')?'active':''?>">
|
35 |
<div class="title">
|
36 |
<span class="sg-action-menu-arrow"></span>
|
37 |
</div>
|
38 |
+
</a>
|
39 |
<nav class="sidebar dark sg-backup-sidebar-nav">
|
40 |
<ul>
|
41 |
<li class="<?php echo strpos($page,'backups')?'active':''?>">
|
public/js/main.js
CHANGED
@@ -73,6 +73,28 @@ sgBackup.init = function(){
|
|
73 |
sgBackup.initModals();
|
74 |
sgBackup.downloadButton();
|
75 |
sgBackup.navMenu();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
};
|
77 |
|
78 |
sgBackup.navMenu = function ()
|
@@ -83,12 +105,16 @@ sgBackup.navMenu = function ()
|
|
83 |
return false;
|
84 |
}
|
85 |
|
86 |
-
navMenu.bind('click', function (event) {
|
87 |
event.preventDefault();
|
88 |
sgBackup.init();
|
89 |
jQuery('.sg-backup-page-content').addClass('sg-visibility-hidden');
|
90 |
jQuery('.sg-backup-sidebar-nav li').removeClass('active');
|
|
|
91 |
|
|
|
|
|
|
|
92 |
var currentKey = jQuery(this).data('page-key');
|
93 |
var currentPageContent = jQuery('#sg-backup-page-content-'+currentKey);
|
94 |
|
73 |
sgBackup.initModals();
|
74 |
sgBackup.downloadButton();
|
75 |
sgBackup.navMenu();
|
76 |
+
sgBackup.sendUsageDataStatus();
|
77 |
+
};
|
78 |
+
|
79 |
+
sgBackup.sendUsageDataStatus = function ()
|
80 |
+
{
|
81 |
+
var checkbox = jQuery('.backup-send-usage-data-status');
|
82 |
+
|
83 |
+
if (!checkbox.length) {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
checkbox.bind('switchChange.bootstrapSwitch', function () {
|
88 |
+
var currentStatus = jQuery(this).is(':checked');
|
89 |
+
var action = 'send_usage_status';
|
90 |
+
jQuery(this).prop('disabled', true);
|
91 |
+
var ajaxHandler = new sgRequestHandler(action, {currentStatus: currentStatus, token: BG_BACKUP_STRINGS.nonce});
|
92 |
+
ajaxHandler.callback = function(data, error) {
|
93 |
+
jQuery(this).prop('disabled', false);
|
94 |
+
}
|
95 |
+
|
96 |
+
ajaxHandler.run();
|
97 |
+
});
|
98 |
};
|
99 |
|
100 |
sgBackup.navMenu = function ()
|
105 |
return false;
|
106 |
}
|
107 |
|
108 |
+
navMenu.unbind('click').bind('click', function (event) {
|
109 |
event.preventDefault();
|
110 |
sgBackup.init();
|
111 |
jQuery('.sg-backup-page-content').addClass('sg-visibility-hidden');
|
112 |
jQuery('.sg-backup-sidebar-nav li').removeClass('active');
|
113 |
+
var currentUrl = jQuery(this).attr('href');
|
114 |
|
115 |
+
if (currentUrl.indexOf('wordpress.org') != -1) {
|
116 |
+
window.open(currentUrl);
|
117 |
+
}
|
118 |
var currentKey = jQuery(this).data('page-key');
|
119 |
var currentPageContent = jQuery('#sg-backup-page-content-'+currentKey);
|
120 |
|
public/js/sgbackup.js
CHANGED
@@ -61,8 +61,7 @@ jQuery(document).ready( function() {
|
|
61 |
}
|
62 |
});
|
63 |
|
64 |
-
|
65 |
-
jQuery('.bg-verify-user-info-cancel').click(function(e) {
|
66 |
e.preventDefault();
|
67 |
|
68 |
jQuery('.bg-verify-user-info-container').slideUp();
|
@@ -70,7 +69,12 @@ jQuery(document).ready( function() {
|
|
70 |
|
71 |
var ajaxHandler = new sgRequestHandler('setUserInfoVerificationPopupState', {token: BG_BACKUP_STRINGS.nonce});
|
72 |
ajaxHandler.run();
|
73 |
-
}
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
jQuery('#bg-verify-user-prioraty').on('change', function () {
|
76 |
if (jQuery(this).val() == "other") {
|
@@ -123,12 +127,14 @@ jQuery(document).ready( function() {
|
|
123 |
if(sendData) {
|
124 |
jQuery('.bg-verify-user-info-container').slideUp();
|
125 |
jQuery('.bg-verify-user-info-overlay').hide();
|
|
|
126 |
|
127 |
var ajaxHandler = new sgRequestHandler('storeSubscriberInfo', {
|
128 |
email: email,
|
129 |
fname: fname,
|
130 |
lname: lname,
|
131 |
priority: priority,
|
|
|
132 |
token: BG_BACKUP_STRINGS.nonce
|
133 |
});
|
134 |
|
@@ -138,8 +144,8 @@ jQuery(document).ready( function() {
|
|
138 |
});
|
139 |
|
140 |
sgBackup.isValidEmailAddress = function(emailAddress) {
|
141 |
-
|
142 |
-
|
143 |
};
|
144 |
|
145 |
sgBackup.getSelectedBackupsNumber = function() {
|
@@ -150,23 +156,23 @@ sgBackup.toggleMultiDeleteButton = function() {
|
|
150 |
var numberOfChoosenBackups = sgBackup.getSelectedBackupsNumber();
|
151 |
var target = jQuery('#sg-delete-multi-backups');
|
152 |
if (numberOfChoosenBackups > 0) {
|
153 |
-
|
154 |
}
|
155 |
else {
|
156 |
-
|
157 |
}
|
158 |
};
|
159 |
|
160 |
sgBackup.closeFreeBaner = function() {
|
161 |
jQuery('.sg-close-free-banner').bind('click', function () {
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
};
|
168 |
-
|
169 |
-
|
170 |
};
|
171 |
|
172 |
sgBackup.deleteMultiBackups = function(backupNames){
|
@@ -403,57 +409,57 @@ sgBackup.toggleDownloadFromCloudPage = function(){
|
|
403 |
};
|
404 |
|
405 |
sgBackup.downloadFromCloud = function (path, name, storage, size) {
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
|
412 |
-
|
413 |
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
|
428 |
-
|
429 |
-
|
430 |
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
|
435 |
-
|
436 |
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
|
443 |
-
|
444 |
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
};
|
458 |
|
459 |
sgBackup.downloadFromPC = function(){
|
@@ -503,18 +509,18 @@ sgBackup.downloadFromPC = function(){
|
|
503 |
};
|
504 |
|
505 |
sgBackup.fileDownloadProgress = function(file, size){
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
};
|
519 |
|
520 |
sgBackup.fileUploadProgress = function(e){
|
61 |
}
|
62 |
});
|
63 |
|
64 |
+
var surveyClose = function(e) {
|
|
|
65 |
e.preventDefault();
|
66 |
|
67 |
jQuery('.bg-verify-user-info-container').slideUp();
|
69 |
|
70 |
var ajaxHandler = new sgRequestHandler('setUserInfoVerificationPopupState', {token: BG_BACKUP_STRINGS.nonce});
|
71 |
ajaxHandler.run();
|
72 |
+
};
|
73 |
+
|
74 |
+
jQuery('.bg-verify-user-info-overlay').bind('click', surveyClose);
|
75 |
+
|
76 |
+
|
77 |
+
jQuery('.bg-verify-user-info-cancel').click(surveyClose);
|
78 |
|
79 |
jQuery('#bg-verify-user-prioraty').on('change', function () {
|
80 |
if (jQuery(this).val() == "other") {
|
127 |
if(sendData) {
|
128 |
jQuery('.bg-verify-user-info-container').slideUp();
|
129 |
jQuery('.bg-verify-user-info-overlay').hide();
|
130 |
+
var currentStatus = jQuery('.backup-send-usage-data-status').is(':checked');
|
131 |
|
132 |
var ajaxHandler = new sgRequestHandler('storeSubscriberInfo', {
|
133 |
email: email,
|
134 |
fname: fname,
|
135 |
lname: lname,
|
136 |
priority: priority,
|
137 |
+
currentStatus: currentStatus,
|
138 |
token: BG_BACKUP_STRINGS.nonce
|
139 |
});
|
140 |
|
144 |
});
|
145 |
|
146 |
sgBackup.isValidEmailAddress = function(emailAddress) {
|
147 |
+
var pattern = new RegExp(/^(("[\w-+\s]+")|([\w-+]+(?:\.[\w-+]+)*)|("[\w-+\s]+")([\w-+]+(?:\.[\w-+]+)*))(@((?:[\w-+]+\.)*\w[\w-+]{0,66})\.([a-z]{2,10}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][\d]\.|1[\d]{2}\.|[\d]{1,2}\.))((25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\.){2}(25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\]?$)/i);
|
148 |
+
return pattern.test(emailAddress);
|
149 |
};
|
150 |
|
151 |
sgBackup.getSelectedBackupsNumber = function() {
|
156 |
var numberOfChoosenBackups = sgBackup.getSelectedBackupsNumber();
|
157 |
var target = jQuery('#sg-delete-multi-backups');
|
158 |
if (numberOfChoosenBackups > 0) {
|
159 |
+
target.removeAttr('disabled');
|
160 |
}
|
161 |
else {
|
162 |
+
target.attr('disabled','disabled');
|
163 |
}
|
164 |
};
|
165 |
|
166 |
sgBackup.closeFreeBaner = function() {
|
167 |
jQuery('.sg-close-free-banner').bind('click', function () {
|
168 |
+
var ajaxHandler = new sgRequestHandler('closeFreeBanner', {
|
169 |
+
token: BG_BACKUP_STRINGS.nonce
|
170 |
+
});
|
171 |
+
ajaxHandler.callback = function(response, error) {
|
172 |
+
jQuery('#sg-banner').remove();
|
173 |
};
|
174 |
+
ajaxHandler.run();
|
175 |
+
});
|
176 |
};
|
177 |
|
178 |
sgBackup.deleteMultiBackups = function(backupNames){
|
409 |
};
|
410 |
|
411 |
sgBackup.downloadFromCloud = function (path, name, storage, size) {
|
412 |
+
sgBackup.showAjaxSpinner('.modal-dialog');
|
413 |
+
var error = [];
|
414 |
+
if (!path) {
|
415 |
+
error.push(BG_BACKUP_STRINGS.invalidDownloadFile);
|
416 |
+
}
|
417 |
|
418 |
+
jQuery('.alert').remove();
|
419 |
|
420 |
+
if (error.length) {
|
421 |
+
sgBackup.hideAjaxSpinner();
|
422 |
+
var sgAlert = sgBackup.alertGenerator(error, 'alert-danger');
|
423 |
+
jQuery('#sg-modal .modal-header').prepend(sgAlert);
|
424 |
+
return false;
|
425 |
+
}
|
426 |
|
427 |
+
var downloadFromCloudHandler = new sgRequestHandler('downloadFromCloud', {
|
428 |
+
path: path,
|
429 |
+
storage: storage,
|
430 |
+
size: size,
|
431 |
+
token: BG_BACKUP_STRINGS.nonce
|
432 |
+
});
|
433 |
|
434 |
+
jQuery('#switch-modal-import-pages-back').hide();
|
435 |
+
jQuery('#uploadSgbpFile').attr('disabled', 'disabled');
|
436 |
|
437 |
+
downloadFromCloudHandler.callback = function (response, error){
|
438 |
+
sgBackup.hideAjaxSpinner();
|
439 |
+
jQuery('.alert').remove();
|
440 |
|
441 |
+
clearTimeout(SG_DOWNLOAD_PROGRESS);
|
442 |
|
443 |
+
if (typeof response.success !== 'undefined') {
|
444 |
+
location.reload();
|
445 |
+
}
|
446 |
+
else {
|
447 |
+
jQuery('#uploadSgbpFile').html(BG_BACKUP_STRINGS.import);
|
448 |
|
449 |
+
var sgAlert = sgBackup.alertGenerator(response.error, 'alert-danger');
|
450 |
|
451 |
+
jQuery('#uploadSgbpFile').attr('disabled', false);
|
452 |
+
jQuery('#switch-modal-import-pages-back').toggle();
|
453 |
+
jQuery('#sg-modal .modal-header').prepend(sgAlert);
|
454 |
+
SG_ACTIVE_DOWNLOAD_AJAX = false;
|
455 |
|
456 |
+
return false;
|
457 |
+
}
|
458 |
+
};
|
459 |
|
460 |
+
SG_ACTIVE_DOWNLOAD_AJAX = true;
|
461 |
+
downloadFromCloudHandler.run();
|
462 |
+
sgBackup.fileDownloadProgress(name, size);
|
463 |
};
|
464 |
|
465 |
sgBackup.downloadFromPC = function(){
|
509 |
};
|
510 |
|
511 |
sgBackup.fileDownloadProgress = function(file, size){
|
512 |
+
var getFileDownloadProgress = new sgRequestHandler('getFileDownloadProgress', {file: file, size: size, token: BG_BACKUP_STRINGS.nonce});
|
513 |
+
|
514 |
+
getFileDownloadProgress.callback = function(response){
|
515 |
+
if (typeof response.progress !== 'undefined') {
|
516 |
+
jQuery('#uploadSgbpFile').html('Importing ('+ Math.round(response.progress)+'%)');
|
517 |
+
SG_DOWNLOAD_PROGRESS = setTimeout(function () {
|
518 |
+
getFileDownloadProgress.run();
|
519 |
+
}, SG_AJAX_REQUEST_FREQUENCY);
|
520 |
+
}
|
521 |
+
};
|
522 |
+
|
523 |
+
getFileDownloadProgress.run();
|
524 |
};
|
525 |
|
526 |
sgBackup.fileUploadProgress = function(e){
|
public/pagesContent.php
CHANGED
@@ -17,7 +17,7 @@ $pluginCapabilities = backupGuardGetCapabilities();
|
|
17 |
<?php require_once(plugin_dir_path(__FILE__).'services.php'); ?>
|
18 |
<?php require_once(plugin_dir_path(__FILE__).'support.php'); ?>
|
19 |
<?php
|
20 |
-
if (
|
21 |
require_once(plugin_dir_path(__FILE__).'proFeatures.php');
|
22 |
}
|
23 |
?>
|
17 |
<?php require_once(plugin_dir_path(__FILE__).'services.php'); ?>
|
18 |
<?php require_once(plugin_dir_path(__FILE__).'support.php'); ?>
|
19 |
<?php
|
20 |
+
if (SGBoot::isFeatureAvailable('SHOW_UPGRADE_PAGE')) {
|
21 |
require_once(plugin_dir_path(__FILE__).'proFeatures.php');
|
22 |
}
|
23 |
?>
|
public/settings.php
CHANGED
@@ -145,6 +145,16 @@ $contentClassName = getBackupPageContentClassName('settings');
|
|
145 |
</label>
|
146 |
</div>
|
147 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
<div class="form-group">
|
150 |
<label class="col-md-3 sg-control-label" for='sg-paths-to-exclude'><?php _backupGuardT("Exclude paths (separated by commas)")?></label>
|
145 |
</label>
|
146 |
</div>
|
147 |
</div>
|
148 |
+
<div class="form-group">
|
149 |
+
<label class="col-md-3 sg-control-label">
|
150 |
+
<?php _backupGuardT('Send usage data'); ?>
|
151 |
+
</label>
|
152 |
+
<div class="col-md-3 text-left">
|
153 |
+
<label class="sg-switch-container">
|
154 |
+
<input type="checkbox" name="backup-send-usage-data-status" class="sg-switch backup-send-usage-data-status" <?php echo $allowDataCollection?'checked="checked"':''?>>
|
155 |
+
</label>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
|
159 |
<div class="form-group">
|
160 |
<label class="col-md-3 sg-control-label" for='sg-paths-to-exclude'><?php _backupGuardT("Exclude paths (separated by commas)")?></label>
|