GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 07805d...9051f0 )
by Liuta
06:03 queued 03:27
created
admin/partials/xcloner_restore_page.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$xcloner_settings 		= new Xcloner_Settings();
4
-$logger					= new Xcloner_Logger();
5
-$xcloner_file_system 	= new Xcloner_File_System();
6
-$xcloner_file_transfer 	= new Xcloner_File_Transfer();
3
+$xcloner_settings = new Xcloner_Settings();
4
+$logger = new Xcloner_Logger();
5
+$xcloner_file_system = new Xcloner_File_System();
6
+$xcloner_file_transfer = new Xcloner_File_Transfer();
7 7
 
8
-$start = 0 ;
8
+$start = 0;
9 9
 
10 10
 $backup_list = $xcloner_file_system->get_latest_backups();
11 11
 
@@ -21,22 +21,22 @@  discard block
 block discarded – undo
21 21
 	<div class="col s12">
22 22
 		<ul class="collapsible xcloner-restore " data-collapsible="accordion">
23 23
 			<li data-step="1" class="restore-script-upload-step steps active show">
24
-				<div class="collapsible-header active"><i class="material-icons">settings_remote</i><?php echo __("Restore Script Upload",'xcloner-backup-and-restore')?></div>
24
+				<div class="collapsible-header active"><i class="material-icons">settings_remote</i><?php echo __("Restore Script Upload", 'xcloner-backup-and-restore')?></div>
25 25
 				<div class="collapsible-body row">
26 26
 						
27 27
 						<ul class="text-steps">
28
-							<li><?php echo __("Please download the restore script from",'xcloner-backup-and-restore')?> <a href='#' onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here",'xcloner-backup-and-restore')?></strong></a>
28
+							<li><?php echo __("Please download the restore script from", 'xcloner-backup-and-restore')?> <a href='#' onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here", 'xcloner-backup-and-restore')?></strong></a>
29 29
 							</li>	
30 30
 							<li>
31
-							<?php echo __("Extract the files on your new host",'xcloner-backup-and-restore')?>
31
+							<?php echo __("Extract the files on your new host", 'xcloner-backup-and-restore')?>
32 32
 							</li>
33 33
 							<li>
34
-							<?php echo __("Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php",'xcloner-backup-and-restore')?>
34
+							<?php echo __("Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php", 'xcloner-backup-and-restore')?>
35 35
 							</li>
36 36
 							<li>
37
-							<?php echo __("If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.",'xcloner-backup-and-restore')?>
37
+							<?php echo __("If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.", 'xcloner-backup-and-restore')?>
38 38
 							</li>
39
-							<?php if(is_ssl()):?>
39
+							<?php if (is_ssl()):?>
40 40
 							<li>
41 41
 								<?php echo __("We have detected your connection to the site as being secure, so your restore script address must start with https://.")?>
42 42
 							</li>
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 						</ul>	
46 46
 						
47 47
 						<div class="input-field col l9 s12">
48
-							<input value="<?php echo (is_ssl())?"https://":"http://"?>" id="restore_script_url" type="text" class="validate" placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php" >
48
+							<input value="<?php echo (is_ssl()) ? "https://" : "http://"?>" id="restore_script_url" type="text" class="validate" placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php" >
49 49
 							<label for="restore_script_url"></label>
50 50
 							<div id="url_validation_status" class="status"></div>
51 51
 				        </div>
52 52
 				        <div class="col l3 s12 right-align">
53
-							<button class="btn waves-effect waves-light" type="submit" id="validate_url" name="action"><?php echo __("Check",'xcloner-backup-and-restore')?>
53
+							<button class="btn waves-effect waves-light" type="submit" id="validate_url" name="action"><?php echo __("Check", 'xcloner-backup-and-restore')?>
54 54
 							    <i class="material-icons right">send</i>
55 55
 							</button>
56 56
 				        </div>
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
 			</li>
59 59
 			
60 60
 			<li data-step="2" class="backup-upload-step steps">
61
-				<div class="collapsible-header active"><i class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Remote Host",'xcloner-backup-and-restore')?>
61
+				<div class="collapsible-header active"><i class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Remote Host", 'xcloner-backup-and-restore')?>
62 62
 				</div>
63 63
 				<div class="collapsible-body row">
64
-					<p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.",'xcloner-backup-and-restore')?></p>
64
+					<p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.", 'xcloner-backup-and-restore')?></p>
65 65
 					<div class="input-field col s12 l7">
66 66
 						<select id="backup_file" name="backup_file" class="browser-default">
67
-					      <option value="" disabled selected><?php echo __("Please select a local backup archive to upload to remote host",'xcloner-backup-and-restore')?></option>
68
-					      <?php if(is_array($backup_list)):?>
69
-							<?php foreach($backup_list as $file):?>
67
+					      <option value="" disabled selected><?php echo __("Please select a local backup archive to upload to remote host", 'xcloner-backup-and-restore')?></option>
68
+					      <?php if (is_array($backup_list)):?>
69
+							<?php foreach ($backup_list as $file):?>
70 70
 								<option value="<?php echo $file['basename']?>">
71 71
 								<?php echo $file['basename']?> (<?php echo size_format($file['size'])?>)
72 72
 								</option>
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
 					</div>
83 83
 					<div class="col s12 l5 right-align">
84 84
 						<div class="toggler">
85
-							<button class="btn waves-effect waves-light upload-backup normal" type="submit" id="" name="action"><?php echo __("Upload",'xcloner-backup-and-restore')?>
85
+							<button class="btn waves-effect waves-light upload-backup normal" type="submit" id="" name="action"><?php echo __("Upload", 'xcloner-backup-and-restore')?>
86 86
 							    <i class="material-icons right">send</i>
87 87
 							</button>
88
-							<button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id="" name="action"><?php echo __("Cancel",'xcloner-backup-and-restore')?>
88
+							<button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore')?>
89 89
 							    <i class="material-icons right">close</i>
90 90
 							</button>
91 91
 						</div>
92
-						<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next",'xcloner-backup-and-restore')?>" id="skip_upload_backup" name="action"><?php echo __("Next",'xcloner-backup-and-restore')?>
92
+						<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next", 'xcloner-backup-and-restore')?>" id="skip_upload_backup" name="action"><?php echo __("Next", 'xcloner-backup-and-restore')?>
93 93
 						    <i class="material-icons right">navigate_next</i>
94 94
 						</button>
95 95
 					</div>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			</li>	
98 98
 			
99 99
 			<li data-step="3" class="restore-remote-backup-step steps active">
100
-				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Remote Host",'xcloner-backup-and-restore')?>
100
+				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Remote Host", 'xcloner-backup-and-restore')?>
101 101
 						<i class="material-icons right" title="Refresh Remote Backup Files List" id="refresh_remote_backup_file">cached</i>
102 102
 
103 103
 						<div class="switch right">
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 						<div class=" col s12 l7">
115 115
 							<div class="input-field row">
116 116
 								<input type="text" name="remote_restore_path" id="remote_restore_path" class="validate" placeholder="Restore Target Path">
117
-								<label><?php echo __("Remote Restore Target Path",'xcloner-backup-and-restore')?></label>
117
+								<label><?php echo __("Remote Restore Target Path", 'xcloner-backup-and-restore')?></label>
118 118
 							</div>
119 119
 							
120 120
 							<div class="input-field row">
121 121
 								<select id="remote_backup_file" name="remote_backup_file" class="browser-default">
122
-									<option value="" disabled selected><?php echo __("Please select the remote backup file to restore",'xcloner-backup-and-restore')?></option>
122
+									<option value="" disabled selected><?php echo __("Please select the remote backup file to restore", 'xcloner-backup-and-restore')?></option>
123 123
 							    </select>
124 124
 							    <label></label>
125 125
 							</div>
@@ -134,14 +134,14 @@  discard block
 block discarded – undo
134 134
 				       
135 135
 				        <div class="col s12 l5 right-align">
136 136
 							<div class="toggler">
137
-								<button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" id="" name="action"><?php echo __("Restore",'xcloner-backup-and-restore')?>
137
+								<button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore')?>
138 138
 								    <i class="material-icons right">send</i>
139 139
 								</button>
140
-								<button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit" id="" name="action"><?php echo __("Cancel",'xcloner-backup-and-restore')?>
140
+								<button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit" id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore')?>
141 141
 								    <i class="material-icons right">close</i>
142 142
 								</button>
143 143
 							</div>
144
-							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next",'xcloner-backup-and-restore')?>" id="skip_remote_backup_step" name="action"><?php echo __("Next",'xcloner-backup-and-restore')?>
144
+							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next", 'xcloner-backup-and-restore')?>" id="skip_remote_backup_step" name="action"><?php echo __("Next", 'xcloner-backup-and-restore')?>
145 145
 								<i class="material-icons right">navigate_next</i>
146 146
 							</button>
147 147
 				        </div>
@@ -149,71 +149,71 @@  discard block
 block discarded – undo
149 149
 			</li>
150 150
 			
151 151
 			<li data-step="4" class="restore-remote-database-step steps active">
152
-				<div class="collapsible-header"><i class="material-icons">list</i><?php echo __("Restore Remote Database - Search and Replace",'xcloner-backup-and-restore')?>
152
+				<div class="collapsible-header"><i class="material-icons">list</i><?php echo __("Restore Remote Database - Search and Replace", 'xcloner-backup-and-restore')?>
153 153
 					<i class="material-icons right" title="Refresh Database Backup Files List" id="refresh_database_file">cached</i>
154 154
 				</div>
155 155
 				<div class="collapsible-body row">
156 156
 						
157 157
 						<div class="col s12">
158
-							<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-tooltip="<?php echo __('Please provide below the mysql connection details for the remote host database.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
159
-							<h5><?php echo __('Remote Mysql Details','xcloner-backup-and-restore')?></h5>
158
+							<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-tooltip="<?php echo __('Please provide below the mysql connection details for the remote host database.', 'xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
159
+							<h5><?php echo __('Remote Mysql Details', 'xcloner-backup-and-restore')?></h5>
160 160
 						</div>						
161 161
 						<div class=" col s12">
162 162
 							<div class="input-field col s12 m6">
163 163
 								<input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate" placeholder="Remote Mysql Hostname" value="localhost">
164
-								<label><?php echo __("Remote Mysql Hostname",'xcloner-backup-and-restore')?></label>
164
+								<label><?php echo __("Remote Mysql Hostname", 'xcloner-backup-and-restore')?></label>
165 165
 							</div>
166 166
 							
167 167
 							<div class="input-field  col s12 m6">
168 168
 								<input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate" placeholder="Remote Mysql Database">
169
-								<label><?php echo __("Remote Mysql Database",'xcloner-backup-and-restore')?></label>
169
+								<label><?php echo __("Remote Mysql Database", 'xcloner-backup-and-restore')?></label>
170 170
 							</div>
171 171
 							
172 172
 							<div class="input-field  col s12 m6">
173 173
 								<input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate" placeholder="Remote Mysql Username">
174
-								<label><?php echo __("Remote Mysql Username",'xcloner-backup-and-restore')?></label>
174
+								<label><?php echo __("Remote Mysql Username", 'xcloner-backup-and-restore')?></label>
175 175
 							</div>
176 176
 							
177 177
 							
178 178
 							<div class="input-field  col s12 m6">
179 179
 								<input type="text" name="remote_mysql_pass" id="remote_mysql_pass" class="validate" placeholder="Remote Mysql Password">
180
-								<label><?php echo __("Remote Mysql Password",'xcloner-backup-and-restore')?></label>
180
+								<label><?php echo __("Remote Mysql Password", 'xcloner-backup-and-restore')?></label>
181 181
 							</div>
182 182
 							
183 183
 						</div>	
184 184
 						<div class="col s12">
185
-						<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
186
-							<h5><?php echo __('Remote Mysql Search and Replace','xcloner-backup-and-restore')?></h5>
185
+						<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.', 'xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
186
+							<h5><?php echo __('Remote Mysql Search and Replace', 'xcloner-backup-and-restore')?></h5>
187 187
 						</div>
188 188
 						<div class="col s12">  
189 189
 							<div class="input-field col s12 m6 ">
190
-									<input type="text" name="wp_home_url" id="wp_home_url" class="validate" placeholder="WP Home Url" value="<?php echo home_url();?>">
191
-									<label><?php echo __("Source Home Url",'xcloner-backup-and-restore')?></label>
190
+									<input type="text" name="wp_home_url" id="wp_home_url" class="validate" placeholder="WP Home Url" value="<?php echo home_url(); ?>">
191
+									<label><?php echo __("Source Home Url", 'xcloner-backup-and-restore')?></label>
192 192
 							</div>	
193 193
 							
194 194
 							<div class="input-field col s12 m6 ">
195 195
 									<input type="text" name="remote_restore_url" id="remote_restore_url" class="validate" placeholder="Restore Target Url">
196
-									<label><?php echo __("With Target Home Url",'xcloner-backup-and-restore')?></label>
196
+									<label><?php echo __("With Target Home Url", 'xcloner-backup-and-restore')?></label>
197 197
 							</div>
198 198
 						
199
-						<?php if( site_url() != home_url()) : ?>
199
+						<?php if (site_url() != home_url()) : ?>
200 200
 							<div class="input-field col s12 m6 ">
201
-									<input type="text" name="wp_site_url" id="wp_site_url" class="validate" placeholder="WP Site Url" value="<?php echo site_url();?>">
202
-									<label><?php echo __("Source Site Url",'xcloner-backup-and-restore')?></label>
201
+									<input type="text" name="wp_site_url" id="wp_site_url" class="validate" placeholder="WP Site Url" value="<?php echo site_url(); ?>">
202
+									<label><?php echo __("Source Site Url", 'xcloner-backup-and-restore')?></label>
203 203
 							</div>	
204 204
 							
205 205
 							<div class="input-field col s12 m6 ">
206 206
 									<input type="text" name="remote_restore_site_url" id="remote_restore_site_url" class="validate" placeholder="Restore Target Url">
207
-									<label><?php echo __("With Target Site Url",'xcloner-backup-and-restore')?></label>
207
+									<label><?php echo __("With Target Site Url", 'xcloner-backup-and-restore')?></label>
208 208
 							</div>
209 209
 						
210
-						<?php endif;?>
210
+						<?php endif; ?>
211 211
 						</div>
212 212
 						
213 213
 						<div class=" col s12 l7">
214 214
 							<div class="input-field row">
215 215
 								<select id="remote_database_file" name="remote_database_file" class="browser-default">
216
-									<option value="" disabled selected><?php echo __("Please select the remote database backup file to restore",'xcloner-backup-and-restore')?></option>
216
+									<option value="" disabled selected><?php echo __("Please select the remote database backup file to restore", 'xcloner-backup-and-restore')?></option>
217 217
 							    </select>
218 218
 							    
219 219
 							    <label></label>
@@ -232,15 +232,15 @@  discard block
 block discarded – undo
232 232
 				      
233 233
 				        <div class="col s12 l5 right-align">
234 234
 							<div class="toggler">
235
-								<button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit" id="" name="action"><?php echo __("Restore",'xcloner-backup-and-restore')?>
235
+								<button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit" id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore')?>
236 236
 								    <i class="material-icons right">send</i>
237 237
 								</button>
238
-								<button class="btn waves-effect waves-light red restore_remote_mysqldump cancel" type="submit" id="" name="action"><?php echo __("Cancel",'xcloner-backup-and-restore')?>
238
+								<button class="btn waves-effect waves-light red restore_remote_mysqldump cancel" type="submit" id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore')?>
239 239
 								    <i class="material-icons right">close</i>
240 240
 								</button>
241 241
 							</div>
242 242
 							
243
-							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next",'xcloner-backup-and-restore')?>" id="skip_restore_remote_database_step" name="action"><?php echo __("Next",'xcloner-backup-and-restore')?>
243
+							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next", 'xcloner-backup-and-restore')?>" id="skip_restore_remote_database_step" name="action"><?php echo __("Next", 'xcloner-backup-and-restore')?>
244 244
 								<i class="material-icons right">navigate_next</i>
245 245
 							</button>
246 246
 							
@@ -250,13 +250,13 @@  discard block
 block discarded – undo
250 250
 			</li>
251 251
 			
252 252
 			<li data-step="5" class="restore-finish-step steps active">
253
-				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Finishing up...",'xcloner-backup-and-restore')?>
253
+				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Finishing up...", 'xcloner-backup-and-restore')?>
254 254
 				</div>
255 255
 				<div class="collapsible-body row">
256 256
 						
257 257
 						<div class="row">
258 258
 							<div class="col s4">
259
-								<label><?php echo __("Update wp-config.php mysql details and update the restored site Url",'xcloner-backup-and-restore')?></label>
259
+								<label><?php echo __("Update wp-config.php mysql details and update the restored site Url", 'xcloner-backup-and-restore')?></label>
260 260
 							</div>
261 261
 							
262 262
 							<div class="col s8">
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 						
274 274
 						<div class="row">
275 275
 							<div class="col s4">
276
-								<label><?php echo __("Delete Restored Backup Temporary Folder",'xcloner-backup-and-restore')?></label>
276
+								<label><?php echo __("Delete Restored Backup Temporary Folder", 'xcloner-backup-and-restore')?></label>
277 277
 							</div>
278 278
 							<div class="col s8">
279 279
 								<div class="switch">
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 						
290 290
 						<div class="row">
291 291
 							<div class="col s4">
292
-								<label><?php echo __("Delete Restore Script",'xcloner-backup-and-restore')?></label>
292
+								<label><?php echo __("Delete Restore Script", 'xcloner-backup-and-restore')?></label>
293 293
 							</div>
294 294
 							<div class="col s8">
295 295
 								<div class="switch">
@@ -308,15 +308,15 @@  discard block
 block discarded – undo
308 308
 				        </div>
309 309
 				        
310 310
 						<div class=" row col s12 center-align" id="xcloner_restore_finish">
311
-							<h5><?php echo __("Thank you for using XCloner.",'xcloner-backup-and-restore')?></h5>
312
-							<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'),'<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>') ?></h6>
311
+							<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore')?></h5>
312
+							<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>') ?></h6>
313 313
 							<a class="twitter-follow-button" href="https://twitter.com/thinkovi" data-show-count="false">Follow @thinkovi</a>
314 314
 							<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script>
315 315
 				        </div>
316 316
 				        
317 317
 				        <div class="col s12 center-align">
318 318
 
319
-							<button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" name="action"><?php echo __("Finish",'xcloner-backup-and-restore')?>
319
+							<button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" name="action"><?php echo __("Finish", 'xcloner-backup-and-restore')?>
320 320
 								<i class="material-icons right">navigate_next</i>
321 321
 							</button>
322 322
 				        </div>
Please login to merge, or discard this patch.
admin/partials/xcloner_generate_backups_page.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 <h1><?= esc_html(get_admin_page_title()); ?></h1>
11 11
          
12 12
 <ul class="nav-tab-wrapper content row">
13
-	<li><a href="#backup_options" class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo $tab.". ".__('Backup Options','xcloner-backup-and-restore')?></a></li>
14
-	<?php if($xcloner_settings->get_enable_mysql_backup()):?>
15
-		<li><a href="#database_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Database Options','xcloner-backup-and-restore')?></a></li>
13
+	<li><a href="#backup_options" class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo $tab.". ".__('Backup Options', 'xcloner-backup-and-restore')?></a></li>
14
+	<?php if ($xcloner_settings->get_enable_mysql_backup()):?>
15
+		<li><a href="#database_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Database Options', 'xcloner-backup-and-restore')?></a></li>
16 16
 	<?php endif?>
17
-	<li><a href="#files_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Files Options','xcloner-backup-and-restore')?></a></li>
18
-	<li><a href="#generate_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Generate Backup','xcloner-backup-and-restore')?></a></li>
19
-	<li><a href="#schedule_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Schedule Backup','xcloner-backup-and-restore')?></a></li>
17
+	<li><a href="#files_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Files Options', 'xcloner-backup-and-restore')?></a></li>
18
+	<li><a href="#generate_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Generate Backup', 'xcloner-backup-and-restore')?></a></li>
19
+	<li><a href="#schedule_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Schedule Backup', 'xcloner-backup-and-restore')?></a></li>
20 20
 </ul>
21 21
 
22 22
 <form action="" method="POST" id="generate_backup_form">
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
 		        <div class="input-field inline col s12 m10 l6">
28 28
 					<i class="material-icons prefix">input</i>
29 29
 					<input name="backup_name" id="backup_name" type="text" value=<?php echo $xcloner_settings->get_default_backup_name() ?> >
30
-					<label for="backup_name"><?php echo __('Backup Name','xcloner-backup-and-restore')?></label>
30
+					<label for="backup_name"><?php echo __('Backup Name', 'xcloner-backup-and-restore')?></label>
31 31
 				</div>
32 32
 				<div class="hide-on-small-only m2">
33
-					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]','xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
33
+					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]', 'xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
34 34
 				</div>
35 35
 		     </div>
36 36
 		     
37 37
 		     <div class="row">
38 38
 		        <div class="input-field inline col s12 m10 l6">
39 39
 					<i class="material-icons prefix">input</i>
40
-					<input name="email_notification" id="email_notification" type="text" value="<?php echo get_option('admin_email');?>" >
41
-					<label for="email_notification"><?php echo __('Send Email Notification To','xcloner-backup-and-restore')?></label>
40
+					<input name="email_notification" id="email_notification" type="text" value="<?php echo get_option('admin_email'); ?>" >
41
+					<label for="email_notification"><?php echo __('Send Email Notification To', 'xcloner-backup-and-restore')?></label>
42 42
 				</div>
43 43
 				<div class="hide-on-small-only m2">
44
-					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('If left blank, no notification will be sent','xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
44
+					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('If left blank, no notification will be sent', 'xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
45 45
 				</div>
46 46
 		     </div>
47 47
 		     
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 				<div class="input-field col s12 m10 l6">
50 50
 					<i class="material-icons prefix">input</i>
51 51
 					<textarea name="backup_comments" id="backup_comments" class="materialize-textarea"></textarea>
52
-					<label for="backup_comments"><?php echo __('Backup Comments','xcloner-backup-and-restore')?></label>
52
+					<label for="backup_comments"><?php echo __('Backup Comments', 'xcloner-backup-and-restore')?></label>
53 53
 				</div>
54 54
 				<div class="hide-on-small-only m2">
55
-					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive','xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
55
+					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive', 'xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
56 56
 				</div>
57 57
 		     </div>
58 58
 		     
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 			 </div>
64 64
 		</div>
65 65
 		
66
-		<?php if($xcloner_settings->get_enable_mysql_backup()):?>
66
+		<?php if ($xcloner_settings->get_enable_mysql_backup()):?>
67 67
 		<div id="database_options" class="tab-content">
68 68
 			<h2><?php echo __('Select database data to include in the backup', 'xcloner-backup-and-restore')?>:
69
-				<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install','xcloner-backup-and-restore');?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
69
+				<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install', 'xcloner-backup-and-restore'); ?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
70 70
 			</h2>
71 71
 			
72 72
 			<!-- database/tables tree -->
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 		<?php endif ?>
87 87
 		
88 88
 		<div id="files_options" class="tab-content">
89
-			<h2><?php echo __('Select from below the files/folders you want to exclude from your Backup Archive','xcloner-backup-and-restore')?>:
90
-				<a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50" data-html="true" data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked','xcloner-backup-and-restore');?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
89
+			<h2><?php echo __('Select from below the files/folders you want to exclude from your Backup Archive', 'xcloner-backup-and-restore')?>:
90
+				<a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50" data-html="true" data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked', 'xcloner-backup-and-restore'); ?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
91 91
 			</h2>
92 92
 			
93 93
 			<!-- Files System Container -->
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					<ul class="backup-status collapsible" data-collapsible="accordion">
116 116
 					    <li class="file-system">
117 117
 						      <div class="collapsible-header">
118
-									<i class="material-icons">folder</i><?php echo __('Scanning The File System...','xcloner-backup-and-restore')?>
118
+									<i class="material-icons">folder</i><?php echo __('Scanning The File System...', 'xcloner-backup-and-restore')?>
119 119
 									
120 120
 									<p class="right"><?php echo sprintf(__('Found %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span  class="file-size-total">0</span>MB')?></p>
121 121
 
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
 								</div>	
130 130
 						      <div class="collapsible-body status-body"></div>
131 131
 					    </li>
132
-					    <?php if($xcloner_settings->get_enable_mysql_backup()):?>
132
+					    <?php if ($xcloner_settings->get_enable_mysql_backup()):?>
133 133
 					    <li class="database-backup">
134 134
 						      <div class="collapsible-header">
135
-									<i class="material-icons">storage</i><?php echo __('Generating the Mysql Backup...','xcloner-backup-and-restore')?>
135
+									<i class="material-icons">storage</i><?php echo __('Generating the Mysql Backup...', 'xcloner-backup-and-restore')?>
136 136
 									
137
-									<p class="right"><?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records','xcloner-backup-and-restore')?></p>
137
+									<p class="right"><?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records', 'xcloner-backup-and-restore')?></p>
138 138
 									
139 139
 									<div>
140 140
 										<p class="right"><span class="last-logged-table"></span></p>
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 					    <?php endif?>
159 159
 					    <li class="files-backup">
160 160
 						      <div class="collapsible-header">
161
-									<i class="material-icons">archive</i><?php echo __('Adding Files to Archive...','xcloner-backup-and-restore')?>
161
+									<i class="material-icons">archive</i><?php echo __('Adding Files to Archive...', 'xcloner-backup-and-restore')?>
162 162
 									
163
-									<p class="right"><?php echo sprintf(__('Adding %s files (%s)','xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span  data-processed="0" class="file-size-total">0</span>MB')?></p>
163
+									<p class="right"><?php echo sprintf(__('Adding %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span  data-processed="0" class="file-size-total">0</span>MB')?></p>
164 164
 
165 165
 									<div>
166 166
 										<p class="right"><span class="last-logged-file"></span></p>
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 						      <div class="collapsible-body status-body">
174 174
 									<div class="row">
175 175
 										<div class="col l3 s12">
176
-											<h2><?php echo __("Backup Parts",'xcloner-backup-and-restore')?>: </h2>
176
+											<h2><?php echo __("Backup Parts", 'xcloner-backup-and-restore')?>: </h2>
177 177
 										</div>	
178 178
 										<div class="col l9 s12">
179 179
 											<ul class="backup-name"></ul>
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
 					    </li>
184 184
 					    <li class="backup-done">
185 185
 						      <div class="collapsible-header">
186
-									<i class="material-icons">done</i><?php echo __('Backup Done','xcloner-backup-and-restore')?>
186
+									<i class="material-icons">done</i><?php echo __('Backup Done', 'xcloner-backup-and-restore')?>
187 187
 									
188 188
 									<p class="right">
189
-										 <?php if(sizeof($available_storages)):?>
190
-											<a href="#" class="cloud-upload" title="<?php echo __("Send Backup To Remote Storage",'xcloner-backup-and-restore')?>"><i class="material-icons">cloud_upload</i></a>
189
+										 <?php if (sizeof($available_storages)):?>
190
+											<a href="#" class="cloud-upload" title="<?php echo __("Send Backup To Remote Storage", 'xcloner-backup-and-restore')?>"><i class="material-icons">cloud_upload</i></a>
191 191
 										 <?php endif?>
192
-										 <a href="#" class="download" title="<?php echo __("Download Backup",'xcloner-backup-and-restore')?>"><i class="material-icons">file_download</i></a>
193
-										 <a href="#" class="list-backup-content" title="<?php echo __("List Backup Content",'xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a>
192
+										 <a href="#" class="download" title="<?php echo __("Download Backup", 'xcloner-backup-and-restore')?>"><i class="material-icons">file_download</i></a>
193
+										 <a href="#" class="list-backup-content" title="<?php echo __("List Backup Content", 'xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a>
194 194
 									</p>
195 195
 									
196 196
 									<div class="progress">
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
 								</div>	
201 201
 						      <div class="collapsible-body center-align">
202 202
 									<div class="row">
203
-										<h5><?php echo __("Thank you for using XCloner.",'xcloner-backup-and-restore')?></h5>
204
-										<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'),'<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?></h6>
203
+										<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore')?></h5>
204
+										<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?></h6>
205 205
 										<a class="twitter-follow-button" href="https://twitter.com/thinkovi" data-show-count="false">Follow @thinkovi</a>
206 206
 										<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script>
207 207
 									</div>
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			<div class="row">
219 219
 				<div id="schedule_backup_success" class="col s12 l6 updated settings-error notice is-dismissible"> 
220 220
 					<p><strong><?php echo __('Schedule Saved', 'xcloner-backup-and-restore')?></strong></p>
221
-					<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php echo __('(Dismiss this notice.','xcloner-backup-and-restore')?></span></button>
221
+					<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php echo __('(Dismiss this notice.', 'xcloner-backup-and-restore')?></span></button>
222 222
 				</div>
223 223
 			</div>
224 224
 			
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
 			<div class="row">
239 239
 				 <div class="input-field inline col s12 m6 l4">
240 240
 					  <input type="datetime-local" id="datepicker" class="datepicker" name="schedule_start_date" >
241
-					  <label for="datepicker"><?php echo __('Schedule Backup To Start On:','xcloner-backup-and-restore')?></label>
241
+					  <label for="datepicker"><?php echo __('Schedule Backup To Start On:', 'xcloner-backup-and-restore')?></label>
242 242
 				</div>
243 243
 				 <div class="input-field inline col s12 m4 l2">
244 244
 					  <input id="timepicker_ampm_dark" class="timepicker" type="time" name="schedule_start_time">
245
-					  <label for="timepicker_ampm_dark"><?php echo __('At:','xcloner-backup-and-restore')?></label>
245
+					  <label for="timepicker_ampm_dark"><?php echo __('At:', 'xcloner-backup-and-restore')?></label>
246 246
 				</div>
247 247
 			</div>
248 248
 			
@@ -250,22 +250,22 @@  discard block
 block discarded – undo
250 250
 				<div class="input-field col s12 m10 l6">
251 251
 					<select name="schedule_frequency" id="schedule_frequency" class="validate" required>
252 252
 						<option value="" disabled selected><?php echo __('please select', 'xcloner-backup-and-restore') ?></option>
253
-						<option value="single"><?php echo __("Don't Repeat",'xcloner-backup-and-restore')?></option>
254
-						<option value="hourly"><?php echo __("Hourly",'xcloner-backup-and-restore')?></option>
255
-						<option value="daily"><?php echo __("Daily",'xcloner-backup-and-restore')?></option>
256
-						<option value="weekly"><?php echo __("Weekly",'xcloner-backup-and-restore')?></option>
257
-						<option value="monthly"><?php echo __("Monthly",'xcloner-backup-and-restore')?></option>
253
+						<option value="single"><?php echo __("Don't Repeat", 'xcloner-backup-and-restore')?></option>
254
+						<option value="hourly"><?php echo __("Hourly", 'xcloner-backup-and-restore')?></option>
255
+						<option value="daily"><?php echo __("Daily", 'xcloner-backup-and-restore')?></option>
256
+						<option value="weekly"><?php echo __("Weekly", 'xcloner-backup-and-restore')?></option>
257
+						<option value="monthly"><?php echo __("Monthly", 'xcloner-backup-and-restore')?></option>
258 258
 						</select>
259 259
 						<label><?php echo __('Please Select Frequency to run', 'xcloner-backup-and-restore') ?></label>
260 260
 				</div>
261 261
 			</div>	
262 262
 
263
-			<?php if(sizeof($available_storages)):?>
263
+			<?php if (sizeof($available_storages)):?>
264 264
 			<div class="row">
265 265
 				<div class="input-field col s12 m10 l6">
266 266
 					<select name="schedule_storage" id="schedule_storage" class="validate">
267 267
 						<option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?></option>
268
-						<?php foreach($available_storages as $storage=>$text):?>
268
+						<?php foreach ($available_storages as $storage=>$text):?>
269 269
 							<option value="<?php echo $storage?>"><?php echo $text?></option>
270 270
 						<?php endforeach?>
271 271
 						</select>
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 			<?php endif?>
276 276
 			<div class="row">
277 277
 				<div class="col s12 m10 l6">
278
-					<button class="right btn waves-effect waves-light submit_schedule" type="submit" name="action"><?php echo __("Submit" ,'xcloner-backup-and-restore')?>
278
+					<button class="right btn waves-effect waves-light submit_schedule" type="submit" name="action"><?php echo __("Submit", 'xcloner-backup-and-restore')?>
279 279
 						<i class="material-icons right">send</i>
280 280
 					</button>
281 281
 				</div>
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		<textarea  class="body" rows="5"></textarea>
295 295
 	</div>
296 296
 	<div class="modal-footer">
297
-		<a class=" modal-action modal-close waves-effect waves-green btn-flat  red darken-2"><?php echo __('Close','xcloner-backup-and-restore')?></a>
297
+		<a class=" modal-action modal-close waves-effect waves-green btn-flat  red darken-2"><?php echo __('Close', 'xcloner-backup-and-restore')?></a>
298 298
 	</div>
299 299
 </div>
300 300
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
 <div id="backup_cotent_modal" class="modal">
304 304
 	<div class="modal-content">
305
-		<h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
305
+		<h4><?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "")?></h4>
306 306
 		<h5 class="backup-name"></h5>
307 307
 		
308 308
 		<div class="progress">
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
 	<form method="POST" class="remote-storage-form">
318 318
 	<input type="hidden" name="file" class="backup_name">	  
319 319
 	<div class="modal-content">
320
-	  <h4><?php echo __("Remote Storage Transfer",'xcloner-backup-and-restore')?></h4>
320
+	  <h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore')?></h4>
321 321
 	  <p>
322
-	  <?php if(sizeof($available_storages)):?>
322
+	  <?php if (sizeof($available_storages)):?>
323 323
 			<div class="row">
324 324
 				<div class="col s12 label">
325 325
 					<label><?php echo __(sprintf('Send %s to remote storage', "<span class='backup_name'></span>"), 'xcloner-backup-and-restore') ?></label>
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 				<div class="input-field col s8 m10">
328 328
 					<select name="transfer_storage" id="transfer_storage" class="validate" required >
329 329
 						<option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?></option>
330
-						<?php foreach($available_storages as $storage=>$text):?>
330
+						<?php foreach ($available_storages as $storage=>$text):?>
331 331
 							<option value="<?php echo $storage?>"><?php echo $text?></option>
332 332
 						<?php endforeach?>
333 333
 						</select>
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 				</div>
339 339
 			</div>
340 340
 			<div class="row status">
341
-				<?php echo __("Uploading backup to the selected remote storage...",'xcloner-backup-and-restore')?> <span class="status-text"></span>
341
+				<?php echo __("Uploading backup to the selected remote storage...", 'xcloner-backup-and-restore')?> <span class="status-text"></span>
342 342
 				<div class="progress">
343 343
 					<div class="indeterminate"></div>
344 344
 				</div>
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 		}
412 412
 	});
413 413
 	
414
-	<?php if($xcloner_settings->get_enable_mysql_backup()):?>
414
+	<?php if ($xcloner_settings->get_enable_mysql_backup()):?>
415 415
 	jQuery('#jstree_database_container').jstree({
416 416
 			'core' : {
417 417
 				'check_callback' : true,
Please login to merge, or discard this patch.
admin/class-xcloner-admin.php 3 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -193,26 +193,26 @@  discard block
 block discarded – undo
193 193
 		
194 194
 		// add error/update messages
195 195
  
196
-	    // check if the user have submitted the settings
197
-	    // wordpress will add the "settings-updated" $_GET parameter to the url
198
-	    if (isset($_GET['settings-updated'])) {
199
-	        // add settings saved message with the class of "updated"
200
-	        add_settings_error('wporg_messages', 'wporg_message', __('Settings Saved', 'wporg'), 'updated');
201
-	    }
196
+		// check if the user have submitted the settings
197
+		// wordpress will add the "settings-updated" $_GET parameter to the url
198
+		if (isset($_GET['settings-updated'])) {
199
+			// add settings saved message with the class of "updated"
200
+			add_settings_error('wporg_messages', 'wporg_message', __('Settings Saved', 'wporg'), 'updated');
201
+		}
202 202
 	 
203
-	    // show error/update messages
204
-	    settings_errors('wporg_messages');
205
-	    ?>
203
+		// show error/update messages
204
+		settings_errors('wporg_messages');
205
+		?>
206 206
 	   
207 207
 	    <?php
208
-            if( isset( $_GET[ 'tab' ] ) ) {
209
-                $active_tab = $_GET[ 'tab' ];
210
-            } // end if
211
-            else{
208
+			if( isset( $_GET[ 'tab' ] ) ) {
209
+				$active_tab = $_GET[ 'tab' ];
210
+			} // end if
211
+			else{
212 212
 				$active_tab = "general_options";
213 213
 			}
214 214
             
215
-        ?>
215
+		?>
216 216
         <h1><?= esc_html(get_admin_page_title()); ?></h1>
217 217
          
218 218
         <ul class="nav-tab-wrapper row">
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
 					do_settings_sections('xcloner_cron_settings_page');
253 253
 				}*/
254 254
 
255
-	            // output save settings button
256
-	            submit_button('Save Settings');
257
-	            ?>
255
+				// output save settings button
256
+				submit_button('Save Settings');
257
+				?>
258 258
 	        </form>
259 259
 
260 260
 	    </div>
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param      string    $plugin_name       The name of this plugin.
48 48
 	 * @param      string    $version    The version of this plugin.
49 49
 	 */
50
-	public function __construct( $plugin_name, $version ) {
50
+	public function __construct($plugin_name, $version) {
51 51
 
52 52
 		$this->plugin_name = $plugin_name;
53 53
 		$this->version = $version;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function enqueue_styles($hook) {
63 63
 		
64
-		if(!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option']=="com_cloner"))
64
+		if (!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option'] == "com_cloner"))
65 65
 			return;
66 66
 
67 67
 		/**
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
 		 * class.
77 77
 		 */
78 78
 		
79
-		wp_enqueue_style( $this->plugin_name."_materialize", plugin_dir_url( __FILE__ ) . 'css/materialize.min.css', array(), $this->version, 'all' );
80
-		wp_enqueue_style( $this->plugin_name."_materialize.clockpicker", plugin_dir_url( __FILE__ ) . 'css/materialize.clockpicker.css', array(), $this->version, 'all' );
81
-		wp_enqueue_style( $this->plugin_name."_materialize.icons", '//fonts.googleapis.com/icon?family=Material+Icons', array(), $this->version, 'all' );
82
-		wp_enqueue_style( $this->plugin_name."_jquery.datatables", plugin_dir_url( __FILE__ ) . 'css/jquery.dataTables.min.css', array(), $this->version, 'all' );
83
-		wp_enqueue_style( $this->plugin_name."_jquery.datatables.responsive", plugin_dir_url( __FILE__ ) . 'css/responsive.dataTables.css', array(), $this->version, 'all' );
84
-		wp_enqueue_style( $this->plugin_name."_jstree", dirname(plugin_dir_url( __FILE__ )) . '/vendor/vakata/jstree/dist/themes/default/style.min.css', array(), '3.3', 'all' );
85
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/xcloner-admin.css', array(), $this->version, 'all' );
79
+		wp_enqueue_style($this->plugin_name."_materialize", plugin_dir_url(__FILE__).'css/materialize.min.css', array(), $this->version, 'all');
80
+		wp_enqueue_style($this->plugin_name."_materialize.clockpicker", plugin_dir_url(__FILE__).'css/materialize.clockpicker.css', array(), $this->version, 'all');
81
+		wp_enqueue_style($this->plugin_name."_materialize.icons", '//fonts.googleapis.com/icon?family=Material+Icons', array(), $this->version, 'all');
82
+		wp_enqueue_style($this->plugin_name."_jquery.datatables", plugin_dir_url(__FILE__).'css/jquery.dataTables.min.css', array(), $this->version, 'all');
83
+		wp_enqueue_style($this->plugin_name."_jquery.datatables.responsive", plugin_dir_url(__FILE__).'css/responsive.dataTables.css', array(), $this->version, 'all');
84
+		wp_enqueue_style($this->plugin_name."_jstree", dirname(plugin_dir_url(__FILE__)).'/vendor/vakata/jstree/dist/themes/default/style.min.css', array(), '3.3', 'all');
85
+		wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__).'css/xcloner-admin.css', array(), $this->version, 'all');
86 86
 
87 87
 	}
88 88
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 */
94 94
 	public function enqueue_scripts($hook) {
95 95
 
96
-		if(!stristr($hook, "page_".$this->plugin_name))
96
+		if (!stristr($hook, "page_".$this->plugin_name))
97 97
 			return;
98 98
 			
99 99
 		/**
@@ -108,17 +108,17 @@  discard block
 block discarded – undo
108 108
 		 * class.
109 109
 		 */
110 110
 
111
-		wp_enqueue_script( $this->plugin_name."_materialize", plugin_dir_url( __FILE__ ) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false );
112
-		wp_enqueue_script( $this->plugin_name."_materialize.clockpicker", plugin_dir_url( __FILE__ ) . 'js/materialize.clockpicker.js', array( 'jquery' ), $this->version, false );
113
-		wp_enqueue_script( $this->plugin_name."_jquery.datatables", plugin_dir_url( __FILE__ ) . 'js/jquery.dataTables.min.js', array( 'jquery' ), $this->version, false );
114
-		wp_enqueue_script( $this->plugin_name."_jquery.datatables.respnsive", plugin_dir_url( __FILE__ ) . 'js/dataTables.responsive.js', array( 'jquery' ), $this->version, false );
115
-		wp_enqueue_script( $this->plugin_name."_vakata", dirname(plugin_dir_url( __FILE__ )) . '/vendor/vakata/jstree/dist/jstree.min.js', array( 'jquery' ), '3.3', false );
116
-		wp_enqueue_script( $this->plugin_name."_xcloner-backup-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-backup-class.js', array( 'jquery' ), $this->version, false );
117
-		wp_enqueue_script( $this->plugin_name."_xcloner-scheduler-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-scheduler-class.js', array( 'jquery' ), $this->version, false );
118
-		wp_enqueue_script( $this->plugin_name."_xcloner-restore-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-restore-class.js', array( 'jquery' ), $this->version, false );
119
-		wp_enqueue_script( $this->plugin_name."_xcloner-manage-backups-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-manage-backups-class.js', array( 'jquery' ), $this->version, false );
120
-		wp_enqueue_script( $this->plugin_name."_xcloner-remote-storage-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-remote-storage-class.js', array( 'jquery' ), $this->version, false );
121
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/xcloner-admin.js', array( 'jquery' ), $this->version, false );
111
+		wp_enqueue_script($this->plugin_name."_materialize", plugin_dir_url(__FILE__).'js/materialize.min.js', array('jquery'), $this->version, false);
112
+		wp_enqueue_script($this->plugin_name."_materialize.clockpicker", plugin_dir_url(__FILE__).'js/materialize.clockpicker.js', array('jquery'), $this->version, false);
113
+		wp_enqueue_script($this->plugin_name."_jquery.datatables", plugin_dir_url(__FILE__).'js/jquery.dataTables.min.js', array('jquery'), $this->version, false);
114
+		wp_enqueue_script($this->plugin_name."_jquery.datatables.respnsive", plugin_dir_url(__FILE__).'js/dataTables.responsive.js', array('jquery'), $this->version, false);
115
+		wp_enqueue_script($this->plugin_name."_vakata", dirname(plugin_dir_url(__FILE__)).'/vendor/vakata/jstree/dist/jstree.min.js', array('jquery'), '3.3', false);
116
+		wp_enqueue_script($this->plugin_name."_xcloner-backup-class", plugin_dir_url(__FILE__).'js/xcloner-backup-class.js', array('jquery'), $this->version, false);
117
+		wp_enqueue_script($this->plugin_name."_xcloner-scheduler-class", plugin_dir_url(__FILE__).'js/xcloner-scheduler-class.js', array('jquery'), $this->version, false);
118
+		wp_enqueue_script($this->plugin_name."_xcloner-restore-class", plugin_dir_url(__FILE__).'js/xcloner-restore-class.js', array('jquery'), $this->version, false);
119
+		wp_enqueue_script($this->plugin_name."_xcloner-manage-backups-class", plugin_dir_url(__FILE__).'js/xcloner-manage-backups-class.js', array('jquery'), $this->version, false);
120
+		wp_enqueue_script($this->plugin_name."_xcloner-remote-storage-class", plugin_dir_url(__FILE__).'js/xcloner-remote-storage-class.js', array('jquery'), $this->version, false);
121
+		wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__).'js/xcloner-admin.js', array('jquery'), $this->version, false);
122 122
 		
123 123
 
124 124
 	}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	
132 132
 	public function xcloner_remote_storage_page()
133 133
 	{
134
-		if(isset($_POST['action']))
134
+		if (isset($_POST['action']))
135 135
 		{
136 136
 			$remote_storage = new Xcloner_Remote_Storage();
137 137
 			$remote_storage->save($_POST['action']);
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 	
143 143
 	public function xcloner_scheduled_backups_page()
144 144
 	{
145
-		$requirements 			= new XCloner_Requirements();
146
-		if(!$requirements->check_backup_ready_status())
145
+		$requirements = new XCloner_Requirements();
146
+		if (!$requirements->check_backup_ready_status())
147 147
 		{
148 148
 			require_once("partials/xcloner_init_page.php");
149 149
 			return false;
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 	
174 174
 	public function xcloner_generate_backups_page()
175 175
 	{
176
-		$requirements 			= new XCloner_Requirements();
177
-		if(!$requirements->check_backup_ready_status())
176
+		$requirements = new XCloner_Requirements();
177
+		if (!$requirements->check_backup_ready_status())
178 178
 		{
179 179
 			require_once("partials/xcloner_init_page.php");
180 180
 			return false;
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
 	    ?>
206 206
 	   
207 207
 	    <?php
208
-            if( isset( $_GET[ 'tab' ] ) ) {
209
-                $active_tab = $_GET[ 'tab' ];
208
+            if (isset($_GET['tab'])) {
209
+                $active_tab = $_GET['tab'];
210 210
             } // end if
211
-            else{
211
+            else {
212 212
 				$active_tab = "general_options";
213 213
 			}
214 214
             
@@ -229,20 +229,20 @@  discard block
 block discarded – undo
229 229
 	        <form action="options.php" method="post">
230 230
 	            <?php
231 231
 				
232
-				if( $active_tab == 'general_options' ) {
232
+				if ($active_tab == 'general_options') {
233 233
 					
234 234
 					settings_fields('xcloner_general_settings_group');
235 235
 					do_settings_sections('xcloner_settings_page');
236 236
 					
237
-				}elseif( $active_tab == 'mysql_options' ) {
237
+				}elseif ($active_tab == 'mysql_options') {
238 238
 					
239 239
 					settings_fields('xcloner_mysql_settings_group');
240 240
 					do_settings_sections('xcloner_mysql_settings_page');
241
-				}elseif( $active_tab == 'system_options' ) {
241
+				}elseif ($active_tab == 'system_options') {
242 242
 					
243 243
 					settings_fields('xcloner_system_settings_group');
244 244
 					do_settings_sections('xcloner_system_settings_page');
245
-				}elseif( $active_tab == 'cleanup_options' ) {
245
+				}elseif ($active_tab == 'cleanup_options') {
246 246
 					
247 247
 					settings_fields('xcloner_cleanup_settings_group');
248 248
 					do_settings_sections('xcloner_cleanup_settings_page');
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function enqueue_styles($hook) {
63 63
 		
64
-		if(!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option']=="com_cloner"))
65
-			return;
64
+		if(!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option']=="com_cloner")) {
65
+					return;
66
+		}
66 67
 
67 68
 		/**
68 69
 		 * This function is provided for demonstration purposes only.
@@ -93,8 +94,9 @@  discard block
 block discarded – undo
93 94
 	 */
94 95
 	public function enqueue_scripts($hook) {
95 96
 
96
-		if(!stristr($hook, "page_".$this->plugin_name))
97
-			return;
97
+		if(!stristr($hook, "page_".$this->plugin_name)) {
98
+					return;
99
+		}
98 100
 			
99 101
 		/**
100 102
 		 * This function is provided for demonstration purposes only.
@@ -234,15 +236,15 @@  discard block
 block discarded – undo
234 236
 					settings_fields('xcloner_general_settings_group');
235 237
 					do_settings_sections('xcloner_settings_page');
236 238
 					
237
-				}elseif( $active_tab == 'mysql_options' ) {
239
+				} elseif( $active_tab == 'mysql_options' ) {
238 240
 					
239 241
 					settings_fields('xcloner_mysql_settings_group');
240 242
 					do_settings_sections('xcloner_mysql_settings_page');
241
-				}elseif( $active_tab == 'system_options' ) {
243
+				} elseif( $active_tab == 'system_options' ) {
242 244
 					
243 245
 					settings_fields('xcloner_system_settings_group');
244 246
 					do_settings_sections('xcloner_system_settings_page');
245
-				}elseif( $active_tab == 'cleanup_options' ) {
247
+				} elseif( $active_tab == 'cleanup_options' ) {
246 248
 					
247 249
 					settings_fields('xcloner_cleanup_settings_group');
248 250
 					do_settings_sections('xcloner_cleanup_settings_page');
Please login to merge, or discard this patch.
admin/partials/xcloner_remote_storage_page.php 1 patch
Spacing   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
 			<!-- FTP STORAGE-->
11 11
 			<li id="ftp">
12 12
 				<div class="collapsible-header">
13
-					<i class="material-icons">computer</i><?php echo __("FTP Storage",'xcloner-backup-and-restore')?>
13
+					<i class="material-icons">computer</i><?php echo __("FTP Storage", 'xcloner-backup-and-restore')?>
14 14
 					<div class="right">
15 15
 						<div class="switch">
16 16
 							<label>
17 17
 							Off
18
-							<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if(get_option("xcloner_ftp_enable")) echo "checked"?> \>
18
+							<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if (get_option("xcloner_ftp_enable")) echo "checked"?> \>
19 19
 							<span class="lever"></span>
20 20
 							On
21 21
 							</label>
@@ -25,96 +25,96 @@  discard block
 block discarded – undo
25 25
 				<div class="collapsible-body">
26 26
 					<div class="row">
27 27
 						<div class="col s12 m3 label">
28
-							<label for="ftp_host"><?php echo __("Ftp Hostname",'xcloner-backup-and-restore')?></label>
28
+							<label for="ftp_host"><?php echo __("Ftp Hostname", 'xcloner-backup-and-restore')?></label>
29 29
 						</div>
30 30
 						<div class="col s12 m6">
31
-							<input placeholder="<?php echo __("Ftp Hostname",'xcloner-backup-and-restore')?>" id="ftp_host" type="text" name="xcloner_ftp_hostname" class="validate" value="<?php echo get_option("xcloner_ftp_hostname")?>">
31
+							<input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore')?>" id="ftp_host" type="text" name="xcloner_ftp_hostname" class="validate" value="<?php echo get_option("xcloner_ftp_hostname")?>">
32 32
 				        </div>
33 33
 				        <div class=" col s12 m2">
34
-							<input placeholder="<?php echo __("Ftp Port",'xcloner-backup-and-restore')?>" id="ftp_port" type="text" name="xcloner_ftp_port" class="validate" value="<?php echo get_option("xcloner_ftp_port", 21)?>">
34
+							<input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore')?>" id="ftp_port" type="text" name="xcloner_ftp_port" class="validate" value="<?php echo get_option("xcloner_ftp_port", 21)?>">
35 35
 				        </div>
36 36
 			        </div>
37 37
 			        
38 38
 			        <div class="row">
39 39
 						<div class="col s12 m3 label">
40
-							<label for="ftp_username"><?php echo __("Ftp Username",'xcloner-backup-and-restore')?></label>
40
+							<label for="ftp_username"><?php echo __("Ftp Username", 'xcloner-backup-and-restore')?></label>
41 41
 						</div>	
42 42
 						<div class=" col s12 m6">
43
-							<input placeholder="<?php echo __("Ftp Username",'xcloner-backup-and-restore')?>" id="ftp_username" type="text" name="xcloner_ftp_username" class="validate" value="<?php echo get_option("xcloner_ftp_username")?>" autocomplete="off" >
43
+							<input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore')?>" id="ftp_username" type="text" name="xcloner_ftp_username" class="validate" value="<?php echo get_option("xcloner_ftp_username")?>" autocomplete="off" >
44 44
 				        </div>
45 45
 			        </div>
46 46
 			        
47 47
 			        
48 48
 			        <div class="row">
49 49
 						<div class="col s12 m3 label">
50
-							<label for="ftp_password"><?php echo __("Ftp Password",'xcloner-backup-and-restore')?></label>
50
+							<label for="ftp_password"><?php echo __("Ftp Password", 'xcloner-backup-and-restore')?></label>
51 51
 						</div>
52 52
 						<div class=" col s12 m6">
53
-							<input placeholder="<?php echo __("Ftp Password",'xcloner-backup-and-restore')?>" id="ftp_password" type="password" name="xcloner_ftp_password" class="validate" value="<?php echo get_option("xcloner_ftp_password")?>" autocomplete="off" >
53
+							<input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore')?>" id="ftp_password" type="password" name="xcloner_ftp_password" class="validate" value="<?php echo get_option("xcloner_ftp_password")?>" autocomplete="off" >
54 54
 				        </div>
55 55
 			        </div>
56 56
 			        
57 57
 			        <div class="row">
58 58
 						<div class="col s12 m3 label">
59
-							<label for="ftp_root"><?php echo __("Ftp Storage Folder",'xcloner-backup-and-restore')?></label>
59
+							<label for="ftp_root"><?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore')?></label>
60 60
 						</div>
61 61
 						<div class=" col s12 m6">
62
-							<input placeholder="<?php echo __("Ftp Storage Folder",'xcloner-backup-and-restore')?>" id="ftp_root" type="text" name="xcloner_ftp_path" class="validate" value="<?php echo get_option("xcloner_ftp_path")?>">
62
+							<input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore')?>" id="ftp_root" type="text" name="xcloner_ftp_path" class="validate" value="<?php echo get_option("xcloner_ftp_path")?>">
63 63
 						</div>	
64 64
 			        </div>
65 65
 			        
66 66
 			        <div class="row">
67 67
 						<div class="col s12 m3 label">
68
-							<label for="ftp_root"><?php echo __("Ftp Transfer Mode",'xcloner-backup-and-restore')?></label>
68
+							<label for="ftp_root"><?php echo __("Ftp Transfer Mode", 'xcloner-backup-and-restore')?></label>
69 69
 						</div>
70 70
 						<div class=" col s12 m6 input-field inline">
71
-							<input name="xcloner_ftp_transfer_mode" type="radio" id="passive" value="1" <?php if(get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
72
-							<label for="passive"><?php echo __("Passive",'xcloner-backup-and-restore')?></label>
71
+							<input name="xcloner_ftp_transfer_mode" type="radio" id="passive" value="1" <?php if (get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
72
+							<label for="passive"><?php echo __("Passive", 'xcloner-backup-and-restore')?></label>
73 73
 
74
-							<input name="xcloner_ftp_transfer_mode" type="radio" id="active" value="0" <?php if(!get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
75
-							<label for="active"><?php echo __("Active",'xcloner-backup-and-restore')?></label>
74
+							<input name="xcloner_ftp_transfer_mode" type="radio" id="active" value="0" <?php if (!get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
75
+							<label for="active"><?php echo __("Active", 'xcloner-backup-and-restore')?></label>
76 76
 						</div>	
77 77
 			        </div>
78 78
 			        
79 79
 			        <div class="row">
80 80
 						<div class="col s12 m3 label">
81
-							<label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection",'xcloner-backup-and-restore')?></label>
81
+							<label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection", 'xcloner-backup-and-restore')?></label>
82 82
 						</div>
83 83
 						<div class=" col s12 m6 input-field inline">
84
-							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive" value="0" <?php if(!get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
85
-							<label for="ftp_ssl_mode_inactive"><?php echo __("Disable",'xcloner-backup-and-restore')?></label>
84
+							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive" value="0" <?php if (!get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
85
+							<label for="ftp_ssl_mode_inactive"><?php echo __("Disable", 'xcloner-backup-and-restore')?></label>
86 86
 
87
-							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active" value="1" <?php if(get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
88
-							<label for="ftp_ssl_mode_active"><?php echo __("Enable",'xcloner-backup-and-restore')?></label>
87
+							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active" value="1" <?php if (get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
88
+							<label for="ftp_ssl_mode_active"><?php echo __("Enable", 'xcloner-backup-and-restore')?></label>
89 89
 						</div>	
90 90
 			        </div>
91 91
 			        
92 92
 			        <div class="row">
93 93
 						<div class="col s12 m3 label">
94
-							<label for="ftp_timeout"><?php echo __("Ftp Timeout",'xcloner-backup-and-restore')?></label>
94
+							<label for="ftp_timeout"><?php echo __("Ftp Timeout", 'xcloner-backup-and-restore')?></label>
95 95
 						</div>
96 96
 						<div class=" col s12 m2">
97
-							<input placeholder="<?php echo __("Ftp Timeout",'xcloner-backup-and-restore')?>" id="ftp_timeout" type="text" name="xcloner_ftp_timeout" class="validate" value="<?php echo get_option("xcloner_ftp_timeout", 30)?>">
97
+							<input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore')?>" id="ftp_timeout" type="text" name="xcloner_ftp_timeout" class="validate" value="<?php echo get_option("xcloner_ftp_timeout", 30)?>">
98 98
 				        </div>
99 99
 			        </div>
100 100
 			        
101 101
 			        <div class="row">
102 102
 						<div class="col s12 m3 label">
103
-							<label for="ftp_cleanup_days"><?php echo __("Ftp Cleanup (days)",'xcloner-backup-and-restore')?></label>
103
+							<label for="ftp_cleanup_days"><?php echo __("Ftp Cleanup (days)", 'xcloner-backup-and-restore')?></label>
104 104
 						</div>
105 105
 						<div class=" col s12 m6">
106
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="ftp_cleanup_days" type="text" name="xcloner_ftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_ftp_cleanup_days")?>">
106
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="ftp_cleanup_days" type="text" name="xcloner_ftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_ftp_cleanup_days")?>">
107 107
 				        </div>
108 108
 			        </div>
109 109
 			        
110 110
 			        <div class="row">
111 111
 						<div class="col s6 m4">
112
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="ftp"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
112
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="ftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
113 113
 								<i class="material-icons right">save</i>
114 114
 							</button>
115 115
 						</div>	
116 116
 						<div class="col s6 m4">
117
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="ftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
117
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="ftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
118 118
 								<i class="material-icons right">import_export</i>
119 119
 							</button>
120 120
 						</div>
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
 			<!-- SFTP STORAGE-->
126 126
 			<li id="sftp">
127 127
 				<div class="collapsible-header">
128
-					<i class="material-icons">computer</i><?php echo __("SFTP Storage",'xcloner-backup-and-restore')?>
128
+					<i class="material-icons">computer</i><?php echo __("SFTP Storage", 'xcloner-backup-and-restore')?>
129 129
 					<div class="right">
130 130
 						<div class="switch">
131 131
 							<label>
132 132
 							Off
133
-							<input type="checkbox" name="xcloner_sftp_enable" class="status" value="1" <?php if(get_option("xcloner_sftp_enable")) echo "checked"?> \>
133
+							<input type="checkbox" name="xcloner_sftp_enable" class="status" value="1" <?php if (get_option("xcloner_sftp_enable")) echo "checked"?> \>
134 134
 							<span class="lever"></span>
135 135
 							On
136 136
 							</label>
@@ -140,79 +140,79 @@  discard block
 block discarded – undo
140 140
 				<div class="collapsible-body">
141 141
 					<div class="row">
142 142
 						<div class="col s12 m3 label">
143
-							<label for="sftp_host"><?php echo __("SFTP Hostname",'xcloner-backup-and-restore')?></label>
143
+							<label for="sftp_host"><?php echo __("SFTP Hostname", 'xcloner-backup-and-restore')?></label>
144 144
 						</div>
145 145
 						<div class="col s12 m6">
146
-							<input placeholder="<?php echo __("SFTP Hostname",'xcloner-backup-and-restore')?>" id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate" value="<?php echo get_option("xcloner_sftp_hostname")?>">
146
+							<input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore')?>" id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate" value="<?php echo get_option("xcloner_sftp_hostname")?>">
147 147
 				        </div>
148 148
 				        <div class=" col s12 m2">
149
-							<input placeholder="<?php echo __("SFTP Port",'xcloner-backup-and-restore')?>" id="sftp_port" type="text" name="xcloner_sftp_port" class="validate" value="<?php echo get_option("xcloner_sftp_port", 22)?>">
149
+							<input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore')?>" id="sftp_port" type="text" name="xcloner_sftp_port" class="validate" value="<?php echo get_option("xcloner_sftp_port", 22)?>">
150 150
 				        </div>
151 151
 			        </div>
152 152
 			        
153 153
 			        <div class="row">
154 154
 						<div class="col s12 m3 label">
155
-							<label for="sftp_username"><?php echo __("SFTP Username",'xcloner-backup-and-restore')?></label>
155
+							<label for="sftp_username"><?php echo __("SFTP Username", 'xcloner-backup-and-restore')?></label>
156 156
 						</div>	
157 157
 						<div class=" col s12 m6">
158
-							<input placeholder="<?php echo __("SFTP Username",'xcloner-backup-and-restore')?>" id="sftp_username" type="text" name="xcloner_sftp_username" class="validate" value="<?php echo get_option("xcloner_sftp_username")?>" autocomplete="off" >
158
+							<input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore')?>" id="sftp_username" type="text" name="xcloner_sftp_username" class="validate" value="<?php echo get_option("xcloner_sftp_username")?>" autocomplete="off" >
159 159
 				        </div>
160 160
 			        </div>
161 161
 			        
162 162
 			        
163 163
 			        <div class="row">
164 164
 						<div class="col s12 m3 label">
165
-							<label for="sftp_password"><?php echo __("SFTP Password",'xcloner-backup-and-restore')?></label>
165
+							<label for="sftp_password"><?php echo __("SFTP Password", 'xcloner-backup-and-restore')?></label>
166 166
 						</div>
167 167
 						<div class=" col s12 m6">
168
-							<input placeholder="<?php echo __("SFTP Password",'xcloner-backup-and-restore')?>" id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" value="<?php echo get_option("xcloner_sftp_password")?>" autocomplete="off" >
168
+							<input placeholder="<?php echo __("SFTP Password", 'xcloner-backup-and-restore')?>" id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" value="<?php echo get_option("xcloner_sftp_password")?>" autocomplete="off" >
169 169
 				        </div>
170 170
 			        </div>
171 171
 			        
172 172
 			        <div class="row">
173 173
 						<div class="col s12 m3 label">
174
-							<label for="sftp_private_key"><?php echo __("SFTP Private Key",'xcloner-backup-and-restore')?></label>
174
+							<label for="sftp_private_key"><?php echo __("SFTP Private Key", 'xcloner-backup-and-restore')?></label>
175 175
 						</div>
176 176
 						<div class=" col s12 m6">
177
-							<input placeholder="<?php echo __("SFTP Private Key",'xcloner-backup-and-restore')?>" id="sftp_private_key" type="text" name="xcloner_sftp_private_key" class="validate" value="<?php echo get_option("xcloner_sftp_private_key")?>">
177
+							<input placeholder="<?php echo __("SFTP Private Key", 'xcloner-backup-and-restore')?>" id="sftp_private_key" type="text" name="xcloner_sftp_private_key" class="validate" value="<?php echo get_option("xcloner_sftp_private_key")?>">
178 178
 						</div>	
179 179
 			        </div>
180 180
 			        
181 181
 			        <div class="row">
182 182
 						<div class="col s12 m3 label">
183
-							<label for="sftp_root"><?php echo __("SFTP Storage Folder",'xcloner-backup-and-restore')?></label>
183
+							<label for="sftp_root"><?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore')?></label>
184 184
 						</div>
185 185
 						<div class=" col s12 m6">
186
-							<input placeholder="<?php echo __("SFTP Storage Folder",'xcloner-backup-and-restore')?>" id="sftp_root" type="text" name="xcloner_sftp_path" class="validate" value="<?php echo get_option("xcloner_sftp_path")?>">
186
+							<input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore')?>" id="sftp_root" type="text" name="xcloner_sftp_path" class="validate" value="<?php echo get_option("xcloner_sftp_path")?>">
187 187
 						</div>	
188 188
 			        </div>
189 189
 			        
190 190
 			        <div class="row">
191 191
 						<div class="col s12 m3 label">
192
-							<label for="sftp_timeout"><?php echo __("SFTP Timeout",'xcloner-backup-and-restore')?></label>
192
+							<label for="sftp_timeout"><?php echo __("SFTP Timeout", 'xcloner-backup-and-restore')?></label>
193 193
 						</div>
194 194
 						<div class=" col s12 m2">
195
-							<input placeholder="<?php echo __("SFTP Timeout",'xcloner-backup-and-restore')?>" id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate" value="<?php echo get_option("xcloner_sftp_timeout", 30)?>">
195
+							<input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore')?>" id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate" value="<?php echo get_option("xcloner_sftp_timeout", 30)?>">
196 196
 				        </div>
197 197
 			        </div>
198 198
 			        
199 199
 			        <div class="row">
200 200
 						<div class="col s12 m3 label">
201
-							<label for="sftp_cleanup_days"><?php echo __("SFTP Cleanup (days)",'xcloner-backup-and-restore')?></label>
201
+							<label for="sftp_cleanup_days"><?php echo __("SFTP Cleanup (days)", 'xcloner-backup-and-restore')?></label>
202 202
 						</div>
203 203
 						<div class=" col s12 m6">
204
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="sftp_cleanup_days" type="text" name="xcloner_sftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_sftp_cleanup_days")?>">
204
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="sftp_cleanup_days" type="text" name="xcloner_sftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_sftp_cleanup_days")?>">
205 205
 				        </div>
206 206
 			        </div>
207 207
 			        
208 208
 			        <div class="row">
209 209
 						<div class="col s6 m4">
210
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="sftp"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
210
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="sftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
211 211
 								<i class="material-icons right">save</i>
212 212
 							</button>
213 213
 						</div>	
214 214
 						<div class="col s6 m4">
215
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="sftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
215
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="sftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
216 216
 								<i class="material-icons right">import_export</i>
217 217
 							</button>
218 218
 						</div>
@@ -224,12 +224,12 @@  discard block
 block discarded – undo
224 224
 			<!-- AWS STORAGE-->
225 225
 			<li id="aws">
226 226
 				<div class="collapsible-header">
227
-					<i class="material-icons">computer</i><?php echo __("AWS Storage",'xcloner-backup-and-restore')?>
227
+					<i class="material-icons">computer</i><?php echo __("AWS Storage", 'xcloner-backup-and-restore')?>
228 228
 					<div class="right">
229 229
 						<div class="switch">
230 230
 							<label>
231 231
 							Off
232
-							<input type="checkbox" name="xcloner_aws_enable" class="status" value="1" <?php if(get_option("xcloner_aws_enable")) echo "checked"?> \>
232
+							<input type="checkbox" name="xcloner_aws_enable" class="status" value="1" <?php if (get_option("xcloner_aws_enable")) echo "checked"?> \>
233 233
 							<span class="lever"></span>
234 234
 							On
235 235
 							</label>
@@ -251,57 +251,57 @@  discard block
 block discarded – undo
251 251
 			        
252 252
 			        <div class="row">
253 253
 						<div class="col s12 m3 label">
254
-							<label for="aws_key"><?php echo __("AWS Key",'xcloner-backup-and-restore')?></label>
254
+							<label for="aws_key"><?php echo __("AWS Key", 'xcloner-backup-and-restore')?></label>
255 255
 						</div>	
256 256
 						<div class=" col s12 m6">
257
-							<input placeholder="<?php echo __("AWS Key",'xcloner-backup-and-restore')?>" id="aws_key" type="text" name="xcloner_aws_key" class="validate" value="<?php echo get_option("xcloner_aws_key")?>" autocomplete="off" >
257
+							<input placeholder="<?php echo __("AWS Key", 'xcloner-backup-and-restore')?>" id="aws_key" type="text" name="xcloner_aws_key" class="validate" value="<?php echo get_option("xcloner_aws_key")?>" autocomplete="off" >
258 258
 				        </div>
259 259
 			        </div>
260 260
 			        
261 261
 			        <div class="row">
262 262
 						<div class="col s12 m3 label">
263
-							<label for="aws_secret"><?php echo __("AWS Secret",'xcloner-backup-and-restore')?></label>
263
+							<label for="aws_secret"><?php echo __("AWS Secret", 'xcloner-backup-and-restore')?></label>
264 264
 						</div>	
265 265
 						<div class=" col s12 m6">
266
-							<input placeholder="<?php echo __("AWS Secret",'xcloner-backup-and-restore')?>" id="aws_secret" type="text" name="xcloner_aws_secret" class="validate" value="<?php echo get_option("xcloner_aws_secret")?>" autocomplete="off" >
266
+							<input placeholder="<?php echo __("AWS Secret", 'xcloner-backup-and-restore')?>" id="aws_secret" type="text" name="xcloner_aws_secret" class="validate" value="<?php echo get_option("xcloner_aws_secret")?>" autocomplete="off" >
267 267
 				        </div>
268 268
 			        </div>
269 269
 			        
270 270
 			        <div class="row">
271 271
 						<div class="col s12 m3 label">
272
-							<label for="aws_region"><?php echo __("AWS Region",'xcloner-backup-and-restore')?></label>
272
+							<label for="aws_region"><?php echo __("AWS Region", 'xcloner-backup-and-restore')?></label>
273 273
 						</div>	
274 274
 						<div class=" col s12 m6">
275
-							<input placeholder="<?php echo __("AWS Region",'xcloner-backup-and-restore')?>" id="aws_region" type="text" name="xcloner_aws_region" class="validate" value="<?php echo get_option("xcloner_aws_region")?>" autocomplete="off" >
275
+							<input placeholder="<?php echo __("AWS Region", 'xcloner-backup-and-restore')?>" id="aws_region" type="text" name="xcloner_aws_region" class="validate" value="<?php echo get_option("xcloner_aws_region")?>" autocomplete="off" >
276 276
 				        </div>
277 277
 			        </div>
278 278
 			        
279 279
 			        <div class="row">
280 280
 						<div class="col s12 m3 label">
281
-							<label for="aws_bucket_name"><?php echo __("AWS Bucket Name",'xcloner-backup-and-restore')?></label>
281
+							<label for="aws_bucket_name"><?php echo __("AWS Bucket Name", 'xcloner-backup-and-restore')?></label>
282 282
 						</div>	
283 283
 						<div class=" col s12 m6">
284
-							<input placeholder="<?php echo __("AWS Bucket Name",'xcloner-backup-and-restore')?>" id="aws_bucket_name" type="text" name="xcloner_aws_bucket_name" class="validate" value="<?php echo get_option("xcloner_aws_bucket_name")?>" autocomplete="off" >
284
+							<input placeholder="<?php echo __("AWS Bucket Name", 'xcloner-backup-and-restore')?>" id="aws_bucket_name" type="text" name="xcloner_aws_bucket_name" class="validate" value="<?php echo get_option("xcloner_aws_bucket_name")?>" autocomplete="off" >
285 285
 				        </div>
286 286
 			        </div>
287 287
 			        
288 288
 			        <div class="row">
289 289
 						<div class="col s12 m3 label">
290
-							<label for="aws_cleanup_days"><?php echo __("AWS Cleanup (days)",'xcloner-backup-and-restore')?></label>
290
+							<label for="aws_cleanup_days"><?php echo __("AWS Cleanup (days)", 'xcloner-backup-and-restore')?></label>
291 291
 						</div>
292 292
 						<div class=" col s12 m6">
293
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="aws_cleanup_days" type="text" name="xcloner_aws_cleanup_days" class="validate" value="<?php echo get_option("xcloner_aws_cleanup_days")?>">
293
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="aws_cleanup_days" type="text" name="xcloner_aws_cleanup_days" class="validate" value="<?php echo get_option("xcloner_aws_cleanup_days")?>">
294 294
 				        </div>
295 295
 			        </div>
296 296
 			        
297 297
 			        <div class="row">
298 298
 						<div class="col s6 m4">
299
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="aws"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
299
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
300 300
 								<i class="material-icons right">save</i>
301 301
 							</button>
302 302
 						</div>	
303 303
 						<div class="col s6 m4">
304
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="aws" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
304
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="aws" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
305 305
 								<i class="material-icons right">import_export</i>
306 306
 							</button>
307 307
 						</div>
@@ -313,12 +313,12 @@  discard block
 block discarded – undo
313 313
 			<!-- DROPBOX STORAGE-->
314 314
 			<li id="dropbox">
315 315
 				<div class="collapsible-header">
316
-					<i class="material-icons">computer</i><?php echo __("Dropbox Storage",'xcloner-backup-and-restore')?>
316
+					<i class="material-icons">computer</i><?php echo __("Dropbox Storage", 'xcloner-backup-and-restore')?>
317 317
 					<div class="right">
318 318
 						<div class="switch">
319 319
 							<label>
320 320
 							Off
321
-							<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if(get_option("xcloner_dropbox_enable")) echo "checked"?> \>
321
+							<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if (get_option("xcloner_dropbox_enable")) echo "checked"?> \>
322 322
 							<span class="lever"></span>
323 323
 							On
324 324
 							</label>
@@ -340,49 +340,49 @@  discard block
 block discarded – undo
340 340
 			        
341 341
 			        <div class="row">
342 342
 						<div class="col s12 m3 label">
343
-							<label for="dropbox_access_token"><?php echo __("Dropbox Access Token",'xcloner-backup-and-restore')?></label>
343
+							<label for="dropbox_access_token"><?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore')?></label>
344 344
 						</div>	
345 345
 						<div class=" col s12 m6">
346
-							<input placeholder="<?php echo __("Dropbox Access Token",'xcloner-backup-and-restore')?>" id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate" value="<?php echo get_option("xcloner_dropbox_access_token")?>" autocomplete="off" >
346
+							<input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore')?>" id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate" value="<?php echo get_option("xcloner_dropbox_access_token")?>" autocomplete="off" >
347 347
 				        </div>
348 348
 			        </div>
349 349
 			        
350 350
 			        
351 351
 			        <div class="row">
352 352
 						<div class="col s12 m3 label">
353
-							<label for="dropbox_app_secret"><?php echo __("Dropbox App Secret",'xcloner-backup-and-restore')?></label>
353
+							<label for="dropbox_app_secret"><?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore')?></label>
354 354
 						</div>
355 355
 						<div class=" col s12 m6">
356
-							<input placeholder="<?php echo __("Dropbox App Secret",'xcloner-backup-and-restore')?>" id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate" value="<?php echo get_option("xcloner_dropbox_app_secret")?>" autocomplete="off" >
356
+							<input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore')?>" id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate" value="<?php echo get_option("xcloner_dropbox_app_secret")?>" autocomplete="off" >
357 357
 				        </div>
358 358
 			        </div>
359 359
 			        
360 360
 			        <div class="row">
361 361
 						<div class="col s12 m3 label">
362
-							<label for="dropbox_prefix"><?php echo __("Dropbox Prefix",'xcloner-backup-and-restore')?></label>
362
+							<label for="dropbox_prefix"><?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore')?></label>
363 363
 						</div>
364 364
 						<div class=" col s12 m6">
365
-							<input placeholder="<?php echo __("Dropbox Prefix",'xcloner-backup-and-restore')?>" id="dropbox_prefix" type="text" name="xcloner_dropbox_prefix" class="validate" value="<?php echo get_option("xcloner_dropbox_prefix")?>">
365
+							<input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore')?>" id="dropbox_prefix" type="text" name="xcloner_dropbox_prefix" class="validate" value="<?php echo get_option("xcloner_dropbox_prefix")?>">
366 366
 						</div>	
367 367
 			        </div>
368 368
 			        
369 369
 			        <div class="row">
370 370
 						<div class="col s12 m3 label">
371
-							<label for="dropbox_cleanup_days"><?php echo __("Dropbox Cleanup (days)",'xcloner-backup-and-restore')?></label>
371
+							<label for="dropbox_cleanup_days"><?php echo __("Dropbox Cleanup (days)", 'xcloner-backup-and-restore')?></label>
372 372
 						</div>
373 373
 						<div class=" col s12 m6">
374
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="dropbox_cleanup_days" type="text" name="xcloner_dropbox_cleanup_days" class="validate" value="<?php echo get_option("xcloner_dropbox_cleanup_days")?>">
374
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="dropbox_cleanup_days" type="text" name="xcloner_dropbox_cleanup_days" class="validate" value="<?php echo get_option("xcloner_dropbox_cleanup_days")?>">
375 375
 				        </div>
376 376
 			        </div>
377 377
 			        
378 378
 			        <div class="row">
379 379
 						<div class="col s6 m4">
380
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="dropbox"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
380
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="dropbox"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
381 381
 								<i class="material-icons right">save</i>
382 382
 							</button>
383 383
 						</div>	
384 384
 						<div class="col s6 m4">
385
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="dropbox" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
385
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="dropbox" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
386 386
 								<i class="material-icons right">import_export</i>
387 387
 							</button>
388 388
 						</div>
@@ -394,12 +394,12 @@  discard block
 block discarded – undo
394 394
 			<!-- AZURE STORAGE-->
395 395
 			<li id="azure">
396 396
 				<div class="collapsible-header">
397
-					<i class="material-icons">computer</i><?php echo __("Azure Blog Storage",'xcloner-backup-and-restore')?>
397
+					<i class="material-icons">computer</i><?php echo __("Azure Blog Storage", 'xcloner-backup-and-restore')?>
398 398
 					<div class="right">
399 399
 						<div class="switch">
400 400
 							<label>
401 401
 							Off
402
-							<input type="checkbox" name="xcloner_azure_enable" class="status" value="1" <?php if(get_option("xcloner_azure_enable")) echo "checked"?> \>
402
+							<input type="checkbox" name="xcloner_azure_enable" class="status" value="1" <?php if (get_option("xcloner_azure_enable")) echo "checked"?> \>
403 403
 							<span class="lever"></span>
404 404
 							On
405 405
 							</label>
@@ -414,56 +414,56 @@  discard block
 block discarded – undo
414 414
 						</div>	
415 415
 						<div class=" col s12 m6">
416 416
 							<p>
417
-								<?php echo sprintf(__('Visit %s and get your "Api Key".','xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>')?>
417
+								<?php echo sprintf(__('Visit %s and get your "Api Key".', 'xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>')?>
418 418
 							</p>
419 419
 				        </div>
420 420
 			        </div>
421 421
 			        
422 422
 			        <div class="row">
423 423
 						<div class="col s12 m3 label">
424
-							<label for="azure_account_name"><?php echo __("Azure Account Name",'xcloner-backup-and-restore')?></label>
424
+							<label for="azure_account_name"><?php echo __("Azure Account Name", 'xcloner-backup-and-restore')?></label>
425 425
 						</div>	
426 426
 						<div class=" col s12 m6">
427
-							<input placeholder="<?php echo __("Azure Account Name",'xcloner-backup-and-restore')?>" id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate" value="<?php echo get_option("xcloner_azure_account_name")?>" autocomplete="off" >
427
+							<input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore')?>" id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate" value="<?php echo get_option("xcloner_azure_account_name")?>" autocomplete="off" >
428 428
 				        </div>
429 429
 			        </div>
430 430
 			        
431 431
 			        
432 432
 			        <div class="row">
433 433
 						<div class="col s12 m3 label">
434
-							<label for="azure_api_key"><?php echo __("Azure Api Key",'xcloner-backup-and-restore')?></label>
434
+							<label for="azure_api_key"><?php echo __("Azure Api Key", 'xcloner-backup-and-restore')?></label>
435 435
 						</div>
436 436
 						<div class=" col s12 m6">
437
-							<input placeholder="<?php echo __("Azure Api Key",'xcloner-backup-and-restore')?>" id="azure_api_key" type="text" name="xcloner_azure_api_key" class="validate" value="<?php echo get_option("xcloner_azure_api_key")?>" autocomplete="off" >
437
+							<input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore')?>" id="azure_api_key" type="text" name="xcloner_azure_api_key" class="validate" value="<?php echo get_option("xcloner_azure_api_key")?>" autocomplete="off" >
438 438
 				        </div>
439 439
 			        </div>
440 440
 			        
441 441
 			        <div class="row">
442 442
 						<div class="col s12 m3 label">
443
-							<label for="azure_container"><?php echo __("Azure Container",'xcloner-backup-and-restore')?></label>
443
+							<label for="azure_container"><?php echo __("Azure Container", 'xcloner-backup-and-restore')?></label>
444 444
 						</div>
445 445
 						<div class=" col s12 m6">
446
-							<input placeholder="<?php echo __("Azure Container",'xcloner-backup-and-restore')?>" id="azure_container" type="text" name="xcloner_azure_container" class="validate" value="<?php echo get_option("xcloner_azure_container")?>">
446
+							<input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore')?>" id="azure_container" type="text" name="xcloner_azure_container" class="validate" value="<?php echo get_option("xcloner_azure_container")?>">
447 447
 						</div>	
448 448
 			        </div>
449 449
 			        
450 450
 			        <div class="row">
451 451
 						<div class="col s12 m3 label">
452
-							<label for="azure_cleanup_days"><?php echo __("Azure Cleanup (days)",'xcloner-backup-and-restore')?></label>
452
+							<label for="azure_cleanup_days"><?php echo __("Azure Cleanup (days)", 'xcloner-backup-and-restore')?></label>
453 453
 						</div>
454 454
 						<div class=" col s12 m6">
455
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="azure_cleanup_days" type="text" name="xcloner_azure_cleanup_days" class="validate" value="<?php echo get_option("xcloner_azure_cleanup_days")?>">
455
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="azure_cleanup_days" type="text" name="xcloner_azure_cleanup_days" class="validate" value="<?php echo get_option("xcloner_azure_cleanup_days")?>">
456 456
 				        </div>
457 457
 			        </div>
458 458
 			        
459 459
 			        <div class="row">
460 460
 						<div class="col s6 m4">
461
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="azure"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
461
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="azure"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
462 462
 								<i class="material-icons right">save</i>
463 463
 							</button>
464 464
 						</div>	
465 465
 						<div class="col s6 m4">
466
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="azure" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
466
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="azure" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
467 467
 								<i class="material-icons right">import_export</i>
468 468
 							</button>
469 469
 						</div>
@@ -475,12 +475,12 @@  discard block
 block discarded – undo
475 475
 			<!-- BACKBLAZE STORAGE-->
476 476
 			<li id="backblaze">
477 477
 				<div class="collapsible-header">
478
-					<i class="material-icons">computer</i><?php echo __("BackBlaze Storage",'xcloner-backup-and-restore')?>
478
+					<i class="material-icons">computer</i><?php echo __("BackBlaze Storage", 'xcloner-backup-and-restore')?>
479 479
 					<div class="right">
480 480
 						<div class="switch">
481 481
 							<label>
482 482
 							Off
483
-							<input type="checkbox" name="xcloner_backblaze_enable" class="status" value="1" <?php if(get_option("xcloner_backblaze_enable")) echo "checked"?> \>
483
+							<input type="checkbox" name="xcloner_backblaze_enable" class="status" value="1" <?php if (get_option("xcloner_backblaze_enable")) echo "checked"?> \>
484 484
 							<span class="lever"></span>
485 485
 							On
486 486
 							</label>
@@ -495,56 +495,56 @@  discard block
 block discarded – undo
495 495
 						</div>	
496 496
 						<div class=" col s12 m6">
497 497
 							<p>
498
-								<?php echo sprintf(__('Visit %s and get your Account Id and  Application Key.','xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>')?>
498
+								<?php echo sprintf(__('Visit %s and get your Account Id and  Application Key.', 'xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>')?>
499 499
 							</p>
500 500
 				        </div>
501 501
 			        </div>
502 502
 			        
503 503
 			        <div class="row">
504 504
 						<div class="col s12 m3 label">
505
-							<label for="backblaze_account_id"><?php echo __("BackBlaze Account Id",'xcloner-backup-and-restore')?></label>
505
+							<label for="backblaze_account_id"><?php echo __("BackBlaze Account Id", 'xcloner-backup-and-restore')?></label>
506 506
 						</div>	
507 507
 						<div class=" col s12 m6">
508
-							<input placeholder="<?php echo __("BackBlaze Account Id",'xcloner-backup-and-restore')?>" id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate" value="<?php echo get_option("xcloner_backblaze_account_id")?>" autocomplete="off" >
508
+							<input placeholder="<?php echo __("BackBlaze Account Id", 'xcloner-backup-and-restore')?>" id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate" value="<?php echo get_option("xcloner_backblaze_account_id")?>" autocomplete="off" >
509 509
 				        </div>
510 510
 			        </div>
511 511
 			        
512 512
 			        
513 513
 			        <div class="row">
514 514
 						<div class="col s12 m3 label">
515
-							<label for="backblaze_application_key"><?php echo __("BackBlaze Application Key",'xcloner-backup-and-restore')?></label>
515
+							<label for="backblaze_application_key"><?php echo __("BackBlaze Application Key", 'xcloner-backup-and-restore')?></label>
516 516
 						</div>
517 517
 						<div class=" col s12 m6">
518
-							<input placeholder="<?php echo __("BackBlaze Application Key",'xcloner-backup-and-restore')?>" id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate" value="<?php echo get_option("xcloner_backblaze_application_key")?>" autocomplete="off" >
518
+							<input placeholder="<?php echo __("BackBlaze Application Key", 'xcloner-backup-and-restore')?>" id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate" value="<?php echo get_option("xcloner_backblaze_application_key")?>" autocomplete="off" >
519 519
 				        </div>
520 520
 			        </div>
521 521
 			        
522 522
 			        <div class="row">
523 523
 						<div class="col s12 m3 label">
524
-							<label for="backblaze_bucket_name"><?php echo __("BackBlaze Bucket Name",'xcloner-backup-and-restore')?></label>
524
+							<label for="backblaze_bucket_name"><?php echo __("BackBlaze Bucket Name", 'xcloner-backup-and-restore')?></label>
525 525
 						</div>
526 526
 						<div class=" col s12 m6">
527
-							<input placeholder="<?php echo __("BackBlaze Bucket Name",'xcloner-backup-and-restore')?>" id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate" value="<?php echo get_option("xcloner_backblaze_bucket_name")?>" autocomplete="off" >
527
+							<input placeholder="<?php echo __("BackBlaze Bucket Name", 'xcloner-backup-and-restore')?>" id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate" value="<?php echo get_option("xcloner_backblaze_bucket_name")?>" autocomplete="off" >
528 528
 				        </div>
529 529
 			        </div>
530 530
 			        
531 531
 			        <div class="row">
532 532
 						<div class="col s12 m3 label">
533
-							<label for="backblaze_cleanup_days"><?php echo __("BackBlaze Cleanup (days)",'xcloner-backup-and-restore')?></label>
533
+							<label for="backblaze_cleanup_days"><?php echo __("BackBlaze Cleanup (days)", 'xcloner-backup-and-restore')?></label>
534 534
 						</div>
535 535
 						<div class=" col s12 m6">
536
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="backblaze_cleanup_days" type="text" name="xcloner_backblaze_cleanup_days" class="validate" value="<?php echo get_option("xcloner_backblaze_cleanup_days")?>">
536
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="backblaze_cleanup_days" type="text" name="xcloner_backblaze_cleanup_days" class="validate" value="<?php echo get_option("xcloner_backblaze_cleanup_days")?>">
537 537
 				        </div>
538 538
 			        </div>
539 539
 			        
540 540
 			        <div class="row">
541 541
 						<div class="col s6 m4">
542
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="backblaze"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
542
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="backblaze"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
543 543
 								<i class="material-icons right">save</i>
544 544
 							</button>
545 545
 						</div>	
546 546
 						<div class="col s6 m4">
547
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="backblaze" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
547
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="backblaze" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
548 548
 								<i class="material-icons right">import_export</i>
549 549
 							</button>
550 550
 						</div>
Please login to merge, or discard this patch.
admin/partials/xcloner_scheduled_backups_page.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 $xcloner_remote_storage = new Xcloner_Remote_Storage();
4 4
 $available_storages = $xcloner_remote_storage->get_available_storages();
5 5
 ?>
6
-<?php if(!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?>
6
+<?php if (!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?>
7 7
 	<div id="setting-error-" class="error settings-error notice is-dismissible"> 
8 8
 		<p><strong>
9 9
 			<?php echo sprintf(__('We have noticed that DISABLE_WP_CRON is disabled, we recommend enabling that and setting up wp-cron.php to run manually through your hosting account scheduler as explained <a href="%s" target="_blank">here</a>', 'xcloner-backup-and-restore'), "http://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress") ?>
@@ -102,21 +102,21 @@  discard block
 block discarded – undo
102 102
 					<div class="input-field col s12 l6">
103 103
 						<select name="schedule_frequency" id="schedule_frequency" class="validate" required>
104 104
 							<option value="" disabled selected><?php echo __('Schedule Recurrence', 'xcloner-backup-and-restore') ?></option>
105
-							<option value="single"><?php echo __("Don't Repeat",'xcloner-backup-and-restore')?></option>
106
-							<option value="hourly"><?php echo __("Hourly",'xcloner-backup-and-restore')?></option>
107
-							<option value="daily"><?php echo __("Daily",'xcloner-backup-and-restore')?></option>
108
-							<option value="weekly"><?php echo __("Weekly",'xcloner-backup-and-restore')?></option>
109
-							<option value="monthly"><?php echo __("Monthly",'xcloner-backup-and-restore')?></option>
105
+							<option value="single"><?php echo __("Don't Repeat", 'xcloner-backup-and-restore')?></option>
106
+							<option value="hourly"><?php echo __("Hourly", 'xcloner-backup-and-restore')?></option>
107
+							<option value="daily"><?php echo __("Daily", 'xcloner-backup-and-restore')?></option>
108
+							<option value="weekly"><?php echo __("Weekly", 'xcloner-backup-and-restore')?></option>
109
+							<option value="monthly"><?php echo __("Monthly", 'xcloner-backup-and-restore')?></option>
110 110
 						</select>
111 111
 					</div>
112 112
 				</div>
113 113
 				
114
-				<?php if(sizeof($available_storages)):?>
114
+				<?php if (sizeof($available_storages)):?>
115 115
 				<div class="row">
116 116
 					<div class="input-field col s12 l6">
117 117
 						<select name="schedule_storage" id="schedule_storage" class="validate" >
118 118
 							<option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?></option>
119
-							<?php foreach($available_storages as $storage=>$text):?>
119
+							<?php foreach ($available_storages as $storage=>$text):?>
120 120
 								<option value="<?php echo $storage?>"><?php echo $text?></option>
121 121
 							<?php endforeach?>
122 122
 						</select>
Please login to merge, or discard this patch.
includes/class-xcloner-logger.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,32 +4,32 @@  discard block
 block discarded – undo
4 4
 use Monolog\Handler\StreamHandler;
5 5
 use Monolog\Handler\RotatingFileHandler;
6 6
 
7
-class Xcloner_Logger extends Logger{
7
+class Xcloner_Logger extends Logger {
8 8
 	
9
-	private $logger_path ;
9
+	private $logger_path;
10 10
 	private $max_logger_files = 15;
11 11
 	private $main_logger_url;
12 12
 	
13
-	public function __construct($logger_name = "xcloner_logger", $hash="")
13
+	public function __construct($logger_name = "xcloner_logger", $hash = "")
14 14
 	{
15
-		$xcloner_settings 	= new Xcloner_Settings($hash);
16
-		$logger_path 		= $xcloner_settings->get_xcloner_store_path().DS.$xcloner_settings->get_logger_filename();
15
+		$xcloner_settings = new Xcloner_Settings($hash);
16
+		$logger_path = $xcloner_settings->get_xcloner_store_path().DS.$xcloner_settings->get_logger_filename();
17 17
 		$logger_path_tmp 	= "";
18 18
 		
19
-		if($hash)
19
+		if ($hash)
20 20
 			$logger_path_tmp = $xcloner_settings->get_xcloner_tmp_path().DS.$xcloner_settings->get_logger_filename(1);
21 21
 		
22 22
 		
23 23
 		$this->logger_path = $logger_path;
24 24
 		//$this->logger_path_tmp = $logger_path_tmp;
25 25
 		
26
-		if(!is_dir($xcloner_settings->get_xcloner_store_path()) or !is_writable($xcloner_settings->get_xcloner_store_path()))
26
+		if (!is_dir($xcloner_settings->get_xcloner_store_path()) or !is_writable($xcloner_settings->get_xcloner_store_path()))
27 27
 		{
28 28
 			$logger_path = "php://stderr";
29 29
 			$logger_path_tmp = "";
30 30
 		}
31 31
 		
32
-		if(!$xcloner_settings->get_xcloner_option('xcloner_enable_log'))
32
+		if (!$xcloner_settings->get_xcloner_option('xcloner_enable_log'))
33 33
 		{
34 34
 			$logger_path = "php://stderr";
35 35
 			$logger_path_tmp = "";
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
 		
41 41
 		$debug_level = Logger::INFO;
42 42
 		
43
-		if(WP_DEBUG)
43
+		if (WP_DEBUG)
44 44
 			$debug_level = Logger::DEBUG;
45 45
 
46 46
 	
47
-		if($logger_path)
47
+		if ($logger_path)
48 48
 		{
49 49
 			$stream = new RotatingFileHandler($logger_path, $this->max_logger_files, $debug_level);
50 50
 			$this->pushHandler($stream);
51 51
 			
52
-			$this->main_logger_url =  $stream->getUrl();
52
+			$this->main_logger_url = $stream->getUrl();
53 53
 		}
54 54
 			
55
-		if($hash and $logger_path_tmp)
55
+		if ($hash and $logger_path_tmp)
56 56
 			$this->pushHandler(new StreamHandler($logger_path_tmp, $debug_level));
57 57
 		
58 58
 		//return $this;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		$lines = array();
69 69
 		
70 70
 		//if(!file_exists($this->logger_path) or !is_readable($this->logger_path))
71
-		if(!file_exists($this->main_logger_url) or !is_readable($this->main_logger_url))
71
+		if (!file_exists($this->main_logger_url) or !is_readable($this->main_logger_url))
72 72
 			return false;
73 73
 		
74 74
 		//$fp = fopen($this->logger_path, 'r');
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 		$lastLine = "";
79 79
 		
80 80
 		// Loop backword until we have our lines or we reach the start
81
-		while($pos > 0 && count($lines) < $totalLines) {
81
+		while ($pos > 0 && count($lines) < $totalLines) {
82 82
 		
83 83
 		$C = fgetc($fp);
84
-		if($C == "\n") {
84
+		if ($C == "\n") {
85 85
 		  // skip empty lines
86
-		  if(trim($lastLine) != "") {
86
+		  if (trim($lastLine) != "") {
87 87
 			$lines[] = $lastLine;
88 88
 		  }
89 89
 		  $lastLine = '';
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@  discard block
 block discarded – undo
16 16
 		$logger_path 		= $xcloner_settings->get_xcloner_store_path().DS.$xcloner_settings->get_logger_filename();
17 17
 		$logger_path_tmp 	= "";
18 18
 		
19
-		if($hash)
20
-			$logger_path_tmp = $xcloner_settings->get_xcloner_tmp_path().DS.$xcloner_settings->get_logger_filename(1);
19
+		if($hash) {
20
+					$logger_path_tmp = $xcloner_settings->get_xcloner_tmp_path().DS.$xcloner_settings->get_logger_filename(1);
21
+		}
21 22
 		
22 23
 		
23 24
 		$this->logger_path = $logger_path;
@@ -40,8 +41,9 @@  discard block
 block discarded – undo
40 41
 		
41 42
 		$debug_level = Logger::INFO;
42 43
 		
43
-		if(WP_DEBUG)
44
-			$debug_level = Logger::DEBUG;
44
+		if(WP_DEBUG) {
45
+					$debug_level = Logger::DEBUG;
46
+		}
45 47
 
46 48
 	
47 49
 		if($logger_path)
@@ -52,8 +54,9 @@  discard block
 block discarded – undo
52 54
 			$this->main_logger_url =  $stream->getUrl();
53 55
 		}
54 56
 			
55
-		if($hash and $logger_path_tmp)
56
-			$this->pushHandler(new StreamHandler($logger_path_tmp, $debug_level));
57
+		if($hash and $logger_path_tmp) {
58
+					$this->pushHandler(new StreamHandler($logger_path_tmp, $debug_level));
59
+		}
57 60
 		
58 61
 		//return $this;
59 62
 	}
@@ -68,8 +71,9 @@  discard block
 block discarded – undo
68 71
 		$lines = array();
69 72
 		
70 73
 		//if(!file_exists($this->logger_path) or !is_readable($this->logger_path))
71
-		if(!file_exists($this->main_logger_url) or !is_readable($this->main_logger_url))
72
-			return false;
74
+		if(!file_exists($this->main_logger_url) or !is_readable($this->main_logger_url)) {
75
+					return false;
76
+		}
73 77
 		
74 78
 		//$fp = fopen($this->logger_path, 'r');
75 79
 		$fp = fopen($this->main_logger_url, 'r');
Please login to merge, or discard this patch.
includes/class-xcloner-loader.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -55,19 +55,19 @@  discard block
 block discarded – undo
55 55
 	
56 56
 	public function xcloner_backup_add_admin_menu()
57 57
 	{
58
-		if ( function_exists('add_menu_page') )
59
-			add_menu_page( __('Site Backup','xcloner-backup-and-restore'), __('Site Backup','xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page', 'xcloner_display', 'dashicons-backup');
58
+		if (function_exists('add_menu_page'))
59
+			add_menu_page(__('Site Backup', 'xcloner-backup-and-restore'), __('Site Backup', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page', 'xcloner_display', 'dashicons-backup');
60 60
 
61
-		if ( function_exists('add_submenu_page') )
61
+		if (function_exists('add_submenu_page'))
62 62
 		{
63 63
 			
64
-			add_submenu_page( 'xcloner_init_page', __('XCloner Dashboard','xcloner-backup-and-restore'), __('Dashboard','xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page', 'xcloner_display');
65
-			add_submenu_page( 'xcloner_init_page', __('XCloner Backup Settings','xcloner-backup-and-restore'), __('Settings','xcloner-backup-and-restore'), 'manage_options', 'xcloner_settings_page', 'xcloner_display');
66
-			add_submenu_page( 'xcloner_init_page', __('Remote Storage Settings','xcloner-backup-and-restore'), __('Remote Storage','xcloner-backup-and-restore'), 'manage_options', 'xcloner_remote_storage_page', 'xcloner_display');
67
-			add_submenu_page( 'xcloner_init_page', __('Manage Backups','xcloner-backup-and-restore'), __('Manage Backups','xcloner-backup-and-restore'), 'manage_options', 'xcloner_manage_backups_page', 'xcloner_display');
68
-			add_submenu_page( 'xcloner_init_page', __('Scheduled Backups','xcloner-backup-and-restore'), __('Scheduled Backups','xcloner-backup-and-restore'), 'manage_options', 'xcloner_scheduled_backups_page', 'xcloner_display');
69
-			add_submenu_page( 'xcloner_init_page', __('Generate Backups','xcloner-backup-and-restore'), __('Generate Backups','xcloner-backup-and-restore'), 'manage_options', 'xcloner_generate_backups_page', 'xcloner_display');
70
-			add_submenu_page( 'xcloner_init_page', __('Restore Backups','xcloner-backup-and-restore'), __('Restore Backups','xcloner-backup-and-restore'), 'manage_options', 'xcloner_restore_page', 'xcloner_display');
64
+			add_submenu_page('xcloner_init_page', __('XCloner Dashboard', 'xcloner-backup-and-restore'), __('Dashboard', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page', 'xcloner_display');
65
+			add_submenu_page('xcloner_init_page', __('XCloner Backup Settings', 'xcloner-backup-and-restore'), __('Settings', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_settings_page', 'xcloner_display');
66
+			add_submenu_page('xcloner_init_page', __('Remote Storage Settings', 'xcloner-backup-and-restore'), __('Remote Storage', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_remote_storage_page', 'xcloner_display');
67
+			add_submenu_page('xcloner_init_page', __('Manage Backups', 'xcloner-backup-and-restore'), __('Manage Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_manage_backups_page', 'xcloner_display');
68
+			add_submenu_page('xcloner_init_page', __('Scheduled Backups', 'xcloner-backup-and-restore'), __('Scheduled Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_scheduled_backups_page', 'xcloner_display');
69
+			add_submenu_page('xcloner_init_page', __('Generate Backups', 'xcloner-backup-and-restore'), __('Generate Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_generate_backups_page', 'xcloner_display');
70
+			add_submenu_page('xcloner_init_page', __('Restore Backups', 'xcloner-backup-and-restore'), __('Restore Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_restore_page', 'xcloner_display');
71 71
 		}
72 72
 	
73 73
 	}
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 	 * @param    int                  $priority         Optional. he priority at which the function should be fired. Default is 10.
83 83
 	 * @param    int                  $accepted_args    Optional. The number of arguments that should be passed to the $callback. Default is 1.
84 84
 	 */
85
-	public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
86
-		$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
85
+	public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1) {
86
+		$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
87 87
 	}
88 88
 
89 89
 	/**
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 	 * @param    int                  $priority         Optional. he priority at which the function should be fired. Default is 10.
97 97
 	 * @param    int                  $accepted_args    Optional. The number of arguments that should be passed to the $callback. Default is 1
98 98
 	 */
99
-	public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
100
-		$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
99
+	public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1) {
100
+		$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
101 101
 	}
102 102
 
103 103
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 * @param    int                  $accepted_args    The number of arguments that should be passed to the $callback.
115 115
 	 * @return   array                                  The collection of actions and filters registered with WordPress.
116 116
 	 */
117
-	private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
117
+	private function add($hooks, $hook, $component, $callback, $priority, $accepted_args) {
118 118
 
119 119
 		$hooks[] = array(
120 120
 			'hook'          => $hook,
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function run() {
137 137
 
138
-		foreach ( $this->filters as $hook ) {
139
-			add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
138
+		foreach ($this->filters as $hook) {
139
+			add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
140 140
 		}
141 141
 
142
-		foreach ( $this->actions as $hook ) {
143
-			add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
142
+		foreach ($this->actions as $hook) {
143
+			add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
144 144
 		}
145 145
 
146 146
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@
 block discarded – undo
55 55
 	
56 56
 	public function xcloner_backup_add_admin_menu()
57 57
 	{
58
-		if ( function_exists('add_menu_page') )
59
-			add_menu_page( __('Site Backup','xcloner-backup-and-restore'), __('Site Backup','xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page', 'xcloner_display', 'dashicons-backup');
58
+		if ( function_exists('add_menu_page') ) {
59
+					add_menu_page( __('Site Backup','xcloner-backup-and-restore'), __('Site Backup','xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page', 'xcloner_display', 'dashicons-backup');
60
+		}
60 61
 
61 62
 		if ( function_exists('add_submenu_page') )
62 63
 		{
Please login to merge, or discard this patch.
includes/class-xcloner-scheduler.php 2 patches
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-class Xcloner_Scheduler{
3
+class Xcloner_Scheduler {
4 4
 	
5 5
 	private $db;
6 6
 	private $scheduler_table = "xcloner_scheduler";
@@ -20,23 +20,23 @@  discard block
 block discarded – undo
20 20
 		global $wpdb;
21 21
 		$this->db = $wpdb;
22 22
 		
23
-		$wpdb->show_errors				= false;
23
+		$wpdb->show_errors = false;
24 24
 		
25 25
 		$this->xcloner_settings 		= new Xcloner_Settings();
26 26
 		
27 27
 		$this->scheduler_table 			= $this->db->prefix.$this->scheduler_table;
28 28
 	}
29 29
 
30
-	public function get_scheduler_list($return_only_enabled = 0 )
30
+	public function get_scheduler_list($return_only_enabled = 0)
31 31
 	{
32 32
 		$list = $this->db->get_results("SELECT * FROM ".$this->scheduler_table);
33 33
 		
34
-		if($return_only_enabled)
34
+		if ($return_only_enabled)
35 35
 		{
36
-			$new_list= array();
36
+			$new_list = array();
37 37
 			
38
-			foreach($list as $res)
39
-				if($res->status)
38
+			foreach ($list as $res)
39
+				if ($res->status)
40 40
 				{
41 41
 					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id));
42 42
 					$new_list[] = $res;
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	{
65 65
 		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
66 66
 		
67
-		if(!$data)
67
+		if (!$data)
68 68
 			return false;
69 69
 		
70 70
 		$params = json_decode($data['params']);
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 	
82 82
 	public function delete_schedule_by_id($id)
83 83
 	{
84
-		$hook =  'xcloner_scheduler_'.$id;
85
-		wp_clear_scheduled_hook( $hook, array($id) );
84
+		$hook = 'xcloner_scheduler_'.$id;
85
+		wp_clear_scheduled_hook($hook, array($id));
86 86
 		
87
-		$data = $this->db->delete( $this->scheduler_table , array( 'id' => $id ) );
87
+		$data = $this->db->delete($this->scheduler_table, array('id' => $id));
88 88
 		
89 89
 		return $data;
90 90
 	}
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
 	{
94 94
 		$list = $this->get_scheduler_list();
95 95
 		
96
-		foreach($list as $schedule)
96
+		foreach ($list as $schedule)
97 97
 		{
98
-			$hook =  'xcloner_scheduler_'.$schedule->id;
98
+			$hook = 'xcloner_scheduler_'.$schedule->id;
99 99
 			
100
-			$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
101
-			wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
100
+			$timestamp = wp_next_scheduled($hook, array($schedule->id));
101
+			wp_unschedule_event($timestamp, $hook, array($schedule->id));
102 102
 		}
103 103
 	}
104 104
 	
@@ -106,24 +106,24 @@  discard block
 block discarded – undo
106 106
 	{
107 107
 		$list = $this->get_scheduler_list();
108 108
 		
109
-		foreach($list as $schedule)
109
+		foreach ($list as $schedule)
110 110
 		{
111
-			$hook =  'xcloner_scheduler_'.$schedule->id;
111
+			$hook = 'xcloner_scheduler_'.$schedule->id;
112 112
 			
113 113
 			//adding the xcloner_scheduler hook with xcloner_scheduler_callback callback
114
-			add_action( $hook, array($this, 'xcloner_scheduler_callback'), 10,  1 );
114
+			add_action($hook, array($this, 'xcloner_scheduler_callback'), 10, 1);
115 115
 			
116
-			if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
116
+			if (!wp_next_scheduled($hook, array($schedule->id)) and $schedule->status) {
117 117
 				
118
-				if($schedule->recurrence == "single")
119
-					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
118
+				if ($schedule->recurrence == "single")
119
+					wp_schedule_single_event(strtotime($schedule->start_at), $hook, array($schedule->id));
120 120
 				else	
121
-					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
121
+					wp_schedule_event(strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id));
122 122
 					
123
-			}elseif(!$schedule->status)
123
+			}elseif (!$schedule->status)
124 124
 			{
125
-				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
126
-				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
125
+				$timestamp = wp_next_scheduled($hook, array($schedule->id));
126
+				wp_unschedule_event($timestamp, $hook, array($schedule->id));
127 127
 			}
128 128
 		}
129 129
 	
@@ -132,17 +132,17 @@  discard block
 block discarded – undo
132 132
 	public function update_cron_hook($id)
133 133
 	{
134 134
 		$schedule = $this->get_schedule_by_id_object($id);
135
-		$hook =  'xcloner_scheduler_'.$schedule->id;
135
+		$hook = 'xcloner_scheduler_'.$schedule->id;
136 136
 		
137
-		$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
138
-		wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
137
+		$timestamp = wp_next_scheduled($hook, array($schedule->id));
138
+		wp_unschedule_event($timestamp, $hook, array($schedule->id));
139 139
 		
140 140
 		if ($schedule->status) {
141 141
 			
142
-			if($schedule->recurrence == "single")
143
-				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
144
-			else{	
145
-				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
142
+			if ($schedule->recurrence == "single")
143
+				wp_schedule_single_event(strtotime($schedule->start_at), $hook, array($schedule->id));
144
+			else {	
145
+				wp_schedule_event(strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id));
146 146
 			}
147 147
 				
148 148
 		}
@@ -150,16 +150,16 @@  discard block
 block discarded – undo
150 150
 	
151 151
 	public function disable_single_cron($schedule_id)
152 152
 	{
153
-		$hook =  'xcloner_scheduler_'.$schedule_id;
154
-		$timestamp = wp_next_scheduled( $hook , array($schedule_id) );
155
-		wp_unschedule_event( $timestamp, $hook, array($schedule_id) );
153
+		$hook = 'xcloner_scheduler_'.$schedule_id;
154
+		$timestamp = wp_next_scheduled($hook, array($schedule_id));
155
+		wp_unschedule_event($timestamp, $hook, array($schedule_id));
156 156
 		
157 157
 		$schedule['status'] = 0;
158 158
 		
159 159
 		$update = $this->db->update( 
160 160
 				$this->scheduler_table, 
161 161
 				$schedule, 
162
-				array( 'id' => $schedule_id ), 
162
+				array('id' => $schedule_id), 
163 163
 				array( 
164 164
 					'%s', 
165 165
 					'%s' 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$update = $this->db->update( 
176 176
 				$this->scheduler_table, 
177 177
 				$schedule, 
178
-				array( 'id' => $schedule_id ), 
178
+				array('id' => $schedule_id), 
179 179
 				array( 
180 180
 					'%s', 
181 181
 					'%s' 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		$update = $this->db->update( 
192 192
 				$this->scheduler_table, 
193 193
 				$schedule, 
194
-				array( 'id' => $schedule_id ), 
194
+				array('id' => $schedule_id), 
195 195
 				array( 
196 196
 					'%s', 
197 197
 					'%s' 
@@ -206,20 +206,20 @@  discard block
 block discarded – undo
206 206
 		
207 207
 		$this->xcloner_settings->generate_new_hash();
208 208
 		
209
-		$this->xcloner_file_system 		= new Xcloner_File_System($this->xcloner_settings->get_hash());
210
-		$this->xcloner_database 		= new XCloner_Database($this->xcloner_settings->get_hash());
211
-		$this->archive_system 			= new Xcloner_Archive($this->xcloner_settings->get_hash());
212
-		$this->logger 					= new XCloner_Logger('xcloner_scheduler', $this->xcloner_settings->get_hash());
213
-		$this->xcloner_remote_storage 	= new Xcloner_Remote_Storage($this->xcloner_settings->get_hash());
209
+		$this->xcloner_file_system = new Xcloner_File_System($this->xcloner_settings->get_hash());
210
+		$this->xcloner_database = new XCloner_Database($this->xcloner_settings->get_hash());
211
+		$this->archive_system = new Xcloner_Archive($this->xcloner_settings->get_hash());
212
+		$this->logger = new XCloner_Logger('xcloner_scheduler', $this->xcloner_settings->get_hash());
213
+		$this->xcloner_remote_storage = new Xcloner_Remote_Storage($this->xcloner_settings->get_hash());
214 214
 		
215 215
 		//$schedule = $this->get_schedule_by_id($id);
216 216
 		
217
-		if($schedule['recurrence'] == "single")
217
+		if ($schedule['recurrence'] == "single")
218 218
 		{
219 219
 			$this->disable_single_cron($schedule['id']);
220 220
 		}
221 221
 		
222
-		if(!$schedule)
222
+		if (!$schedule)
223 223
 		{
224 224
 			$this->logger->info(sprintf("Could not load schedule with id'%s'", $id), array("CRON"));
225 225
 			return;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		$init = 1;
235 235
 		$continue = 1;
236 236
 
237
-		while($continue)
237
+		while ($continue)
238 238
 		{
239 239
 			$continue = $this->xcloner_file_system->start_file_recursion($init);
240 240
 			
@@ -248,9 +248,9 @@  discard block
 block discarded – undo
248 248
 		$init = 1;
249 249
 		$return['finished'] = 0;
250 250
 		
251
-		while(!$return['finished'])
251
+		while (!$return['finished'])
252 252
 		{
253
-			$return  = $this->xcloner_database->start_database_recursion((array)json_decode($schedule['table_params']), $return, $init);
253
+			$return = $this->xcloner_database->start_database_recursion((array)json_decode($schedule['table_params']), $return, $init);
254 254
 			$init = 0;
255 255
 		}
256 256
 		
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 		$return['finished'] = 0;
263 263
 		$return['extra'] = array();
264 264
 		
265
-		while(!$return['finished'])
265
+		while (!$return['finished'])
266 266
 		{
267 267
 			$return = $this->archive_system->start_incremental_backup((array)$schedule['backup_params'], $return['extra'], $init);
268 268
 			$init = 0;
@@ -271,28 +271,28 @@  discard block
 block discarded – undo
271 271
 		
272 272
 		//getting the last backup archive file
273 273
 		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
274
-		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
274
+		if ($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
275 275
 				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
276 276
 		
277 277
 		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
278 278
 		
279
-		if($schedule['remote_storage'] and array_key_exists($schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages()))
279
+		if ($schedule['remote_storage'] and array_key_exists($schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages()))
280 280
 		{
281 281
 			$backup_file = $return['extra']['backup_parent'];
282 282
 			
283 283
 			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
284 284
 			
285
-			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
285
+			if (method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
286 286
 				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
287 287
 		}
288 288
 		
289 289
 		
290
-		if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
290
+		if (isset($schedule['backup_params']->email_notification) and $to = $schedule['backup_params']->email_notification)
291 291
 		{	
292
-			try{
292
+			try {
293 293
 				$from = "XCloner Schedule - ".$schedule['name'];
294 294
 				$this->archive_system->send_notification($to, $from, "", $return['extra']['backup_parent'], $schedule);
295
-			}catch(Exception $e)
295
+			}catch (Exception $e)
296 296
 			{
297 297
 				$this->logger->error($e->getMessage());
298 298
 			}
@@ -307,16 +307,16 @@  discard block
 block discarded – undo
307 307
 	{
308 308
 		$schedule = $this->get_schedule_by_id($id);
309 309
 		
310
-		try{
310
+		try {
311 311
 
312 312
 			$this->__xcloner_scheduler_callback($id, $schedule);
313 313
 			
314
-		}catch(Exception $e){
314
+		}catch (Exception $e) {
315 315
 			
316
-			if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
316
+			if (isset($schedule['backup_params']->email_notification) and $to = $schedule['backup_params']->email_notification)
317 317
 			{
318 318
 				$from = "XCloner Schedule - ".$schedule['name'];
319
-				$this->archive_system->send_notification($to, $from, "Scheduled backup error","", "", $e->getMessage());
319
+				$this->archive_system->send_notification($to, $from, "Scheduled backup error", "", "", $e->getMessage());
320 320
 			}
321 321
 			
322 322
 		}
Please login to merge, or discard this patch.
Braces   +23 added lines, -18 removed lines patch added patch discarded remove patch
@@ -35,10 +35,11 @@  discard block
 block discarded – undo
35 35
 		{
36 36
 			$new_list= array();
37 37
 			
38
-			foreach($list as $res)
39
-				if($res->status)
38
+			foreach($list as $res) {
39
+							if($res->status)
40 40
 				{
41 41
 					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id));
42
+			}
42 43
 					$new_list[] = $res;
43 44
 				}
44 45
 			$list = $new_list;	
@@ -64,8 +65,9 @@  discard block
 block discarded – undo
64 65
 	{
65 66
 		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
66 67
 		
67
-		if(!$data)
68
-			return false;
68
+		if(!$data) {
69
+					return false;
70
+		}
69 71
 		
70 72
 		$params = json_decode($data['params']);
71 73
 		
@@ -115,12 +117,13 @@  discard block
 block discarded – undo
115 117
 			
116 118
 			if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
117 119
 				
118
-				if($schedule->recurrence == "single")
119
-					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
120
-				else	
121
-					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
120
+				if($schedule->recurrence == "single") {
121
+									wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
122
+				} else {
123
+									wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
124
+				}
122 125
 					
123
-			}elseif(!$schedule->status)
126
+			} elseif(!$schedule->status)
124 127
 			{
125 128
 				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
126 129
 				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
@@ -139,9 +142,9 @@  discard block
 block discarded – undo
139 142
 		
140 143
 		if ($schedule->status) {
141 144
 			
142
-			if($schedule->recurrence == "single")
143
-				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
144
-			else{	
145
+			if($schedule->recurrence == "single") {
146
+							wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
147
+			} else{	
145 148
 				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
146 149
 			}
147 150
 				
@@ -271,8 +274,9 @@  discard block
 block discarded – undo
271 274
 		
272 275
 		//getting the last backup archive file
273 276
 		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
274
-		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
275
-				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
277
+		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension())) {
278
+						$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
279
+		}
276 280
 		
277 281
 		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
278 282
 		
@@ -282,8 +286,9 @@  discard block
 block discarded – undo
282 286
 			
283 287
 			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
284 288
 			
285
-			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
286
-				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
289
+			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage")) {
290
+							call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
291
+			}
287 292
 		}
288 293
 		
289 294
 		
@@ -292,7 +297,7 @@  discard block
 block discarded – undo
292 297
 			try{
293 298
 				$from = "XCloner Schedule - ".$schedule['name'];
294 299
 				$this->archive_system->send_notification($to, $from, "", $return['extra']['backup_parent'], $schedule);
295
-			}catch(Exception $e)
300
+			} catch(Exception $e)
296 301
 			{
297 302
 				$this->logger->error($e->getMessage());
298 303
 			}
@@ -311,7 +316,7 @@  discard block
 block discarded – undo
311 316
 
312 317
 			$this->__xcloner_scheduler_callback($id, $schedule);
313 318
 			
314
-		}catch(Exception $e){
319
+		} catch(Exception $e){
315 320
 			
316 321
 			if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
317 322
 			{
Please login to merge, or discard this patch.