BackUpWordPress - Version 3.6.4.1

Version Description

= 3.4 =

  • This version introduces a major refactoring of the code responsible for the core backup engine. We made sure to write unit tests for the new code, and we have tested it on several user's sites. It fixes a lot of old bugs, and Windows users should see major improvements to reliability.

= 3.3.4 =

  • WordPress 4.4 compatibility.

= 3.3.1 =

  • Fixes a bug that would prevent downloading backups since 3.3.0 - please update.

= 3.2.5 =

  • Security fixes related to add_query_arg

= 3.2.1 =

  • Important bug fixes. Please upgrade to this version to avoid incomplete or broken backups.

= 3.1.3 =

  • Fixes backwards compatibility for add-ons and avoids a Fatal Error. Please upgrade straight to this version before upgrading your add-ons.

= 3.0.4 =

  • Fixes a few minor bugs. Immediate update is recommended.

= 3.0.2 =

  • Important: we have dropped support for PHP 5.2, you will not be able to activate BackUpWordPress on a server running PHP versions older than PHP 5.3.29

= 3.0.1 =

  • This is a critical update. Fixes a bug in the core backup library. Please update immediately.
Download this release

Release Info

Developer xibodevelopment
Plugin Icon 128x128 BackUpWordPress
Version 3.6.4.1
Comparing to
See all releases

Code changes from version 3.6.4 to 3.6.4.1

Files changed (65) hide show
  1. admin/actions.php +712 -712
  2. admin/backups-table.php +48 -48
  3. admin/backups.php +42 -42
  4. admin/constants.php +131 -131
  5. admin/enable-support.php +61 -61
  6. admin/extensions.php +201 -201
  7. admin/faq.php +58 -58
  8. admin/filesystem-credentials.php +8 -8
  9. admin/menu.php +138 -138
  10. admin/page.php +27 -40
  11. admin/schedule-form-excludes.php +426 -426
  12. admin/schedule-form.php +206 -206
  13. admin/schedule-sentence.php +166 -166
  14. admin/schedule-settings.php +99 -99
  15. admin/server-info.php +63 -63
  16. admin/upsell.php +17 -17
  17. assets/hmbkp.css +87 -87
  18. assets/hmbkp.js +201 -201
  19. backdrop/README.md +114 -0
  20. backdrop/hm-backdrop.php +12 -12
  21. backdrop/license.txt +340 -340
  22. backdrop/namespace.php +5 -5
  23. backdrop/server.php +38 -38
  24. backdrop/task.php +71 -71
  25. backupwordpress.php +55 -55
  26. classes/backup/class-backup-engine-database-imysqldump.php +79 -79
  27. classes/backup/class-backup-engine-database-mysqldump.php +154 -154
  28. classes/backup/class-backup-engine-database.php +214 -214
  29. classes/backup/class-backup-engine-file-zip-archive.php +53 -53
  30. classes/backup/class-backup-engine-file-zip.php +172 -172
  31. classes/backup/class-backup-engine-file.php +111 -111
  32. classes/backup/class-backup-engine.php +203 -203
  33. classes/backup/class-backup-status.php +125 -125
  34. classes/backup/class-backup-utilities.php +70 -70
  35. classes/backup/class-backup.php +226 -226
  36. classes/class-backupwordpress-wp-cli-command.php +104 -104
  37. classes/class-email-service.php +216 -216
  38. classes/class-excludes.php +208 -209
  39. classes/class-extensions.php +107 -107
  40. classes/class-notices.php +157 -157
  41. classes/class-path.php +478 -478
  42. classes/class-plugin.php +467 -467
  43. classes/class-requirement.php +779 -779
  44. classes/class-requirements.php +65 -65
  45. classes/class-scheduled-backup.php +683 -683
  46. classes/class-schedules.php +96 -96
  47. classes/class-service.php +215 -215
  48. classes/class-services.php +126 -126
  49. classes/class-setup.php +174 -178
  50. classes/class-site-size.php +281 -281
  51. classes/class-webhook-service.php +113 -113
  52. classes/class-wpremote-webhook-service.php +71 -71
  53. classes/deprecated.php +92 -92
  54. functions/core.php +678 -678
  55. functions/interface.php +523 -528
  56. languages/backupwordpress-ca_ES.po +709 -709
  57. languages/backupwordpress-cs_CZ.po +713 -713
  58. languages/backupwordpress-da_DK.po +713 -713
  59. languages/backupwordpress-de_DE.po +713 -713
  60. languages/backupwordpress-el_GR.po +709 -709
  61. languages/backupwordpress-en_AU.po +1211 -1211
  62. languages/backupwordpress-en_GB.po +1211 -1211
  63. languages/backupwordpress-es_ES.po +713 -713
  64. languages/backupwordpress-eu.po +709 -709
  65. languages/backupwordpress-fr_FR.po +0 -237
admin/actions.php CHANGED
@@ -1,712 +1,712 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Delete the backup and then redirect back to the backups page
7
- */
8
- function request_delete_backup() {
9
-
10
- check_admin_referer( 'hmbkp_delete_backup', 'hmbkp_delete_backup_nonce' );
11
-
12
- $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_GET['hmbkp_schedule_id'] ) ) );
13
-
14
- $deleted = $schedule->delete_backup( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ) );
15
-
16
- if ( is_wp_error( $deleted ) ) {
17
- wp_die( $deleted->get_error_message() );
18
- }
19
-
20
- wp_safe_redirect( get_settings_url(), 303 );
21
-
22
- die;
23
-
24
- }
25
- add_action( 'admin_post_hmbkp_request_delete_backup', 'HM\BackUpWordPress\request_delete_backup' );
26
-
27
- /**
28
- * Enable support and then redirect back to the backups page
29
- */
30
- function request_enable_support() {
31
-
32
- check_admin_referer( 'hmbkp_enable_support', 'hmbkp_enable_support_nonce' );
33
-
34
- update_option( 'hmbkp_enable_support', true );
35
-
36
- wp_safe_redirect( get_settings_url(), 303 );
37
-
38
- die;
39
-
40
- }
41
- add_action( 'admin_post_hmbkp_request_enable_support', 'HM\BackUpWordPress\request_enable_support' );
42
-
43
- /**
44
- * Delete a schedule and all it's backups and then redirect back to the backups page
45
- */
46
- function request_delete_schedule() {
47
-
48
- check_admin_referer( 'hmbkp_delete_schedule', 'hmbkp_delete_schedule_nonce' );
49
-
50
- $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_GET['hmbkp_schedule_id'] ) ) );
51
- $schedule->cancel( true );
52
-
53
- wp_safe_redirect( get_settings_url(), 303 );
54
-
55
- die;
56
-
57
- }
58
- add_action( 'admin_post_hmbkp_request_delete_schedule', 'HM\BackUpWordPress\request_delete_schedule' );
59
-
60
- add_action( 'admin_post_hmbkp_request_credentials', function() {
61
-
62
- global $wp_filesystem;
63
-
64
- ob_start();
65
- $creds = request_filesystem_credentials( '' );
66
- ob_end_clean();
67
-
68
- // Default to showing an error if we're not able to connect.
69
- $url = add_query_arg( 'connection_error', 1, get_settings_url() );
70
-
71
- /**
72
- * If we have valid filesystem credentials then let's attempt
73
- * to use them to create the backups directory. If we can't create it in
74
- * WP_CONTENT_DIR then we fallback to trying in uploads.
75
- */
76
- if ( WP_Filesystem( $creds ) ) {
77
-
78
- // If we're able to connect then no need to redirect with an error.
79
- $url = get_settings_url();
80
-
81
- // If the backup path exists then let's just try to chmod it to the correct permissions.
82
- if (
83
- is_dir( Path::get_instance()->get_default_path() ) &&
84
- ! $wp_filesystem->chmod( Path::get_instance()->get_default_path(), FS_CHMOD_DIR )
85
- ) {
86
- $url = add_query_arg( 'creation_error', 1, get_settings_url() );
87
- } else {
88
-
89
- // If the path doesn't exist then try to correct the permission for the parent directory and create it.
90
- $wp_filesystem->chmod( dirname( Path::get_instance()->get_default_path() ), FS_CHMOD_DIR );
91
-
92
- if (
93
- ! $wp_filesystem->mkdir( Path::get_instance()->get_default_path(), FS_CHMOD_DIR ) &&
94
- ! $wp_filesystem->mkdir( Path::get_instance()->get_fallback_path(), FS_CHMOD_DIR )
95
- ) {
96
- $url = add_query_arg( 'creation_error', 1, get_settings_url() );
97
- }
98
- }
99
- }
100
-
101
- wp_safe_redirect( $url , 303 );
102
- die;
103
-
104
- } );
105
-
106
- /**
107
- * Perform a manual backup
108
- *
109
- * Handles ajax requests as well as standard GET requests
110
- */
111
- function request_do_backup() {
112
-
113
- if ( empty( $_REQUEST['hmbkp_schedule_id'] ) ) {
114
- die;
115
- }
116
-
117
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
118
- check_ajax_referer( 'hmbkp_run_schedule', 'hmbkp_run_schedule_nonce' );
119
- } else {
120
- check_admin_referer( 'hmbkp_run_schedule', 'hmbkp_run_schedule_nonce' );
121
- }
122
-
123
- Path::get_instance()->cleanup();
124
-
125
- // Fixes an issue on servers which only allow a single session per client
126
- session_write_close();
127
-
128
- $schedule_id = sanitize_text_field( urldecode( $_REQUEST['hmbkp_schedule_id'] ) );
129
- $task = new \HM\Backdrop\Task( '\HM\BackUpWordPress\run_schedule_async', $schedule_id );
130
-
131
- /**
132
- * Backdrop doesn't cleanup tasks which fatal before they can finish
133
- * so we manually cancel the task if it's already scheduled.
134
- */
135
- if ( $task->is_scheduled() ) {
136
- $task->cancel();
137
- }
138
- $task->schedule();
139
-
140
- die;
141
-
142
- }
143
- add_action( 'wp_ajax_hmbkp_run_schedule', 'HM\BackUpWordPress\request_do_backup' );
144
-
145
- function run_schedule_async( $schedule_id ) {
146
- $schedule = new Scheduled_Backup( $schedule_id );
147
- $schedule->run();
148
- }
149
-
150
- /**
151
- * Send the download file to the browser and then redirect back to the backups page
152
- */
153
- function request_download_backup() {
154
-
155
- check_admin_referer( 'hmbkp_download_backup', 'hmbkp_download_backup_nonce' );
156
-
157
- if ( ! file_exists( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ) ) ) {
158
- return;
159
- }
160
-
161
- $url = str_replace( wp_normalize_path( Path::get_home_path() ), home_url( '/' ), trailingslashit( dirname( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ) ) ) ) . urlencode( pathinfo( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ), PATHINFO_BASENAME ) );
162
-
163
- global $is_apache;
164
-
165
- if ( $is_apache ) {
166
-
167
- Path::get_instance()->protect_path( 'reset' );
168
-
169
- $url = add_query_arg( 'key', HMBKP_SECURE_KEY, $url );
170
-
171
- }
172
-
173
- wp_safe_redirect( $url, 303 );
174
-
175
- die;
176
-
177
- }
178
- add_action( 'admin_post_hmbkp_request_download_backup', 'HM\BackUpWordPress\request_download_backup' );
179
-
180
- /**
181
- * Cancels a running backup then redirect back to the backups page
182
- */
183
- function request_cancel_backup() {
184
-
185
- check_admin_referer( 'hmbkp_request_cancel_backup', 'hmbkp-request_cancel_backup_nonce' );
186
-
187
- $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_GET['hmbkp_schedule_id'] ) ) );
188
- $status = $schedule->get_status();
189
-
190
- // Delete the running backup
191
- if ( $status->get_backup_filename() && file_exists( trailingslashit( Path::get_path() ) . $status->get_backup_filename() ) ) {
192
- unlink( trailingslashit( Path::get_path() ) . $status->get_backup_filename() );
193
- }
194
-
195
- if ( file_exists( $status->get_status_filepath() ) ) {
196
- unlink( $status->get_status_filepath() );
197
- }
198
-
199
- Path::get_instance()->cleanup();
200
-
201
- wp_safe_redirect( get_settings_url(), 303 );
202
-
203
- die;
204
-
205
- }
206
- add_action( 'admin_post_hmbkp_request_cancel_backup', 'HM\BackUpWordPress\request_cancel_backup' );
207
-
208
- /**
209
- * Dismiss an error and then redirect back to the backups page
210
- */
211
- function dismiss_error() {
212
-
213
- Path::get_instance()->cleanup();
214
-
215
- Notices::get_instance()->clear_all_notices();
216
-
217
- wp_safe_redirect( wp_get_referer(), 303 );
218
-
219
- die;
220
-
221
- }
222
- add_action( 'wp_ajax_hmbkp_dismiss_error', 'HM\BackUpWordPress\dismiss_error' );
223
-
224
- /**
225
- * Catch the schedule service settings form submission
226
- *
227
- * Validate and either return errors or update the schedule
228
- */
229
- function edit_schedule_services_submit() {
230
-
231
- check_admin_referer( 'hmbkp-edit-schedule-services', 'hmbkp-edit-schedule-services-nonce' );
232
-
233
- if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
234
- wp_die( __( 'The schedule ID was not provided. Aborting.', 'backupwordpress' ) );
235
- }
236
-
237
- $schedule = new Scheduled_Backup( sanitize_text_field( $_POST['hmbkp_schedule_id'] ) );
238
-
239
- $errors = array();
240
-
241
- // Save the service options
242
- foreach ( Services::get_services( $schedule ) as $service ) {
243
- $errors = array_merge( $errors, $service->save() );
244
- }
245
-
246
- $schedule->save();
247
-
248
- if ( ! empty( $errors ) ) {
249
- foreach ( $errors as $error ) {
250
- add_settings_error( $error );
251
- }
252
- }
253
-
254
- $redirect = remove_query_arg( array( 'hmbkp_panel', 'action' ), wp_get_referer() );
255
-
256
- if ( ! empty( $errors ) ) {
257
- $redirect = wp_get_referer();
258
- }
259
-
260
- wp_safe_redirect( $redirect, '303' );
261
- die;
262
-
263
- }
264
- add_action( 'admin_post_hmbkp_edit_schedule_services_submit', 'HM\BackUpWordPress\edit_schedule_services_submit' );
265
-
266
- /**
267
- * Catch the schedule settings form submission
268
- *
269
- * Validate and either return errors or update the schedule
270
- */
271
- function edit_schedule_submit() {
272
-
273
- check_admin_referer( 'hmbkp-edit-schedule', 'hmbkp-edit-schedule-nonce' );
274
-
275
- if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
276
- die;
277
- }
278
-
279
- $schedule = new Scheduled_Backup( sanitize_text_field( $_POST['hmbkp_schedule_id'] ) );
280
- $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
281
-
282
- $errors = $settings = array();
283
-
284
- if ( isset( $_POST['hmbkp_schedule_type'] ) ) {
285
-
286
- $schedule_type = sanitize_text_field( $_POST['hmbkp_schedule_type'] );
287
-
288
- if ( ! trim( $schedule_type ) ) {
289
- $errors['hmbkp_schedule_type'] = __( 'Backup type cannot be empty', 'backupwordpress' );
290
- } elseif ( ! in_array( $schedule_type, array( 'complete', 'file', 'database' ) ) ) {
291
- $errors['hmbkp_schedule_type'] = __( 'Invalid backup type', 'backupwordpress' );
292
- } else {
293
- $settings['type'] = $schedule_type;
294
- }
295
- }
296
-
297
- if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_type'] ) ) {
298
-
299
- $schedule_recurrence_type = sanitize_text_field( $_POST['hmbkp_schedule_recurrence']['hmbkp_type'] );
300
-
301
- if ( empty( $schedule_recurrence_type ) ) {
302
- $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Schedule cannot be empty', 'backupwordpress' );
303
- } elseif ( ! in_array( $schedule_recurrence_type, array_keys( cron_schedules() ) ) && 'manually' !== $schedule_recurrence_type ) {
304
- $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Invalid schedule', 'backupwordpress' );
305
- } else {
306
- $settings['recurrence'] = $schedule_recurrence_type;
307
- }
308
- }
309
-
310
- if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_week'] ) ) {
311
-
312
- $day_of_week = sanitize_text_field( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_week'] );
313
-
314
- if ( ! in_array( $day_of_week, array( 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday' ) ) ) {
315
- $errors['hmbkp_schedule_start_day_of_week'] = __( 'Day of the week must be a valid, lowercase day name', 'backupwordpress' );
316
- } else {
317
- $settings['start_time']['day_of_week'] = $day_of_week;
318
- }
319
- }
320
-
321
- if ( ( 'monthly' === $schedule_recurrence_type ) && isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_month'] ) ) {
322
-
323
- $day_of_month = absint( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_month'] );
324
-
325
- $options = array(
326
- 'min_range' => 1,
327
- 'max_range' => 31,
328
- );
329
-
330
- if ( false === filter_var( $day_of_month, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
331
- $errors['hmbkp_schedule_start_day_of_month'] = __( 'Day of month must be between 1 and 31', 'backupwordpress' );
332
- } else {
333
- $settings['start_time']['day_of_month'] = $day_of_month;
334
- }
335
- }
336
-
337
- if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_hours'] ) ) {
338
-
339
- $hours = absint( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_hours'] );
340
-
341
- $options = array(
342
- 'min_range' => 0,
343
- 'max_range' => 23,
344
- );
345
-
346
- if ( false === filter_var( $hours, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
347
- $errors['hmbkp_schedule_start_hours'] = __( 'Hours must be between 0 and 23', 'backupwordpress' );
348
- } else {
349
- $settings['start_time']['hours'] = $hours;
350
- }
351
- }
352
-
353
- if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_minutes'] ) ) {
354
-
355
- $minutes = absint( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_minutes'] );
356
-
357
- $options = array(
358
- 'min_range' => 0,
359
- 'max_range' => 59,
360
- );
361
-
362
- if ( false === filter_var( $minutes, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
363
- $errors['hmbkp_schedule_start_minutes'] = __( 'Minutes must be between 0 and 59', 'backupwordpress' );
364
- } else {
365
- $settings['start_time']['minutes'] = $minutes;
366
- }
367
- }
368
-
369
- if ( isset( $_POST['hmbkp_schedule_max_backups'] ) ) {
370
-
371
- $max_backups = sanitize_text_field( $_POST['hmbkp_schedule_max_backups'] );
372
-
373
- if ( empty( $max_backups ) ) {
374
- $errors['hmbkp_schedule_max_backups'] = __( 'Max backups can\'t be empty', 'backupwordpress' );
375
- } elseif ( ! is_numeric( $max_backups ) ) {
376
- $errors['hmbkp_schedule_max_backups'] = __( 'Max backups must be a number', 'backupwordpress' );
377
- } elseif ( ! ( $max_backups >= 1 ) ) {
378
- $errors['hmbkp_schedule_max_backups'] = __( 'Max backups must be greater than 0', 'backupwordpress' );
379
- } elseif ( $site_size->is_site_size_cached() && disk_space_low( $site_size->get_site_size() * $max_backups ) ) {
380
- $errors['hmbkp_schedule_max_backups'] = sprintf( __( 'Storing %s backups would use %s of disk space but your server only has %s free.', 'backupwordpress' ), '<code>' . number_format_i18n( $max_backups ) . '</code>', '<code>' . size_format( $max_backups * $site_size->get_site_size() ) . '</code>', '<code>' . size_format( disk_free_space( Path::get_path() ) ) . '</code>' );
381
- } else {
382
- $settings['max_backups'] = absint( $max_backups );
383
- }
384
- }
385
-
386
- // Save the service options
387
- foreach ( Services::get_services( $schedule ) as $service ) {
388
- $errors = array_merge( $errors, $service->save() );
389
- }
390
-
391
- if ( ! empty( $settings['recurrence'] ) && ! empty( $settings['start_time'] ) ) {
392
-
393
- // Calculate the start time depending on the recurrence
394
- $start_time = determine_start_time( $settings['recurrence'], $settings['start_time'] );
395
-
396
- if ( $start_time ) {
397
- $schedule->set_schedule_start_time( $start_time );
398
- }
399
- }
400
-
401
- if ( ! empty( $settings['recurrence'] ) ) {
402
- $schedule->set_reoccurrence( $settings['recurrence'] );
403
- }
404
-
405
- if ( ! empty( $settings['type'] ) ) {
406
- $schedule->set_type( $settings['type'] );
407
- }
408
-
409
- if ( ! empty( $settings['max_backups'] ) ) {
410
- $schedule->set_max_backups( $settings['max_backups'] );
411
- }
412
-
413
- // Save the new settings
414
- $schedule->save();
415
-
416
- // Remove any old backups in-case max backups was reduced
417
- $schedule->delete_old_backups();
418
-
419
- if ( ! empty( $errors ) ) {
420
- foreach ( $errors as $error ) {
421
- add_settings_error( $error );
422
- }
423
- }
424
-
425
- $redirect = remove_query_arg( array( 'hmbkp_panel', 'action' ), wp_get_referer() );
426
-
427
- if ( ! empty( $errors ) ) {
428
- $redirect = wp_get_referer();
429
- }
430
-
431
- wp_safe_redirect( $redirect, '303' );
432
- die;
433
-
434
- }
435
- add_action( 'admin_post_hmbkp_edit_schedule_submit', 'HM\BackUpWordPress\edit_schedule_submit' );
436
-
437
- /**
438
- * Add an exclude rule
439
- *
440
- * @access public
441
- * @return void
442
- */
443
- function add_exclude_rule() {
444
-
445
- check_admin_referer( 'hmbkp-add-exclude-rule', 'hmbkp-add-exclude-rule-nonce' );
446
-
447
- if ( ! isset( $_GET['hmbkp_exclude_pathname'] ) ) {
448
- return;
449
- }
450
-
451
- $schedule = new Scheduled_Backup( sanitize_text_field( $_GET['hmbkp_schedule_id'] ) );
452
-
453
- $exclude_rule = sanitize_text_field( $_GET['hmbkp_exclude_pathname'] );
454
-
455
- $schedule->set_excludes( $exclude_rule, true );
456
-
457
- $schedule->save();
458
- delete_transient( 'hmbkp_root_size' );
459
-
460
- wp_safe_redirect( wp_get_referer(), '303' );
461
-
462
- die;
463
-
464
- }
465
- add_action( 'admin_post_hmbkp_add_exclude_rule', 'HM\BackUpWordPress\add_exclude_rule' );
466
-
467
- /**
468
- * Delete an exclude rule
469
- *
470
- * @access public
471
- * @return void
472
- */
473
- function remove_exclude_rule() {
474
-
475
- check_admin_referer( 'hmbkp_remove_exclude_rule', 'hmbkp-remove_exclude_rule_nonce' );
476
-
477
- if ( ! isset( $_GET['hmbkp_remove_exclude'] ) ) {
478
- die;
479
- }
480
-
481
- $schedule = new Scheduled_Backup( sanitize_text_field( $_GET['hmbkp_schedule_id'] ) );
482
-
483
- $excludes = $schedule->get_excludes();
484
- $exclude_rule_to_remove = stripslashes( sanitize_text_field( $_GET['hmbkp_remove_exclude'] ) );
485
-
486
- $schedule->set_excludes( array_diff( $excludes->get_user_excludes(), (array) $exclude_rule_to_remove ) );
487
-
488
- $schedule->save();
489
- delete_transient( 'hmbkp_root_size' );
490
-
491
- wp_safe_redirect( wp_get_referer(), '303' );
492
-
493
- die;
494
-
495
- }
496
- add_action( 'admin_post_hmbkp_remove_exclude_rule', 'HM\BackUpWordPress\remove_exclude_rule' );
497
-
498
- /**
499
- *
500
- * @param null
501
- */
502
- function recalculate_directory_filesize() {
503
-
504
- if ( ! isset( $_GET['hmbkp_recalculate_directory_filesize'] ) || ! check_admin_referer( 'hmbkp-recalculate_directory_filesize' ) ) {
505
- return;
506
- }
507
-
508
- // Delete the cached directory size
509
- @unlink( trailingslashit( Path::get_path() ) . '.files' );
510
-
511
- $url = add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes' ), get_settings_url() );
512
-
513
- if ( isset( $_GET['hmbkp_directory_browse'] ) ) {
514
- $url = add_query_arg( 'hmbkp_directory_browse', sanitize_text_field( $_GET['hmbkp_directory_browse'] ), $url );
515
- }
516
-
517
- wp_safe_redirect( $url, '303' );
518
- die;
519
-
520
- }
521
- add_action( 'load-' . HMBKP_ADMIN_PAGE, 'HM\BackUpWordPress\recalculate_directory_filesize' );
522
-
523
- function calculate_site_size() {
524
-
525
- $site_size = new Site_Size;
526
-
527
- if ( ! $site_size->is_site_size_cached() ) {
528
- $root = new \SplFileInfo( Path::get_root() );
529
- $site_size->filesize( $root );
530
- }
531
-
532
- }
533
- add_action( 'load-' . HMBKP_ADMIN_PAGE, 'HM\BackUpWordPress\calculate_site_size' );
534
-
535
- /**
536
- * Receive the heartbeat and return backup status
537
- */
538
- function heartbeat_received( $response, $data ) {
539
-
540
- $response['heartbeat_interval'] = 'fast';
541
-
542
- if ( ! empty( $data['hmbkp_schedule_id'] ) ) {
543
-
544
- $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $data['hmbkp_schedule_id'] ) ) );
545
- $status = new Backup_Status( $schedule->get_id() );
546
-
547
- if ( ! empty( $data['hmbkp_is_in_progress'] ) ) {
548
-
549
- if ( ! $status->get_status() ) {
550
- $response['hmbkp_schedule_status'] = 0;
551
-
552
- // Slow the heartbeat back down
553
- $response['heartbeat_interval'] = 'slow';
554
-
555
- } else {
556
- $response['hmbkp_schedule_status'] = schedule_status( $schedule, false );
557
- }
558
- }
559
-
560
- if ( ! empty( $data['hmbkp_client_request'] ) ) {
561
-
562
- $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
563
-
564
- // Pass the site size to be displayed when it's ready.
565
- if ( $site_size->is_site_size_cached() ) {
566
-
567
- $response['hmbkp_site_size'] = $site_size->get_formatted_site_size();
568
-
569
- ob_start();
570
- require( HMBKP_PLUGIN_PATH . 'admin/schedule-form-excludes.php' );
571
- $response['hmbkp_dir_sizes'] = ob_get_clean();
572
-
573
- // Slow the heartbeat back down
574
- $response['heartbeat_interval'] = 'slow';
575
- }
576
- }
577
- }
578
-
579
- return $response;
580
-
581
- }
582
- add_filter( 'heartbeat_received', 'HM\BackUpWordPress\heartbeat_received', 10, 2 );
583
-
584
- /**
585
- * Load the enable support modal contents
586
- *
587
- * @return void
588
- */
589
- function load_enable_support() {
590
-
591
- check_ajax_referer( 'hmbkp_nonce', '_wpnonce' );
592
-
593
- require_once HMBKP_PLUGIN_PATH . 'admin/enable-support.php';
594
-
595
- die;
596
-
597
- }
598
- add_action( 'wp_ajax_load_enable_support', 'HM\BackUpWordPress\load_enable_support' );
599
-
600
- /**
601
- * Display the running status via ajax
602
- */
603
- function ajax_is_backup_in_progress() {
604
-
605
- check_ajax_referer( 'hmbkp_nonce', 'nonce' );
606
-
607
- if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
608
- die;
609
- }
610
-
611
- $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_POST['hmbkp_schedule_id'] ) ) );
612
-
613
- if ( ! $schedule->get_status() ) {
614
- echo 0;
615
- } else {
616
- hmbkp_schedule_status( $schedule );
617
- }
618
-
619
- die;
620
-
621
- }
622
- add_action( 'wp_ajax_hmbkp_is_in_progress', 'HM\BackUpWordPress\ajax_is_backup_in_progress' );
623
-
624
- /**
625
- * Display the calculated size via ajax
626
- */
627
- function ajax_calculate_backup_size() {
628
-
629
- check_ajax_referer( 'hmbkp_nonce', 'nonce' );
630
-
631
- if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
632
- die;
633
- }
634
-
635
- $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_POST['hmbkp_schedule_id'] ) ) );
636
-
637
- $recalculate_filesize = true;
638
-
639
- require( HMBKP_PLUGIN_PATH . 'admin/schedule-sentence.php' );
640
-
641
- die;
642
-
643
- }
644
- add_action( 'wp_ajax_hmbkp_calculate', 'HM\BackUpWordPress\ajax_calculate_backup_size' );
645
-
646
- /**
647
- * Test the cron response and if it's not 200 show a warning message
648
- */
649
- function ajax_cron_test() {
650
-
651
- check_ajax_referer( 'hmbkp_nonce', 'nonce' );
652
-
653
- // Only run the test once per week
654
- if ( get_transient( 'hmbkp_wp_cron_test_beacon' ) ) {
655
-
656
- echo 1;
657
-
658
- die;
659
-
660
- }
661
-
662
- // Skip the test if they are using Alternate Cron
663
- if ( defined( 'ALTERNATE_WP_CRON' ) ) {
664
-
665
- delete_option( 'hmbkp_wp_cron_test_failed' );
666
-
667
- echo 1;
668
-
669
- die;
670
-
671
- }
672
-
673
- $url = site_url( 'wp-cron.php' );
674
-
675
- // Attempt to load wp-cron.php 3 times, if we get the same error each time then inform the user.
676
- $response1 = wp_remote_head( $url, array( 'timeout' => 30 ) );
677
- $response2 = wp_remote_head( $url, array( 'timeout' => 30 ) );
678
- $response3 = wp_remote_head( $url, array( 'timeout' => 30 ) );
679
-
680
- if ( is_wp_error( $response1 ) && is_wp_error( $response2 ) && is_wp_error( $response3 ) ) {
681
-
682
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'backupwordpress' ) . '</strong> ' . sprintf( __( '%1$s is returning a %2$s response which could mean cron jobs aren\'t getting fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. See the %3$s for more details.', 'backupwordpress' ), '<code>wp-cron.php</code>', '<code>' . $response1->get_error_message() . '</code>', '<a href="http://wordpress.org/extend/plugins/backupwordpress/faq/">FAQ</a>' ) . '</p></div>';
683
-
684
- update_option( 'hmbkp_wp_cron_test_failed', true );
685
-
686
- } elseif ( ! in_array( 200, array_map( 'wp_remote_retrieve_response_code', array( $response1, $response2, $response3 ) ) ) ) {
687
-
688
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'backupwordpress' ) . '</strong> ' . sprintf( __( '%1$s is returning a %2$s response which could mean cron jobs aren\'t getting fired properly. BackUpWordPress relies on wp-cron to run scheduled backups, and more generally relies on HTTP loopback connections not being blocked for manual backups. See the %3$s for more details.', 'backupwordpress' ), '<code>wp-cron.php</code>', '<code>' . esc_html( wp_remote_retrieve_response_code( $response1 ) ) . ' ' . esc_html( get_status_header_desc( wp_remote_retrieve_response_code( $response1 ) ) ) . '</code>', '<a href="http://wordpress.org/extend/plugins/backupwordpress/faq/">FAQ</a>' ) . '</p></div>';
689
-
690
- update_option( 'hmbkp_wp_cron_test_failed', true );
691
-
692
- } else {
693
-
694
- echo 1;
695
-
696
- delete_option( 'hmbkp_wp_cron_test_failed' );
697
- set_transient( 'hmbkp_wp_cron_test_beacon', 1, WEEK_IN_SECONDS );
698
-
699
- }
700
-
701
- die;
702
-
703
- }
704
- add_action( 'wp_ajax_hmbkp_cron_test', 'HM\BackUpWordPress\ajax_cron_test' );
705
-
706
- /**
707
- * Remember notice dismissal
708
- */
709
- function hmbkp_dismiss_notice() {
710
- update_site_option( 'hmbkp_hide_info_notice', true );
711
- }
712
- add_action( 'wp_ajax_hmbkp_dismiss_notice', 'HM\BackUpWordPress\hmbkp_dismiss_notice' );
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Delete the backup and then redirect back to the backups page
7
+ */
8
+ function request_delete_backup() {
9
+
10
+ check_admin_referer( 'hmbkp_delete_backup', 'hmbkp_delete_backup_nonce' );
11
+
12
+ $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_GET['hmbkp_schedule_id'] ) ) );
13
+
14
+ $deleted = $schedule->delete_backup( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ) );
15
+
16
+ if ( is_wp_error( $deleted ) ) {
17
+ wp_die( $deleted->get_error_message() );
18
+ }
19
+
20
+ wp_safe_redirect( get_settings_url(), 303 );
21
+
22
+ die;
23
+
24
+ }
25
+ add_action( 'admin_post_hmbkp_request_delete_backup', 'HM\BackUpWordPress\request_delete_backup' );
26
+
27
+ /**
28
+ * Enable support and then redirect back to the backups page
29
+ */
30
+ function request_enable_support() {
31
+
32
+ check_admin_referer( 'hmbkp_enable_support', 'hmbkp_enable_support_nonce' );
33
+
34
+ update_option( 'hmbkp_enable_support', true );
35
+
36
+ wp_safe_redirect( get_settings_url(), 303 );
37
+
38
+ die;
39
+
40
+ }
41
+ add_action( 'admin_post_hmbkp_request_enable_support', 'HM\BackUpWordPress\request_enable_support' );
42
+
43
+ /**
44
+ * Delete a schedule and all it's backups and then redirect back to the backups page
45
+ */
46
+ function request_delete_schedule() {
47
+
48
+ check_admin_referer( 'hmbkp_delete_schedule', 'hmbkp_delete_schedule_nonce' );
49
+
50
+ $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_GET['hmbkp_schedule_id'] ) ) );
51
+ $schedule->cancel( true );
52
+
53
+ wp_safe_redirect( get_settings_url(), 303 );
54
+
55
+ die;
56
+
57
+ }
58
+ add_action( 'admin_post_hmbkp_request_delete_schedule', 'HM\BackUpWordPress\request_delete_schedule' );
59
+
60
+ add_action( 'admin_post_hmbkp_request_credentials', function() {
61
+
62
+ global $wp_filesystem;
63
+
64
+ ob_start();
65
+ $creds = request_filesystem_credentials( '' );
66
+ ob_end_clean();
67
+
68
+ // Default to showing an error if we're not able to connect.
69
+ $url = add_query_arg( 'connection_error', 1, get_settings_url() );
70
+
71
+ /**
72
+ * If we have valid filesystem credentials then let's attempt
73
+ * to use them to create the backups directory. If we can't create it in
74
+ * WP_CONTENT_DIR then we fallback to trying in uploads.
75
+ */
76
+ if ( WP_Filesystem( $creds ) ) {
77
+
78
+ // If we're able to connect then no need to redirect with an error.
79
+ $url = get_settings_url();
80
+
81
+ // If the backup path exists then let's just try to chmod it to the correct permissions.
82
+ if (
83
+ is_dir( Path::get_instance()->get_default_path() ) &&
84
+ ! $wp_filesystem->chmod( Path::get_instance()->get_default_path(), FS_CHMOD_DIR )
85
+ ) {
86
+ $url = add_query_arg( 'creation_error', 1, get_settings_url() );
87
+ } else {
88
+
89
+ // If the path doesn't exist then try to correct the permission for the parent directory and create it.
90
+ $wp_filesystem->chmod( dirname( Path::get_instance()->get_default_path() ), FS_CHMOD_DIR );
91
+
92
+ if (
93
+ ! $wp_filesystem->mkdir( Path::get_instance()->get_default_path(), FS_CHMOD_DIR ) &&
94
+ ! $wp_filesystem->mkdir( Path::get_instance()->get_fallback_path(), FS_CHMOD_DIR )
95
+ ) {
96
+ $url = add_query_arg( 'creation_error', 1, get_settings_url() );
97
+ }
98
+ }
99
+ }
100
+
101
+ wp_safe_redirect( $url , 303 );
102
+ die;
103
+
104
+ } );
105
+
106
+ /**
107
+ * Perform a manual backup
108
+ *
109
+ * Handles ajax requests as well as standard GET requests
110
+ */
111
+ function request_do_backup() {
112
+
113
+ if ( empty( $_REQUEST['hmbkp_schedule_id'] ) ) {
114
+ die;
115
+ }
116
+
117
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
118
+ check_ajax_referer( 'hmbkp_run_schedule', 'hmbkp_run_schedule_nonce' );
119
+ } else {
120
+ check_admin_referer( 'hmbkp_run_schedule', 'hmbkp_run_schedule_nonce' );
121
+ }
122
+
123
+ Path::get_instance()->cleanup();
124
+
125
+ // Fixes an issue on servers which only allow a single session per client
126
+ session_write_close();
127
+
128
+ $schedule_id = sanitize_text_field( urldecode( $_REQUEST['hmbkp_schedule_id'] ) );
129
+ $task = new \HM\Backdrop\Task( '\HM\BackUpWordPress\run_schedule_async', $schedule_id );
130
+
131
+ /**
132
+ * Backdrop doesn't cleanup tasks which fatal before they can finish
133
+ * so we manually cancel the task if it's already scheduled.
134
+ */
135
+ if ( $task->is_scheduled() ) {
136
+ $task->cancel();
137
+ }
138
+ $task->schedule();
139
+
140
+ die;
141
+
142
+ }
143
+ add_action( 'wp_ajax_hmbkp_run_schedule', 'HM\BackUpWordPress\request_do_backup' );
144
+
145
+ function run_schedule_async( $schedule_id ) {
146
+ $schedule = new Scheduled_Backup( $schedule_id );
147
+ $schedule->run();
148
+ }
149
+
150
+ /**
151
+ * Send the download file to the browser and then redirect back to the backups page
152
+ */
153
+ function request_download_backup() {
154
+
155
+ check_admin_referer( 'hmbkp_download_backup', 'hmbkp_download_backup_nonce' );
156
+
157
+ if ( ! file_exists( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ) ) ) {
158
+ return;
159
+ }
160
+
161
+ $url = str_replace( wp_normalize_path( Path::get_home_path() ), home_url( '/' ), trailingslashit( dirname( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ) ) ) ) . urlencode( pathinfo( sanitize_text_field( base64_decode( $_GET['hmbkp_backup_archive'] ) ), PATHINFO_BASENAME ) );
162
+
163
+ global $is_apache;
164
+
165
+ if ( $is_apache ) {
166
+
167
+ Path::get_instance()->protect_path( 'reset' );
168
+
169
+ $url = add_query_arg( 'key', HMBKP_SECURE_KEY, $url );
170
+
171
+ }
172
+
173
+ wp_safe_redirect( $url, 303 );
174
+
175
+ die;
176
+
177
+ }
178
+ add_action( 'admin_post_hmbkp_request_download_backup', 'HM\BackUpWordPress\request_download_backup' );
179
+
180
+ /**
181
+ * Cancels a running backup then redirect back to the backups page
182
+ */
183
+ function request_cancel_backup() {
184
+
185
+ check_admin_referer( 'hmbkp_request_cancel_backup', 'hmbkp-request_cancel_backup_nonce' );
186
+
187
+ $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_GET['hmbkp_schedule_id'] ) ) );
188
+ $status = $schedule->get_status();
189
+
190
+ // Delete the running backup
191
+ if ( $status->get_backup_filename() && file_exists( trailingslashit( Path::get_path() ) . $status->get_backup_filename() ) ) {
192
+ unlink( trailingslashit( Path::get_path() ) . $status->get_backup_filename() );
193
+ }
194
+
195
+ if ( file_exists( $status->get_status_filepath() ) ) {
196
+ unlink( $status->get_status_filepath() );
197
+ }
198
+
199
+ Path::get_instance()->cleanup();
200
+
201
+ wp_safe_redirect( get_settings_url(), 303 );
202
+
203
+ die;
204
+
205
+ }
206
+ add_action( 'admin_post_hmbkp_request_cancel_backup', 'HM\BackUpWordPress\request_cancel_backup' );
207
+
208
+ /**
209
+ * Dismiss an error and then redirect back to the backups page
210
+ */
211
+ function dismiss_error() {
212
+
213
+ Path::get_instance()->cleanup();
214
+
215
+ Notices::get_instance()->clear_all_notices();
216
+
217
+ wp_safe_redirect( wp_get_referer(), 303 );
218
+
219
+ die;
220
+
221
+ }
222
+ add_action( 'wp_ajax_hmbkp_dismiss_error', 'HM\BackUpWordPress\dismiss_error' );
223
+
224
+ /**
225
+ * Catch the schedule service settings form submission
226
+ *
227
+ * Validate and either return errors or update the schedule
228
+ */
229
+ function edit_schedule_services_submit() {
230
+
231
+ check_admin_referer( 'hmbkp-edit-schedule-services', 'hmbkp-edit-schedule-services-nonce' );
232
+
233
+ if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
234
+ wp_die( __( 'The schedule ID was not provided. Aborting.', 'backupwordpress' ) );
235
+ }
236
+
237
+ $schedule = new Scheduled_Backup( sanitize_text_field( $_POST['hmbkp_schedule_id'] ) );
238
+
239
+ $errors = array();
240
+
241
+ // Save the service options
242
+ foreach ( Services::get_services( $schedule ) as $service ) {
243
+ $errors = array_merge( $errors, $service->save() );
244
+ }
245
+
246
+ $schedule->save();
247
+
248
+ if ( ! empty( $errors ) ) {
249
+ foreach ( $errors as $error ) {
250
+ add_settings_error( $error );
251
+ }
252
+ }
253
+
254
+ $redirect = remove_query_arg( array( 'hmbkp_panel', 'action' ), wp_get_referer() );
255
+
256
+ if ( ! empty( $errors ) ) {
257
+ $redirect = wp_get_referer();
258
+ }
259
+
260
+ wp_safe_redirect( $redirect, '303' );
261
+ die;
262
+
263
+ }
264
+ add_action( 'admin_post_hmbkp_edit_schedule_services_submit', 'HM\BackUpWordPress\edit_schedule_services_submit' );
265
+
266
+ /**
267
+ * Catch the schedule settings form submission
268
+ *
269
+ * Validate and either return errors or update the schedule
270
+ */
271
+ function edit_schedule_submit() {
272
+
273
+ check_admin_referer( 'hmbkp-edit-schedule', 'hmbkp-edit-schedule-nonce' );
274
+
275
+ if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
276
+ die;
277
+ }
278
+
279
+ $schedule = new Scheduled_Backup( sanitize_text_field( $_POST['hmbkp_schedule_id'] ) );
280
+ $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
281
+
282
+ $errors = $settings = array();
283
+
284
+ if ( isset( $_POST['hmbkp_schedule_type'] ) ) {
285
+
286
+ $schedule_type = sanitize_text_field( $_POST['hmbkp_schedule_type'] );
287
+
288
+ if ( ! trim( $schedule_type ) ) {
289
+ $errors['hmbkp_schedule_type'] = __( 'Backup type cannot be empty', 'backupwordpress' );
290
+ } elseif ( ! in_array( $schedule_type, array( 'complete', 'file', 'database' ) ) ) {
291
+ $errors['hmbkp_schedule_type'] = __( 'Invalid backup type', 'backupwordpress' );
292
+ } else {
293
+ $settings['type'] = $schedule_type;
294
+ }
295
+ }
296
+
297
+ if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_type'] ) ) {
298
+
299
+ $schedule_recurrence_type = sanitize_text_field( $_POST['hmbkp_schedule_recurrence']['hmbkp_type'] );
300
+
301
+ if ( empty( $schedule_recurrence_type ) ) {
302
+ $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Schedule cannot be empty', 'backupwordpress' );
303
+ } elseif ( ! in_array( $schedule_recurrence_type, array_keys( cron_schedules() ) ) && 'manually' !== $schedule_recurrence_type ) {
304
+ $errors['hmbkp_schedule_recurrence']['hmbkp_type'] = __( 'Invalid schedule', 'backupwordpress' );
305
+ } else {
306
+ $settings['recurrence'] = $schedule_recurrence_type;
307
+ }
308
+ }
309
+
310
+ if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_week'] ) ) {
311
+
312
+ $day_of_week = sanitize_text_field( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_week'] );
313
+
314
+ if ( ! in_array( $day_of_week, array( 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday' ) ) ) {
315
+ $errors['hmbkp_schedule_start_day_of_week'] = __( 'Day of the week must be a valid, lowercase day name', 'backupwordpress' );
316
+ } else {
317
+ $settings['start_time']['day_of_week'] = $day_of_week;
318
+ }
319
+ }
320
+
321
+ if ( ( 'monthly' === $schedule_recurrence_type ) && isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_month'] ) ) {
322
+
323
+ $day_of_month = absint( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_day_of_month'] );
324
+
325
+ $options = array(
326
+ 'min_range' => 1,
327
+ 'max_range' => 31,
328
+ );
329
+
330
+ if ( false === filter_var( $day_of_month, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
331
+ $errors['hmbkp_schedule_start_day_of_month'] = __( 'Day of month must be between 1 and 31', 'backupwordpress' );
332
+ } else {
333
+ $settings['start_time']['day_of_month'] = $day_of_month;
334
+ }
335
+ }
336
+
337
+ if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_hours'] ) ) {
338
+
339
+ $hours = absint( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_hours'] );
340
+
341
+ $options = array(
342
+ 'min_range' => 0,
343
+ 'max_range' => 23,
344
+ );
345
+
346
+ if ( false === filter_var( $hours, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
347
+ $errors['hmbkp_schedule_start_hours'] = __( 'Hours must be between 0 and 23', 'backupwordpress' );
348
+ } else {
349
+ $settings['start_time']['hours'] = $hours;
350
+ }
351
+ }
352
+
353
+ if ( isset( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_minutes'] ) ) {
354
+
355
+ $minutes = absint( $_POST['hmbkp_schedule_recurrence']['hmbkp_schedule_start_minutes'] );
356
+
357
+ $options = array(
358
+ 'min_range' => 0,
359
+ 'max_range' => 59,
360
+ );
361
+
362
+ if ( false === filter_var( $minutes, FILTER_VALIDATE_INT, array( 'options' => $options ) ) ) {
363
+ $errors['hmbkp_schedule_start_minutes'] = __( 'Minutes must be between 0 and 59', 'backupwordpress' );
364
+ } else {
365
+ $settings['start_time']['minutes'] = $minutes;
366
+ }
367
+ }
368
+
369
+ if ( isset( $_POST['hmbkp_schedule_max_backups'] ) ) {
370
+
371
+ $max_backups = sanitize_text_field( $_POST['hmbkp_schedule_max_backups'] );
372
+
373
+ if ( empty( $max_backups ) ) {
374
+ $errors['hmbkp_schedule_max_backups'] = __( 'Max backups can\'t be empty', 'backupwordpress' );
375
+ } elseif ( ! is_numeric( $max_backups ) ) {
376
+ $errors['hmbkp_schedule_max_backups'] = __( 'Max backups must be a number', 'backupwordpress' );
377
+ } elseif ( ! ( $max_backups >= 1 ) ) {
378
+ $errors['hmbkp_schedule_max_backups'] = __( 'Max backups must be greater than 0', 'backupwordpress' );
379
+ } elseif ( $site_size->is_site_size_cached() && disk_space_low( $site_size->get_site_size() * $max_backups ) ) {
380
+ $errors['hmbkp_schedule_max_backups'] = sprintf( __( 'Storing %s backups would use %s of disk space but your server only has %s free.', 'backupwordpress' ), '<code>' . number_format_i18n( $max_backups ) . '</code>', '<code>' . size_format( $max_backups * $site_size->get_site_size() ) . '</code>', '<code>' . size_format( disk_free_space( Path::get_path() ) ) . '</code>' );
381
+ } else {
382
+ $settings['max_backups'] = absint( $max_backups );
383
+ }
384
+ }
385
+
386
+ // Save the service options
387
+ foreach ( Services::get_services( $schedule ) as $service ) {
388
+ $errors = array_merge( $errors, $service->save() );
389
+ }
390
+
391
+ if ( ! empty( $settings['recurrence'] ) && ! empty( $settings['start_time'] ) ) {
392
+
393
+ // Calculate the start time depending on the recurrence
394
+ $start_time = determine_start_time( $settings['recurrence'], $settings['start_time'] );
395
+
396
+ if ( $start_time ) {
397
+ $schedule->set_schedule_start_time( $start_time );
398
+ }
399
+ }
400
+
401
+ if ( ! empty( $settings['recurrence'] ) ) {
402
+ $schedule->set_reoccurrence( $settings['recurrence'] );
403
+ }
404
+
405
+ if ( ! empty( $settings['type'] ) ) {
406
+ $schedule->set_type( $settings['type'] );
407
+ }
408
+
409
+ if ( ! empty( $settings['max_backups'] ) ) {
410
+ $schedule->set_max_backups( $settings['max_backups'] );
411
+ }
412
+
413
+ // Save the new settings
414
+ $schedule->save();
415
+
416
+ // Remove any old backups in-case max backups was reduced
417
+ $schedule->delete_old_backups();
418
+
419
+ if ( ! empty( $errors ) ) {
420
+ foreach ( $errors as $error ) {
421
+ add_settings_error( $error );
422
+ }
423
+ }
424
+
425
+ $redirect = remove_query_arg( array( 'hmbkp_panel', 'action' ), wp_get_referer() );
426
+
427
+ if ( ! empty( $errors ) ) {
428
+ $redirect = wp_get_referer();
429
+ }
430
+
431
+ wp_safe_redirect( $redirect, '303' );
432
+ die;
433
+
434
+ }
435
+ add_action( 'admin_post_hmbkp_edit_schedule_submit', 'HM\BackUpWordPress\edit_schedule_submit' );
436
+
437
+ /**
438
+ * Add an exclude rule
439
+ *
440
+ * @access public
441
+ * @return void
442
+ */
443
+ function add_exclude_rule() {
444
+
445
+ check_admin_referer( 'hmbkp-add-exclude-rule', 'hmbkp-add-exclude-rule-nonce' );
446
+
447
+ if ( ! isset( $_GET['hmbkp_exclude_pathname'] ) ) {
448
+ return;
449
+ }
450
+
451
+ $schedule = new Scheduled_Backup( sanitize_text_field( $_GET['hmbkp_schedule_id'] ) );
452
+
453
+ $exclude_rule = sanitize_text_field( $_GET['hmbkp_exclude_pathname'] );
454
+
455
+ $schedule->set_excludes( $exclude_rule, true );
456
+
457
+ $schedule->save();
458
+ delete_transient( 'hmbkp_root_size' );
459
+
460
+ wp_safe_redirect( wp_get_referer(), '303' );
461
+
462
+ die;
463
+
464
+ }
465
+ add_action( 'admin_post_hmbkp_add_exclude_rule', 'HM\BackUpWordPress\add_exclude_rule' );
466
+
467
+ /**
468
+ * Delete an exclude rule
469
+ *
470
+ * @access public
471
+ * @return void
472
+ */
473
+ function remove_exclude_rule() {
474
+
475
+ check_admin_referer( 'hmbkp_remove_exclude_rule', 'hmbkp-remove_exclude_rule_nonce' );
476
+
477
+ if ( ! isset( $_GET['hmbkp_remove_exclude'] ) ) {
478
+ die;
479
+ }
480
+
481
+ $schedule = new Scheduled_Backup( sanitize_text_field( $_GET['hmbkp_schedule_id'] ) );
482
+
483
+ $excludes = $schedule->get_excludes();
484
+ $exclude_rule_to_remove = stripslashes( sanitize_text_field( $_GET['hmbkp_remove_exclude'] ) );
485
+
486
+ $schedule->set_excludes( array_diff( $excludes->get_user_excludes(), (array) $exclude_rule_to_remove ) );
487
+
488
+ $schedule->save();
489
+ delete_transient( 'hmbkp_root_size' );
490
+
491
+ wp_safe_redirect( wp_get_referer(), '303' );
492
+
493
+ die;
494
+
495
+ }
496
+ add_action( 'admin_post_hmbkp_remove_exclude_rule', 'HM\BackUpWordPress\remove_exclude_rule' );
497
+
498
+ /**
499
+ *
500
+ * @param null
501
+ */
502
+ function recalculate_directory_filesize() {
503
+
504
+ if ( ! isset( $_GET['hmbkp_recalculate_directory_filesize'] ) || ! check_admin_referer( 'hmbkp-recalculate_directory_filesize' ) ) {
505
+ return;
506
+ }
507
+
508
+ // Delete the cached directory size
509
+ @unlink( trailingslashit( Path::get_path() ) . '.files' );
510
+
511
+ $url = add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes' ), get_settings_url() );
512
+
513
+ if ( isset( $_GET['hmbkp_directory_browse'] ) ) {
514
+ $url = add_query_arg( 'hmbkp_directory_browse', sanitize_text_field( $_GET['hmbkp_directory_browse'] ), $url );
515
+ }
516
+
517
+ wp_safe_redirect( $url, '303' );
518
+ die;
519
+
520
+ }
521
+ add_action( 'load-' . HMBKP_ADMIN_PAGE, 'HM\BackUpWordPress\recalculate_directory_filesize' );
522
+
523
+ function calculate_site_size() {
524
+
525
+ $site_size = new Site_Size;
526
+
527
+ if ( ! $site_size->is_site_size_cached() ) {
528
+ $root = new \SplFileInfo( Path::get_root() );
529
+ $site_size->filesize( $root );
530
+ }
531
+
532
+ }
533
+ add_action( 'load-' . HMBKP_ADMIN_PAGE, 'HM\BackUpWordPress\calculate_site_size' );
534
+
535
+ /**
536
+ * Receive the heartbeat and return backup status
537
+ */
538
+ function heartbeat_received( $response, $data ) {
539
+
540
+ $response['heartbeat_interval'] = 'fast';
541
+
542
+ if ( ! empty( $data['hmbkp_schedule_id'] ) ) {
543
+
544
+ $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $data['hmbkp_schedule_id'] ) ) );
545
+ $status = new Backup_Status( $schedule->get_id() );
546
+
547
+ if ( ! empty( $data['hmbkp_is_in_progress'] ) ) {
548
+
549
+ if ( ! $status->get_status() ) {
550
+ $response['hmbkp_schedule_status'] = 0;
551
+
552
+ // Slow the heartbeat back down
553
+ $response['heartbeat_interval'] = 'slow';
554
+
555
+ } else {
556
+ $response['hmbkp_schedule_status'] = schedule_status( $schedule, false );
557
+ }
558
+ }
559
+
560
+ if ( ! empty( $data['hmbkp_client_request'] ) ) {
561
+
562
+ $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
563
+
564
+ // Pass the site size to be displayed when it's ready.
565
+ if ( $site_size->is_site_size_cached() ) {
566
+
567
+ $response['hmbkp_site_size'] = $site_size->get_formatted_site_size();
568
+
569
+ ob_start();
570
+ require( HMBKP_PLUGIN_PATH . 'admin/schedule-form-excludes.php' );
571
+ $response['hmbkp_dir_sizes'] = ob_get_clean();
572
+
573
+ // Slow the heartbeat back down
574
+ $response['heartbeat_interval'] = 'slow';
575
+ }
576
+ }
577
+ }
578
+
579
+ return $response;
580
+
581
+ }
582
+ add_filter( 'heartbeat_received', 'HM\BackUpWordPress\heartbeat_received', 10, 2 );
583
+
584
+ /**
585
+ * Load the enable support modal contents
586
+ *
587
+ * @return void
588
+ */
589
+ function load_enable_support() {
590
+
591
+ check_ajax_referer( 'hmbkp_nonce', '_wpnonce' );
592
+
593
+ require_once HMBKP_PLUGIN_PATH . 'admin/enable-support.php';
594
+
595
+ die;
596
+
597
+ }
598
+ add_action( 'wp_ajax_load_enable_support', 'HM\BackUpWordPress\load_enable_support' );
599
+
600
+ /**
601
+ * Display the running status via ajax
602
+ */
603
+ function ajax_is_backup_in_progress() {
604
+
605
+ check_ajax_referer( 'hmbkp_nonce', 'nonce' );
606
+
607
+ if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
608
+ die;
609
+ }
610
+
611
+ $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_POST['hmbkp_schedule_id'] ) ) );
612
+
613
+ if ( ! $schedule->get_status() ) {
614
+ echo 0;
615
+ } else {
616
+ hmbkp_schedule_status( $schedule );
617
+ }
618
+
619
+ die;
620
+
621
+ }
622
+ add_action( 'wp_ajax_hmbkp_is_in_progress', 'HM\BackUpWordPress\ajax_is_backup_in_progress' );
623
+
624
+ /**
625
+ * Display the calculated size via ajax
626
+ */
627
+ function ajax_calculate_backup_size() {
628
+
629
+ check_ajax_referer( 'hmbkp_nonce', 'nonce' );
630
+
631
+ if ( empty( $_POST['hmbkp_schedule_id'] ) ) {
632
+ die;
633
+ }
634
+
635
+ $schedule = new Scheduled_Backup( sanitize_text_field( urldecode( $_POST['hmbkp_schedule_id'] ) ) );
636
+
637
+ $recalculate_filesize = true;
638
+
639
+ require( HMBKP_PLUGIN_PATH . 'admin/schedule-sentence.php' );
640
+
641
+ die;
642
+
643
+ }
644
+ add_action( 'wp_ajax_hmbkp_calculate', 'HM\BackUpWordPress\ajax_calculate_backup_size' );
645
+
646
+ /**
647
+ * Test the cron response and if it's not 200 show a warning message
648
+ */
649
+ function ajax_cron_test() {
650
+
651
+ check_ajax_referer( 'hmbkp_nonce', 'nonce' );
652
+
653
+ // Only run the test once per week
654
+ if ( get_transient( 'hmbkp_wp_cron_test_beacon' ) ) {
655
+
656
+ echo 1;
657
+
658
+ die;
659
+
660
+ }
661
+
662
+ // Skip the test if they are using Alternate Cron
663
+ if ( defined( 'ALTERNATE_WP_CRON' ) ) {
664
+
665
+ delete_option( 'hmbkp_wp_cron_test_failed' );
666
+
667
+ echo 1;
668
+
669
+ die;
670
+
671
+ }
672
+
673
+ $url = site_url( 'wp-cron.php' );
674
+
675
+ // Attempt to load wp-cron.php 3 times, if we get the same error each time then inform the user.
676
+ $response1 = wp_remote_head( $url, array( 'timeout' => 30 ) );
677
+ $response2 = wp_remote_head( $url, array( 'timeout' => 30 ) );
678
+ $response3 = wp_remote_head( $url, array( 'timeout' => 30 ) );
679
+
680
+ if ( is_wp_error( $response1 ) && is_wp_error( $response2 ) && is_wp_error( $response3 ) ) {
681
+
682
+ echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'backupwordpress' ) . '</strong> ' . sprintf( __( '%1$s is returning a %2$s response which could mean cron jobs aren\'t getting fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. See the %3$s for more details.', 'backupwordpress' ), '<code>wp-cron.php</code>', '<code>' . $response1->get_error_message() . '</code>', '<a href="http://wordpress.org/extend/plugins/backupwordpress/faq/">FAQ</a>' ) . '</p></div>';
683
+
684
+ update_option( 'hmbkp_wp_cron_test_failed', true );
685
+
686
+ } elseif ( ! in_array( 200, array_map( 'wp_remote_retrieve_response_code', array( $response1, $response2, $response3 ) ) ) ) {
687
+
688
+ echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'backupwordpress' ) . '</strong> ' . sprintf( __( '%1$s is returning a %2$s response which could mean cron jobs aren\'t getting fired properly. BackUpWordPress relies on wp-cron to run scheduled backups, and more generally relies on HTTP loopback connections not being blocked for manual backups. See the %3$s for more details.', 'backupwordpress' ), '<code>wp-cron.php</code>', '<code>' . esc_html( wp_remote_retrieve_response_code( $response1 ) ) . ' ' . esc_html( get_status_header_desc( wp_remote_retrieve_response_code( $response1 ) ) ) . '</code>', '<a href="http://wordpress.org/extend/plugins/backupwordpress/faq/">FAQ</a>' ) . '</p></div>';
689
+
690
+ update_option( 'hmbkp_wp_cron_test_failed', true );
691
+
692
+ } else {
693
+
694
+ echo 1;
695
+
696
+ delete_option( 'hmbkp_wp_cron_test_failed' );
697
+ set_transient( 'hmbkp_wp_cron_test_beacon', 1, WEEK_IN_SECONDS );
698
+
699
+ }
700
+
701
+ die;
702
+
703
+ }
704
+ add_action( 'wp_ajax_hmbkp_cron_test', 'HM\BackUpWordPress\ajax_cron_test' );
705
+
706
+ /**
707
+ * Remember notice dismissal
708
+ */
709
+ function hmbkp_dismiss_notice() {
710
+ update_site_option( 'hmbkp_hide_info_notice', true );
711
+ }
712
+ add_action( 'wp_ajax_hmbkp_dismiss_notice', 'HM\BackUpWordPress\hmbkp_dismiss_notice' );
admin/backups-table.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- ?>
6
-
7
- <table class="widefat">
8
-
9
- <thead>
10
-
11
- <tr>
12
-
13
- <th scope="col"><?php backups_number( $schedule ); ?></th>
14
- <th scope="col"><?php _e( 'Size', 'backupwordpress' ); ?></th>
15
- <th scope="col"><?php _e( 'Type', 'backupwordpress' ); ?></th>
16
- <th scope="col"><?php _e( 'Actions', 'backupwordpress' ); ?></th>
17
-
18
- </tr>
19
-
20
- </thead>
21
-
22
- <tbody>
23
-
24
- <?php if ( $schedule->get_backups() ) :
25
-
26
- $schedule->delete_old_backups();
27
-
28
- foreach ( $schedule->get_backups() as $file ) :
29
-
30
- if ( ! file_exists( $file ) ) {
31
- continue;
32
- }
33
-
34
- get_backup_row( $file, $schedule );
35
-
36
- endforeach;
37
-
38
- else : ?>
39
-
40
- <tr>
41
- <td class="hmbkp-no-backups" colspan="4"><?php _e( 'This is where your backups will appear once you have some.', 'backupwordpress' ); ?></td>
42
- </tr>
43
-
44
- <?php endif; ?>
45
-
46
- </tbody>
47
-
48
- </table>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ ?>
6
+
7
+ <table class="widefat">
8
+
9
+ <thead>
10
+
11
+ <tr>
12
+
13
+ <th scope="col"><?php backups_number( $schedule ); ?></th>
14
+ <th scope="col"><?php _e( 'Size', 'backupwordpress' ); ?></th>
15
+ <th scope="col"><?php _e( 'Type', 'backupwordpress' ); ?></th>
16
+ <th scope="col"><?php _e( 'Actions', 'backupwordpress' ); ?></th>
17
+
18
+ </tr>
19
+
20
+ </thead>
21
+
22
+ <tbody>
23
+
24
+ <?php if ( $schedule->get_backups() ) :
25
+
26
+ $schedule->delete_old_backups();
27
+
28
+ foreach ( $schedule->get_backups() as $file ) :
29
+
30
+ if ( ! file_exists( $file ) ) {
31
+ continue;
32
+ }
33
+
34
+ get_backup_row( $file, $schedule );
35
+
36
+ endforeach;
37
+
38
+ else : ?>
39
+
40
+ <tr>
41
+ <td class="hmbkp-no-backups" colspan="4"><?php _e( 'This is where your backups will appear once you have some.', 'backupwordpress' ); ?></td>
42
+ </tr>
43
+
44
+ <?php endif; ?>
45
+
46
+ </tbody>
47
+
48
+ </table>
admin/backups.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- // Refresh the schedules from the database to make sure we have the latest changes
6
- Schedules::get_instance()->refresh_schedules();
7
-
8
- $schedules = Schedules::get_instance()->get_schedules();
9
-
10
- if ( ! empty( $_GET['hmbkp_schedule_id'] ) ) {
11
- $current_schedule = new Scheduled_Backup( sanitize_text_field( $_GET['hmbkp_schedule_id'] ) );
12
- } else {
13
- $current_schedule = reset( $schedules );
14
- } ?>
15
-
16
- <div class="wp-filter">
17
- <ul class="filter-links">
18
-
19
- <?php foreach ( $schedules as $schedule ) :
20
- $status = new Backup_Status( $schedule->get_id() ); ?>
21
-
22
- <li<?php if ( $status->get_status() ) { ?> title="<?php echo esc_attr( strip_tags( $status->get_status() ) ); ?>"<?php } ?>><a href="<?php echo esc_url( add_query_arg( 'hmbkp_schedule_id', $schedule->get_id(), HMBKP_ADMIN_URL ) ); ?>" class="<?php if ( $status->get_status() ) { ?>hmbkp-running<?php } ?> <?php if ( $schedule->get_id() === $current_schedule->get_id() ) { ?>current<?php } ?>"><?php echo esc_html( translated_schedule_title( $schedule->get_slug(), $schedule->get_name() ) ); ?> <span class="count">(<?php echo esc_html( count( $schedule->get_backups() ) ); ?>)</span></a></li>
23
-
24
- <?php endforeach; ?>
25
-
26
- <li><a href="<?php echo esc_url( add_query_arg( array( 'hmbkp_add_schedule' => '1', 'action' => 'hmbkp_edit_schedule', 'hmbkp_schedule_id' => time(), 'hmbkp_panel' => 'hmbkp_edit_schedule_settings' ), HMBKP_ADMIN_URL ) ); ?>" class="<?php if ( ! Schedules::get_instance()->get_schedule( $current_schedule->get_id() ) ) { ?> current<?php } ?>"> + <?php _e( 'add schedule', 'backupwordpress' ); ?></a></li>
27
-
28
- </ul>
29
- </div>
30
-
31
- <?php // Don't continue if we don't have a schedule
32
- if ( ! $schedule = $current_schedule ) {
33
- return;
34
- } ?>
35
-
36
- <div data-hmbkp-schedule-id="<?php echo esc_attr( $schedule->get_id() ); ?>" class="hmbkp_schedule">
37
-
38
- <?php require( HMBKP_PLUGIN_PATH . 'admin/schedule-sentence.php' ); ?>
39
-
40
- <?php require( HMBKP_PLUGIN_PATH . 'admin/backups-table.php' ); ?>
41
-
42
- </div>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ // Refresh the schedules from the database to make sure we have the latest changes
6
+ Schedules::get_instance()->refresh_schedules();
7
+
8
+ $schedules = Schedules::get_instance()->get_schedules();
9
+
10
+ if ( ! empty( $_GET['hmbkp_schedule_id'] ) ) {
11
+ $current_schedule = new Scheduled_Backup( sanitize_text_field( $_GET['hmbkp_schedule_id'] ) );
12
+ } else {
13
+ $current_schedule = reset( $schedules );
14
+ } ?>
15
+
16
+ <div class="wp-filter">
17
+ <ul class="filter-links">
18
+
19
+ <?php foreach ( $schedules as $schedule ) :
20
+ $status = new Backup_Status( $schedule->get_id() ); ?>
21
+
22
+ <li<?php if ( $status->get_status() ) { ?> title="<?php echo esc_attr( strip_tags( $status->get_status() ) ); ?>"<?php } ?>><a href="<?php echo esc_url( add_query_arg( 'hmbkp_schedule_id', $schedule->get_id(), HMBKP_ADMIN_URL ) ); ?>" class="<?php if ( $status->get_status() ) { ?>hmbkp-running<?php } ?> <?php if ( $schedule->get_id() === $current_schedule->get_id() ) { ?>current<?php } ?>"><?php echo esc_html( translated_schedule_title( $schedule->get_slug(), $schedule->get_name() ) ); ?> <span class="count">(<?php echo esc_html( count( $schedule->get_backups() ) ); ?>)</span></a></li>
23
+
24
+ <?php endforeach; ?>
25
+
26
+ <li><a href="<?php echo esc_url( add_query_arg( array( 'hmbkp_add_schedule' => '1', 'action' => 'hmbkp_edit_schedule', 'hmbkp_schedule_id' => time(), 'hmbkp_panel' => 'hmbkp_edit_schedule_settings' ), HMBKP_ADMIN_URL ) ); ?>" class="<?php if ( ! Schedules::get_instance()->get_schedule( $current_schedule->get_id() ) ) { ?> current<?php } ?>"> + <?php _e( 'add schedule', 'backupwordpress' ); ?></a></li>
27
+
28
+ </ul>
29
+ </div>
30
+
31
+ <?php // Don't continue if we don't have a schedule
32
+ if ( ! $schedule = $current_schedule ) {
33
+ return;
34
+ } ?>
35
+
36
+ <div data-hmbkp-schedule-id="<?php echo esc_attr( $schedule->get_id() ); ?>" class="hmbkp_schedule">
37
+
38
+ <?php require( HMBKP_PLUGIN_PATH . 'admin/schedule-sentence.php' ); ?>
39
+
40
+ <?php require( HMBKP_PLUGIN_PATH . 'admin/backups-table.php' ); ?>
41
+
42
+ </div>
admin/constants.php CHANGED
@@ -1,131 +1,131 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- ?>
6
-
7
- <div id="hmbkp-constants">
8
-
9
- <p><?php printf( __( 'You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted.', 'backupwordpress' ), '<code>define</code>', '<code>' . __( 'Constants', 'backupwordpress' ) . '</code>', '<code>wp-config.php</code>', '<a href="http://codex.wordpress.org/Editing_wp-config.php">' . __( 'The Codex can help', 'backupwordpress' ) . '</a>', '<code>' . __( 'Constants', 'backupwordpress' ) . '</code>' ); ?></p>
10
-
11
- <table class="widefat">
12
-
13
- <tr<?php if ( defined( 'HMBKP_PATH' ) ) { ?> class="hmbkp_active"<?php } ?>>
14
-
15
- <td><code>HMBKP_PATH</code></td>
16
-
17
- <td>
18
-
19
- <?php if ( defined( 'HMBKP_PATH' ) ) { ?>
20
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>' ); ?></p>
21
- <?php } ?>
22
-
23
- <p><?php printf( __( 'The path to the folder you would like to store your backup files in, defaults to %s.', 'backupwordpress' ), '<code>' . esc_html( Path::get_path() ) . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_PATH', '/home/willmot/backups' );</code></p>
24
-
25
- </td>
26
-
27
- </tr>
28
-
29
- <tr<?php if ( defined( 'HMBKP_MYSQLDUMP_PATH' ) ) { ?> class="hmbkp_active"<?php } ?>>
30
-
31
- <td><code>HMBKP_MYSQLDUMP_PATH</code></td>
32
-
33
- <td>
34
-
35
- <?php if ( defined( 'HMBKP_MYSQLDUMP_PATH' ) ) { ?>
36
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_MYSQLDUMP_PATH ) . '</code>' ); ?></p>
37
- <?php } ?>
38
-
39
- <p><?php printf( __( 'The path to your %1$s executable. Will be used for the %2$s part of the back up if available.', 'backupwordpress' ), '<code>mysqldump</code>', '<code>' . __( 'database', 'backupwordpress' ) . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_MYSQLDUMP_PATH', '/opt/local/bin/mysqldump' );</code></p>
40
-
41
- </td>
42
-
43
- </tr>
44
-
45
- <tr<?php if ( defined( 'HMBKP_ZIP_PATH' ) ) { ?> class="hmbkp_active"<?php } ?>>
46
-
47
- <td><code>HMBKP_ZIP_PATH</code></td>
48
-
49
- <td>
50
-
51
- <?php if ( defined( 'HMBKP_ZIP_PATH' ) ) { ?>
52
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_ZIP_PATH ) . '</code>' ); ?></p>
53
- <?php } ?>
54
-
55
- <p><?php printf( __( 'The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available.', 'backupwordpress' ), '<code>zip</code>', '<code>' . __( 'files', 'backupwordpress' ) . '</code>', '<code>' . __( 'database', 'backupwordpress' ) . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ZIP_PATH', '/opt/local/bin/zip' );</code></p>
56
-
57
- </td>
58
-
59
- </tr>
60
-
61
- <tr<?php if ( defined( 'HMBKP_EXCLUDE' ) ) { ?> class="hmbkp_active"<?php } ?>>
62
-
63
- <td><code>HMBKP_EXCLUDE</code></td>
64
-
65
- <td>
66
-
67
- <?php if ( defined( 'HMBKP_EXCLUDE' ) ) { ?>
68
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_EXCLUDE ) . '</code>' ); ?></p>
69
- <?php } ?>
70
-
71
- <p><?php _e( 'Comma separated list of files or directories to exclude, the backups directory is automatically excluded.', 'backupwordpress' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_EXCLUDE', '/wp-content/uploads/, /stats/, .svn/, *.txt' );</code></p>
72
-
73
- </td>
74
-
75
- </tr>
76
-
77
- <tr<?php if ( defined( 'HMBKP_CAPABILITY' ) ) { ?> class="hmbkp_active"<?php } ?>>
78
-
79
- <td><code>HMBKP_CAPABILITY</code></td>
80
-
81
- <td>
82
-
83
- <?php if ( defined( 'HMBKP_CAPABILITY' ) ) { ?>
84
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_CAPABILITY ) . '</code>' ); ?></p>
85
- <?php } ?>
86
-
87
- <p><?php printf( __( 'The capability to use when calling %1$s. Defaults to %2$s.', 'backupwordpress' ), '<code>add_menu_page</code>', '<code>manage_options</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_CAPABILITY', 'edit_posts' );</code></p>
88
-
89
- </td>
90
-
91
- </tr>
92
-
93
- <tr<?php if ( defined( 'HMBKP_ROOT' ) ) { ?> class="hmbkp_active"<?php } ?>>
94
-
95
- <td><code>HMBKP_ROOT</code></td>
96
-
97
- <td>
98
-
99
- <?php if ( defined( 'HMBKP_ROOT' ) ) { ?>
100
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_ROOT ) . '</code>' ); ?></p>
101
- <?php } ?>
102
-
103
- <p><?php printf( __( 'The root directory that is backed up. Defaults to %s.', 'backupwordpress' ), '<code>' . Path::get_home_path() . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ROOT', ABSPATH . 'wp/' );</code></p>
104
-
105
- </td>
106
-
107
- </tr>
108
-
109
- <tr<?php if ( defined( 'HMBKP_SCHEDULE_TIME' ) && HMBKP_SCHEDULE_TIME !== '11pm' ) { ?> class="hmbkp_active"<?php } ?>>
110
-
111
- <td><code>HMBKP_SCHEDULE_TIME</code></td>
112
-
113
- <td>
114
-
115
- <?php if ( defined( 'HMBKP_SCHEDULE_TIME' ) && HMBKP_SCHEDULE_TIME !== '11pm' ) { ?>
116
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_SCHEDULE_TIME ) . '</code>' ); ?></p>
117
- <?php } ?>
118
-
119
- <p><?php printf( __( 'The time that your schedules should run. Defaults to %s.', 'backupwordpress' ), '<code>23:00</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_SCHEDULE_TIME', '07:30' );</code></p>
120
-
121
- </td>
122
-
123
- </tr>
124
-
125
- <?php foreach ( Services::get_services() as $file => $service ) :
126
- echo wp_kses_post( call_user_func( array( $service, 'constant' ) ) );
127
- endforeach; ?>
128
-
129
- </table>
130
-
131
- </div>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ ?>
6
+
7
+ <div id="hmbkp-constants">
8
+
9
+ <p><?php printf( __( 'You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted.', 'backupwordpress' ), '<code>define</code>', '<code>' . __( 'Constants', 'backupwordpress' ) . '</code>', '<code>wp-config.php</code>', '<a href="http://codex.wordpress.org/Editing_wp-config.php">' . __( 'The Codex can help', 'backupwordpress' ) . '</a>', '<code>' . __( 'Constants', 'backupwordpress' ) . '</code>' ); ?></p>
10
+
11
+ <table class="widefat">
12
+
13
+ <tr<?php if ( defined( 'HMBKP_PATH' ) ) { ?> class="hmbkp_active"<?php } ?>>
14
+
15
+ <td><code>HMBKP_PATH</code></td>
16
+
17
+ <td>
18
+
19
+ <?php if ( defined( 'HMBKP_PATH' ) ) { ?>
20
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_PATH ) . '</code>' ); ?></p>
21
+ <?php } ?>
22
+
23
+ <p><?php printf( __( 'The path to the folder you would like to store your backup files in, defaults to %s.', 'backupwordpress' ), '<code>' . esc_html( Path::get_path() ) . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_PATH', '/home/willmot/backups' );</code></p>
24
+
25
+ </td>
26
+
27
+ </tr>
28
+
29
+ <tr<?php if ( defined( 'HMBKP_MYSQLDUMP_PATH' ) ) { ?> class="hmbkp_active"<?php } ?>>
30
+
31
+ <td><code>HMBKP_MYSQLDUMP_PATH</code></td>
32
+
33
+ <td>
34
+
35
+ <?php if ( defined( 'HMBKP_MYSQLDUMP_PATH' ) ) { ?>
36
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_MYSQLDUMP_PATH ) . '</code>' ); ?></p>
37
+ <?php } ?>
38
+
39
+ <p><?php printf( __( 'The path to your %1$s executable. Will be used for the %2$s part of the back up if available.', 'backupwordpress' ), '<code>mysqldump</code>', '<code>' . __( 'database', 'backupwordpress' ) . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_MYSQLDUMP_PATH', '/opt/local/bin/mysqldump' );</code></p>
40
+
41
+ </td>
42
+
43
+ </tr>
44
+
45
+ <tr<?php if ( defined( 'HMBKP_ZIP_PATH' ) ) { ?> class="hmbkp_active"<?php } ?>>
46
+
47
+ <td><code>HMBKP_ZIP_PATH</code></td>
48
+
49
+ <td>
50
+
51
+ <?php if ( defined( 'HMBKP_ZIP_PATH' ) ) { ?>
52
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_ZIP_PATH ) . '</code>' ); ?></p>
53
+ <?php } ?>
54
+
55
+ <p><?php printf( __( 'The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available.', 'backupwordpress' ), '<code>zip</code>', '<code>' . __( 'files', 'backupwordpress' ) . '</code>', '<code>' . __( 'database', 'backupwordpress' ) . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ZIP_PATH', '/opt/local/bin/zip' );</code></p>
56
+
57
+ </td>
58
+
59
+ </tr>
60
+
61
+ <tr<?php if ( defined( 'HMBKP_EXCLUDE' ) ) { ?> class="hmbkp_active"<?php } ?>>
62
+
63
+ <td><code>HMBKP_EXCLUDE</code></td>
64
+
65
+ <td>
66
+
67
+ <?php if ( defined( 'HMBKP_EXCLUDE' ) ) { ?>
68
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_EXCLUDE ) . '</code>' ); ?></p>
69
+ <?php } ?>
70
+
71
+ <p><?php _e( 'Comma separated list of files or directories to exclude, the backups directory is automatically excluded.', 'backupwordpress' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_EXCLUDE', '/wp-content/uploads/, /stats/, .svn/, *.txt' );</code></p>
72
+
73
+ </td>
74
+
75
+ </tr>
76
+
77
+ <tr<?php if ( defined( 'HMBKP_CAPABILITY' ) ) { ?> class="hmbkp_active"<?php } ?>>
78
+
79
+ <td><code>HMBKP_CAPABILITY</code></td>
80
+
81
+ <td>
82
+
83
+ <?php if ( defined( 'HMBKP_CAPABILITY' ) ) { ?>
84
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_CAPABILITY ) . '</code>' ); ?></p>
85
+ <?php } ?>
86
+
87
+ <p><?php printf( __( 'The capability to use when calling %1$s. Defaults to %2$s.', 'backupwordpress' ), '<code>add_menu_page</code>', '<code>manage_options</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_CAPABILITY', 'edit_posts' );</code></p>
88
+
89
+ </td>
90
+
91
+ </tr>
92
+
93
+ <tr<?php if ( defined( 'HMBKP_ROOT' ) ) { ?> class="hmbkp_active"<?php } ?>>
94
+
95
+ <td><code>HMBKP_ROOT</code></td>
96
+
97
+ <td>
98
+
99
+ <?php if ( defined( 'HMBKP_ROOT' ) ) { ?>
100
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_ROOT ) . '</code>' ); ?></p>
101
+ <?php } ?>
102
+
103
+ <p><?php printf( __( 'The root directory that is backed up. Defaults to %s.', 'backupwordpress' ), '<code>' . Path::get_home_path() . '</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ROOT', ABSPATH . 'wp/' );</code></p>
104
+
105
+ </td>
106
+
107
+ </tr>
108
+
109
+ <tr<?php if ( defined( 'HMBKP_SCHEDULE_TIME' ) && HMBKP_SCHEDULE_TIME !== '11pm' ) { ?> class="hmbkp_active"<?php } ?>>
110
+
111
+ <td><code>HMBKP_SCHEDULE_TIME</code></td>
112
+
113
+ <td>
114
+
115
+ <?php if ( defined( 'HMBKP_SCHEDULE_TIME' ) && HMBKP_SCHEDULE_TIME !== '11pm' ) { ?>
116
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . esc_html( HMBKP_SCHEDULE_TIME ) . '</code>' ); ?></p>
117
+ <?php } ?>
118
+
119
+ <p><?php printf( __( 'The time that your schedules should run. Defaults to %s.', 'backupwordpress' ), '<code>23:00</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_SCHEDULE_TIME', '07:30' );</code></p>
120
+
121
+ </td>
122
+
123
+ </tr>
124
+
125
+ <?php foreach ( Services::get_services() as $file => $service ) :
126
+ echo wp_kses_post( call_user_func( array( $service, 'constant' ) ) );
127
+ endforeach; ?>
128
+
129
+ </table>
130
+
131
+ </div>
admin/enable-support.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php require_once HMBKP_PLUGIN_PATH . 'classes/class-requirements.php'; ?>
2
-
3
- <h2><?php _e( 'Enable BackUpWordPress Support', 'backupwordpress' ); ?></h2>
4
-
5
- <p class="howto"><?php printf( __( 'BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:', 'backupwordpress' ), '<a target="blank" href="https://www.intercom.io">Intercom</a>' ); ?></p>
6
-
7
- <div class="server-info">
8
-
9
- <?php foreach ( HM\BackUpWordPress\Requirements::get_requirement_groups() as $group ) : ?>
10
-
11
- <table class="fixed widefat">
12
-
13
- <thead>
14
- <tr>
15
- <th scope="col" colspan="2"><?php echo esc_html( ucwords( $group ) ); ?></th>
16
- </tr>
17
- </thead>
18
-
19
- <tbody>
20
-
21
- <?php foreach ( HM\BackUpWordPress\Requirements::get_requirements( $group ) as $requirement ) : ?>
22
-
23
- <?php if ( ( is_string( $requirement->raw_result() ) && strlen( $requirement->result() ) < 20 ) || is_bool( $requirement->raw_result() ) ) { ?>
24
-
25
- <tr>
26
-
27
- <td><?php echo esc_html( $requirement->name() ); ?></td>
28
-
29
- <td>
30
- <code><?php echo esc_html( $requirement->result() ); ?></code>
31
- </td>
32
-
33
- </tr>
34
-
35
- <?php } else { ?>
36
-
37
- <tr>
38
-
39
- <td colspan="2">
40
- <?php echo esc_html( $requirement->name() ); ?>
41
- <pre><?php echo esc_html( $requirement->result() ); ?></pre>
42
- </td>
43
-
44
- </tr>
45
-
46
- <?php } ?>
47
-
48
- <?php endforeach; ?>
49
-
50
- </tbody>
51
-
52
- </table>
53
-
54
- <?php endforeach; ?>
55
-
56
- </div>
57
-
58
- <p class="howto"><?php _e( 'You can disable support in the future by deactivating BackUpWordPress.', 'backupwordpress' ); ?></p>
59
-
60
- <a href="#" class="button-secondary hmbkp-thickbox-close"><?php _e( 'No, thanks', 'backupwordpress' ); ?></a>
61
- <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_request_enable_support' ), admin_url( 'admin-post.php' ) ), 'hmbkp_enable_support', 'hmbkp_enable_support_nonce' ) ); ?>" class="button-primary right"><?php _e( 'Yes, I want to enable support', 'backupwordpress' ); ?></a>
1
+ <?php require_once HMBKP_PLUGIN_PATH . 'classes/class-requirements.php'; ?>
2
+
3
+ <h2><?php _e( 'Enable BackUpWordPress Support', 'backupwordpress' ); ?></h2>
4
+
5
+ <p class="howto"><?php printf( __( 'BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:', 'backupwordpress' ), '<a target="blank" href="https://www.intercom.io">Intercom</a>' ); ?></p>
6
+
7
+ <div class="server-info">
8
+
9
+ <?php foreach ( HM\BackUpWordPress\Requirements::get_requirement_groups() as $group ) : ?>
10
+
11
+ <table class="fixed widefat">
12
+
13
+ <thead>
14
+ <tr>
15
+ <th scope="col" colspan="2"><?php echo esc_html( ucwords( $group ) ); ?></th>
16
+ </tr>
17
+ </thead>
18
+
19
+ <tbody>
20
+
21
+ <?php foreach ( HM\BackUpWordPress\Requirements::get_requirements( $group ) as $requirement ) : ?>
22
+
23
+ <?php if ( ( is_string( $requirement->raw_result() ) && strlen( $requirement->result() ) < 20 ) || is_bool( $requirement->raw_result() ) ) { ?>
24
+
25
+ <tr>
26
+
27
+ <td><?php echo esc_html( $requirement->name() ); ?></td>
28
+
29
+ <td>
30
+ <code><?php echo esc_html( $requirement->result() ); ?></code>
31
+ </td>
32
+
33
+ </tr>
34
+
35
+ <?php } else { ?>
36
+
37
+ <tr>
38
+
39
+ <td colspan="2">
40
+ <?php echo esc_html( $requirement->name() ); ?>
41
+ <pre><?php echo esc_html( $requirement->result() ); ?></pre>
42
+ </td>
43
+
44
+ </tr>
45
+
46
+ <?php } ?>
47
+
48
+ <?php endforeach; ?>
49
+
50
+ </tbody>
51
+
52
+ </table>
53
+
54
+ <?php endforeach; ?>
55
+
56
+ </div>
57
+
58
+ <p class="howto"><?php _e( 'You can disable support in the future by deactivating BackUpWordPress.', 'backupwordpress' ); ?></p>
59
+
60
+ <a href="#" class="button-secondary hmbkp-thickbox-close"><?php _e( 'No, thanks', 'backupwordpress' ); ?></a>
61
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_request_enable_support' ), admin_url( 'admin-post.php' ) ), 'hmbkp_enable_support', 'hmbkp_enable_support_nonce' ) ); ?>" class="button-primary right"><?php _e( 'Yes, I want to enable support', 'backupwordpress' ); ?></a>
admin/extensions.php CHANGED
@@ -1,201 +1,201 @@
1
- <?php
2
- namespace HM\BackUpWordPress;
3
- ?>
4
-
5
- <div class="wrap">
6
- <h1>
7
- <a class="page-title-action" href="<?php echo esc_url( get_settings_url() ); ?>"><?php esc_html_e( '&larr; Backups', 'backupwordpress' ); ?></a>
8
- <?php esc_html_e( 'BackUpWordPress Extensions', 'backupwordpress' ); ?>
9
- </h1>
10
-
11
- <div class="wp-filter">
12
- <p><?php esc_html_e( 'Extend BackUpWordPress by installing extensions. Extensions allow you to pick and choose the exact features you need whilst also supporting us, the developers, so we can continue working on BackUpWordPress.', 'backupwordpress' ); ?></p>
13
- </div>
14
-
15
- <?php
16
- $extensions_data = Extensions::get_instance()->get_edd_data();
17
-
18
- // Sort by title.
19
- usort( $extensions_data, function( $a, $b ) {
20
- return strcmp( $b->title->rendered, $a->title->rendered );
21
- });
22
-
23
- /**
24
- * Include is required for the usage of is_plugin_active()
25
- * to identify if a plugin is currently activated.
26
- * This info is further used to display a correct action button
27
- * depending on plugin's state (i.e. Update Now, Activate, Active).
28
- */
29
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
30
-
31
- $installed_plugins = array();
32
- foreach ( get_plugins() as $path => $plugin_info ) {
33
- $installed_plugins[ strtolower( $plugin_info['Name'] ) ] = array(
34
- 'version' => $plugin_info['Version'],
35
- 'path' => $path,
36
- 'is_active' => is_plugin_active( $path ),
37
- );
38
- }
39
- ?>
40
-
41
- <h3><?php esc_html_e( 'Remote Storage', 'backupwordpress' ); ?></h3>
42
-
43
- <p><?php esc_html_e( 'It\'s important to store your backups somewhere other than on your site. Using the extensions below you can easily push your backups to one or more Cloud providers.', 'backupwordpress' ); ?></p>
44
-
45
- <div class="wp-list-table widefat plugin-install">
46
- <div id="the-list">
47
-
48
- <?php $first = true; ?>
49
-
50
- <?php foreach ( $extensions_data as $extension ) :
51
-
52
- $extension_name_lowcase = strtolower( $extension->title->rendered );
53
- $is_extension_installed = in_array( $extension_name_lowcase, array_keys( $installed_plugins ) );
54
-
55
- $extension_version = $is_extension_installed ?
56
- $installed_plugins[ $extension_name_lowcase ]['version'] : '';
57
-
58
- $extension_path = $is_extension_installed ?
59
- $installed_plugins[ $extension_name_lowcase ]['path'] : '';
60
-
61
- $is_extension_active = $is_extension_installed ?
62
- $installed_plugins[ $extension_name_lowcase ]['is_active'] : false;
63
- ?>
64
-
65
- <div class="plugin-card plugin-card-<?php echo esc_attr( $extension->slug ); ?>">
66
- <div class="plugin-card-top">
67
- <div class="name column-name">
68
- <h3>
69
- <a href="<?php echo esc_url( $extension->link ); ?>" class="thickbox">
70
- <?php echo esc_html( $extension->title->rendered ); ?>
71
- <img src="<?php echo esc_url( $extension->featured_image_url ); ?>" class="plugin-icon" alt="" />
72
- </a>
73
- </h3>
74
- </div>
75
-
76
- <div class="action-links">
77
- <ul class="plugin-action-buttons">
78
-
79
- <?php
80
- if (
81
- current_user_can( 'install_plugins' ) ||
82
- current_user_can( 'update_plugins' )
83
- ) : ?>
84
-
85
- <li>
86
- <?php
87
- // Update Now - Installed and update is available.
88
- if (
89
- $is_extension_installed &&
90
- version_compare( $extension_version, $extension->_edd_sl_version, '<' )
91
- ) :
92
-
93
- $update_url = wp_nonce_url(
94
- self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $extension_path ),
95
- 'upgrade-plugin_' . $extension_path
96
- );
97
- ?>
98
-
99
- <a
100
- class="update-now button aria-button-if-js"
101
- data-plugin="<?php echo esc_attr( $extension_path ); ?>"
102
- data-slug="<?php echo esc_attr( $extension->slug ); ?>"
103
- href="<?php echo esc_url( $update_url ); ?>"
104
- aria-label="<?php printf( esc_attr__( 'Update %s now', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ); ?>"
105
- data-name="<?php esc_attr( $extension->title->rendered ); ?>">
106
- <?php esc_html_e( 'Update Now', 'backupwordpress' ); ?>
107
- </a>
108
-
109
- <?php
110
- // Active - Installed and activated, but no update.
111
- elseif ( $is_extension_installed && $is_extension_active ) : ?>
112
-
113
- <button
114
- type="button"
115
- class="button button-disabled"
116
- disabled="disabled">
117
- <?php echo esc_html_x( 'Active', 'Plugin status', 'backupwordpress' ); ?>
118
- </button>
119
-
120
- <?php
121
- // Activate - Installed, but not activated.
122
- elseif ( $is_extension_installed && ! $is_extension_active ) :
123
-
124
- $activate_url = add_query_arg( array(
125
- '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $extension_path ),
126
- 'action' => 'activate',
127
- 'plugin' => $extension_path,
128
- ), network_admin_url( 'plugins.php' ) );
129
-
130
- // TODO: Network Activate?
131
- ?>
132
-
133
- <a
134
- href="<?php echo esc_url( $activate_url ); ?>"
135
- class="button activate-now button-secondary"
136
- aria-label="<?php printf( esc_attr__( 'Activate %s', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ); ?>">
137
- <?php esc_html_e( 'Activate', 'backupwordpress' ); ?>
138
- </a>
139
-
140
- <?php
141
- // Buy Now - Not installed.
142
- else : ?>
143
-
144
- <a
145
- class="install-now button-primary"
146
- data-slug="<?php echo esc_attr( $extension->slug ); ?>"
147
- href="<?php echo esc_url( $extension->link ); ?>"
148
- aria-label="<?php printf( esc_attr__( 'Install %s now', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ); ?>
149
- data-name="<?php echo esc_attr( $extension->title->rendered ); ?>">
150
- <?php printf( esc_html__( 'Buy Now &#36;%s', 'backupwordpress' ), esc_html( $extension->edd_price ) ); ?>
151
- </a>
152
-
153
- <?php endif; ?>
154
- </li>
155
-
156
- <?php endif; ?>
157
-
158
- <li>
159
- <a
160
- href="<?php echo esc_url( $extension->link ); ?>"
161
- class="thickbox"
162
- aria-label="<?php printf( esc_attr__( 'More information about %s', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ) ; ?>"
163
- data-title="<?php echo esc_attr( $extension->title->rendered ); ?>">
164
- <?php esc_html_e( 'More Details', 'backupwordpress' ); ?>
165
- </a>
166
- </li>
167
- </ul>
168
- </div>
169
-
170
- <div class="desc column-description">
171
- <p><?php echo wp_kses_post( $extension->content->rendered ); ?></p>
172
- </div>
173
- </div>
174
-
175
- <?php
176
- $style = $first === true ? 'background-color:aliceblue;' : '';
177
- $first = false;
178
- ?>
179
-
180
- <div class="plugin-card-bottom" style="<?php echo esc_attr( $style ); ?>">
181
- <div class="vers column-rating">
182
- </div>
183
-
184
- <div class="column-updated">
185
- <?php printf(
186
- wp_kses(
187
- __( '<strong>Last Updated:</strong> %s ago', 'backupwordpress' ),
188
- array(
189
- 'strong' => array(),
190
- )
191
- ),
192
- esc_html( human_time_diff( strtotime( $extension->modified ) ) )
193
- ); ?>
194
- </div>
195
- </div>
196
- </div>
197
-
198
- <?php endforeach; ?>
199
- </div>
200
- </div>
201
- </div>
1
+ <?php
2
+ namespace HM\BackUpWordPress;
3
+ ?>
4
+
5
+ <div class="wrap">
6
+ <h1>
7
+ <a class="page-title-action" href="<?php echo esc_url( get_settings_url() ); ?>"><?php esc_html_e( '&larr; Backups', 'backupwordpress' ); ?></a>
8
+ <?php esc_html_e( 'BackUpWordPress Extensions', 'backupwordpress' ); ?>
9
+ </h1>
10
+
11
+ <div class="wp-filter">
12
+ <p><?php esc_html_e( 'Extend BackUpWordPress by installing extensions. Extensions allow you to pick and choose the exact features you need whilst also supporting us, the developers, so we can continue working on BackUpWordPress.', 'backupwordpress' ); ?></p>
13
+ </div>
14
+
15
+ <?php
16
+ $extensions_data = Extensions::get_instance()->get_edd_data();
17
+
18
+ // Sort by title.
19
+ usort( $extensions_data, function( $a, $b ) {
20
+ return strcmp( $b->title->rendered, $a->title->rendered );
21
+ });
22
+
23
+ /**
24
+ * Include is required for the usage of is_plugin_active()
25
+ * to identify if a plugin is currently activated.
26
+ * This info is further used to display a correct action button
27
+ * depending on plugin's state (i.e. Update Now, Activate, Active).
28
+ */
29
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
30
+
31
+ $installed_plugins = array();
32
+ foreach ( get_plugins() as $path => $plugin_info ) {
33
+ $installed_plugins[ strtolower( $plugin_info['Name'] ) ] = array(
34
+ 'version' => $plugin_info['Version'],
35
+ 'path' => $path,
36
+ 'is_active' => is_plugin_active( $path ),
37
+ );
38
+ }
39
+ ?>
40
+
41
+ <h3><?php esc_html_e( 'Remote Storage', 'backupwordpress' ); ?></h3>
42
+
43
+ <p><?php esc_html_e( 'It\'s important to store your backups somewhere other than on your site. Using the extensions below you can easily push your backups to one or more Cloud providers.', 'backupwordpress' ); ?></p>
44
+
45
+ <div class="wp-list-table widefat plugin-install">
46
+ <div id="the-list">
47
+
48
+ <?php $first = true; ?>
49
+
50
+ <?php foreach ( $extensions_data as $extension ) :
51
+
52
+ $extension_name_lowcase = strtolower( $extension->title->rendered );
53
+ $is_extension_installed = in_array( $extension_name_lowcase, array_keys( $installed_plugins ) );
54
+
55
+ $extension_version = $is_extension_installed ?
56
+ $installed_plugins[ $extension_name_lowcase ]['version'] : '';
57
+
58
+ $extension_path = $is_extension_installed ?
59
+ $installed_plugins[ $extension_name_lowcase ]['path'] : '';
60
+
61
+ $is_extension_active = $is_extension_installed ?
62
+ $installed_plugins[ $extension_name_lowcase ]['is_active'] : false;
63
+ ?>
64
+
65
+ <div class="plugin-card plugin-card-<?php echo esc_attr( $extension->slug ); ?>">
66
+ <div class="plugin-card-top">
67
+ <div class="name column-name">
68
+ <h3>
69
+ <a href="<?php echo esc_url( $extension->link ); ?>" class="thickbox">
70
+ <?php echo esc_html( $extension->title->rendered ); ?>
71
+ <img src="<?php echo esc_url( $extension->featured_image_url ); ?>" class="plugin-icon" alt="" />
72
+ </a>
73
+ </h3>
74
+ </div>
75
+
76
+ <div class="action-links">
77
+ <ul class="plugin-action-buttons">
78
+
79
+ <?php
80
+ if (
81
+ current_user_can( 'install_plugins' ) ||
82
+ current_user_can( 'update_plugins' )
83
+ ) : ?>
84
+
85
+ <li>
86
+ <?php
87
+ // Update Now - Installed and update is available.
88
+ if (
89
+ $is_extension_installed &&
90
+ version_compare( $extension_version, $extension->_edd_sl_version, '<' )
91
+ ) :
92
+
93
+ $update_url = wp_nonce_url(
94
+ self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $extension_path ),
95
+ 'upgrade-plugin_' . $extension_path
96
+ );
97
+ ?>
98
+
99
+ <a
100
+ class="update-now button aria-button-if-js"
101
+ data-plugin="<?php echo esc_attr( $extension_path ); ?>"
102
+ data-slug="<?php echo esc_attr( $extension->slug ); ?>"
103
+ href="<?php echo esc_url( $update_url ); ?>"
104
+ aria-label="<?php printf( esc_attr__( 'Update %s now', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ); ?>"
105
+ data-name="<?php esc_attr( $extension->title->rendered ); ?>">
106
+ <?php esc_html_e( 'Update Now', 'backupwordpress' ); ?>
107
+ </a>
108
+
109
+ <?php
110
+ // Active - Installed and activated, but no update.
111
+ elseif ( $is_extension_installed && $is_extension_active ) : ?>
112
+
113
+ <button
114
+ type="button"
115
+ class="button button-disabled"
116
+ disabled="disabled">
117
+ <?php echo esc_html_x( 'Active', 'Plugin status', 'backupwordpress' ); ?>
118
+ </button>
119
+
120
+ <?php
121
+ // Activate - Installed, but not activated.
122
+ elseif ( $is_extension_installed && ! $is_extension_active ) :
123
+
124
+ $activate_url = add_query_arg( array(
125
+ '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $extension_path ),
126
+ 'action' => 'activate',
127
+ 'plugin' => $extension_path,
128
+ ), network_admin_url( 'plugins.php' ) );
129
+
130
+ // TODO: Network Activate?
131
+ ?>
132
+
133
+ <a
134
+ href="<?php echo esc_url( $activate_url ); ?>"
135
+ class="button activate-now button-secondary"
136
+ aria-label="<?php printf( esc_attr__( 'Activate %s', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ); ?>">
137
+ <?php esc_html_e( 'Activate', 'backupwordpress' ); ?>
138
+ </a>
139
+
140
+ <?php
141
+ // Buy Now - Not installed.
142
+ else : ?>
143
+
144
+ <a
145
+ class="install-now button-primary"
146
+ data-slug="<?php echo esc_attr( $extension->slug ); ?>"
147
+ href="<?php echo esc_url( $extension->link ); ?>"
148
+ aria-label="<?php printf( esc_attr__( 'Install %s now', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ); ?>
149
+ data-name="<?php echo esc_attr( $extension->title->rendered ); ?>">
150
+ <?php printf( esc_html__( 'Buy Now &#36;%s', 'backupwordpress' ), esc_html( $extension->edd_price ) ); ?>
151
+ </a>
152
+
153
+ <?php endif; ?>
154
+ </li>
155
+
156
+ <?php endif; ?>
157
+
158
+ <li>
159
+ <a
160
+ href="<?php echo esc_url( $extension->link ); ?>"
161
+ class="thickbox"
162
+ aria-label="<?php printf( esc_attr__( 'More information about %s', 'backupwordpress' ), esc_attr( $extension->title->rendered ) ) ; ?>"
163
+ data-title="<?php echo esc_attr( $extension->title->rendered ); ?>">
164
+ <?php esc_html_e( 'More Details', 'backupwordpress' ); ?>
165
+ </a>
166
+ </li>
167
+ </ul>
168
+ </div>
169
+
170
+ <div class="desc column-description">
171
+ <p><?php echo wp_kses_post( $extension->content->rendered ); ?></p>
172
+ </div>
173
+ </div>
174
+
175
+ <?php
176
+ $style = $first === true ? 'background-color:aliceblue;' : '';
177
+ $first = false;
178
+ ?>
179
+
180
+ <div class="plugin-card-bottom" style="<?php echo esc_attr( $style ); ?>">
181
+ <div class="vers column-rating">
182
+ </div>
183
+
184
+ <div class="column-updated">
185
+ <?php printf(
186
+ wp_kses(
187
+ __( '<strong>Last Updated:</strong> %s ago', 'backupwordpress' ),
188
+ array(
189
+ 'strong' => array(),
190
+ )
191
+ ),
192
+ esc_html( human_time_diff( strtotime( $extension->modified ) ) )
193
+ ); ?>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ <?php endforeach; ?>
199
+ </div>
200
+ </div>
201
+ </div>
admin/faq.php CHANGED
@@ -1,58 +1,58 @@
1
- <?php
2
- echo '<p><strong>' . __( 'Where does BackUpWordPress store the backup files?', 'backupwordpress' ) . '</strong></p>' .
3
-
4
- '<p>' . __( 'Backups are stored on your server in <code>/wp-content/backups</code>, you can change the directory.', 'backupwordpress' ). '</p>' .
5
-
6
- '<p>' . __( 'Important: By default BackUpWordPress backs up everything in your site root as well as your database, this includes any non WordPress folders that happen to be in your site root. This does mean that your backup directory can get quite large.', 'backupwordpress' ) . '</p>' .
7
-
8
- '<p><strong>' . __( 'What if I want to back up my site to another destination?', 'backupwordpress' ) . '</strong></p>' .
9
-
10
- '<p>' . __( 'BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, Azure, DreamObjects and FTP/SFTP. Check it out here: <a href="http://bwp.hmn.md/?utm_source=wordpress-org&utm_medium=plugin-page&utm_campaign=freeplugin" title="BackUpWordPress Homepage" target="_blank">https://bwp.hmn.md</a>', 'backupwordpress' ) . '</p>' .
11
-
12
- '<p><strong>' . __( 'How do I restore my site from a backup?', 'backupwordpress' ) . '</strong></p>' .
13
-
14
- '<p>' . __( 'You need to download the latest backup file either by clicking download on the backups page or via <code>FTP</code>. <code>Unzip</code> the files and upload all the files to your server overwriting your site. You can then import the database using your hosts database management tool (likely <code>phpMyAdmin</code>).', 'backupwordpress' ) . '</p>' .
15
-
16
- '<p>' . __( 'See this guide for more details - <a href="https://bwp.hmn.md/support-center/restore-backup/" title="Go to support center" target="_blank">How to restore from backup</a>.', 'backupwordpress' ) . '</p>' .
17
-
18
- '<p><strong>' . __( 'Does BackUpWordPress back up the backups directory?', 'backupwordpress' ) . '</strong></p>' .
19
-
20
- '<p>' . __( 'No.', 'backupwordpress' ) . '</p>' .
21
-
22
- '<p><strong>' . __( 'I\'m not receiving my backups by email', 'backupwordpress' ) . '</strong></p>' .
23
-
24
- '<p>' . __( 'Most servers have a filesize limit on email attachments, it\'s generally about 10mb. If your backup file is over that limit, it won\'t be sent attached to the email. Instead, you should receive an email with a link to download the backup. If you aren\'t even receiving that, then you likely have a mail issue on your server that you\'ll need to contact your host about.', 'backupwordpress' ) . '</p>' .
25
-
26
- '<p><strong>' . __( 'How many backups are stored by default?', 'backupwordpress' ) . '</strong></p>' .
27
-
28
- '<p>' . __( 'BackUpWordPress stores the last 10 backups by default.', 'backupwordpress' ) . '</p>' .
29
-
30
- '<p><strong>' . __( 'How long should a backup take?', 'backupwordpress' ) . '</strong></p>' .
31
-
32
- '<p>' . __( 'Unless your site is very large (many gigabytes) it should only take a few minutes to perform a backup. If your back up has been running for longer than an hour, it\'s safe to assume that something has gone wrong. Try de-activating and re-activating the plugin. If it keeps happening, contact support.', 'backupwordpress' ) . '</p>' .
33
-
34
- '<p><strong>' . __( 'What do I do if I get the wp-cron error message?', 'backupwordpress' ) . '</strong></p>' .
35
-
36
- '<p>' . __( 'The issue is that your <code>wp-cron.php</code> is not returning a <code>200</code> response when hit with a HTTP request originating from your own server, it could be several things. In most cases, it\'s an issue with the server / site.', 'backupwordpress' ) . '</p>' .
37
-
38
- '<p>' . __( 'There are some things you can test to confirm this is the issue.', 'backupwordpress' ) . '</p>' .
39
-
40
- '<ul><li>' . __( 'Are scheduled posts working? (They use wp-cron as well.)', 'backupwordpress' ) . '</li>' .
41
-
42
- '<li>' . __( 'Are you hosted on Heart Internet? (wp-cron may not be supported by Heart Internet, see below for work-around.)', 'backupwordpress' ) . '</li>' .
43
-
44
- '<li>' . __( 'If you click manual backup, does it work?', 'backupwordpress' ) . '</li>' .
45
-
46
- '<li>' . __( 'Try adding <code>define( \'ALTERNATE_WP_CRON\', true );</code> to your <code>wp-config.php</code>. Do automatic backups work?', 'backupwordpress' ) . '</li>' .
47
-
48
- '<li>' . __( 'Is your site private (i.e. is it behind some kind of authentication, maintenance plugin, .htaccess)? If so, wp-cron won\'t work until you remove it. If you are and you temporarily remove the authentication, do backups start working?', 'backupwordpress' ) . '</li></ul>' .
49
-
50
- '<p>' . __( 'Report the results to our support team for further help. To do this, either enable support from your Admin Dashboard (recommended), or email backupwordpress@hmn.md', 'backupwordpress' ) . '</p>' .
51
-
52
- '<p><strong>' . __( 'How to get BackUpWordPress working in Heart Internet', 'backupwordpress' ) . '</strong></p>' .
53
-
54
- '<p>' . __( 'The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the space between php5 and the location of the file). The file <code>wp-cron.php</code> <code>chmod</code> must be set to <code>711</code>.', 'backupwordpress' ) . '</p>' .
55
-
56
- '<p><strong>' . __( 'My backups seem to be failing?', 'backupwordpress' ) . '</strong></p>' .
57
-
58
- '<p>' . __( 'If your backups are failing, it\'s commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it\'s probably a server issue. If it does not succeed, report the results to our support team for further help. You can contact support by enabling support from your Admin Dashboard (recommended), or emailing backupwordpress@hmn.md', 'backupwordpress' ) . '</p>';
1
+ <?php
2
+ echo '<p><strong>' . __( 'Where does BackUpWordPress store the backup files?', 'backupwordpress' ) . '</strong></p>' .
3
+
4
+ '<p>' . __( 'Backups are stored on your server in <code>/wp-content/backups</code>, you can change the directory.', 'backupwordpress' ). '</p>' .
5
+
6
+ '<p>' . __( 'Important: By default BackUpWordPress backs up everything in your site root as well as your database, this includes any non WordPress folders that happen to be in your site root. This does mean that your backup directory can get quite large.', 'backupwordpress' ) . '</p>' .
7
+
8
+ '<p><strong>' . __( 'What if I want to back up my site to another destination?', 'backupwordpress' ) . '</strong></p>' .
9
+
10
+ '<p>' . __( 'We no longer sell or support the paid add-ons (e.g. for backups to Dropbox and Google Drive). It\'s certainly a good idea to backup to cloud storage to protect against server-wide risks. For this we recommend <a href="https://updraftplus.com/?afref=744" title="UpdraftPlus WordPress Backups" target="_blank">UpdraftPlus WordPress Backups</a> which can do things for free BackupWordPress Premium could do on a paid basis. Click here for <a href="https://updraftplus.com/backupwordpress/?afref=744" title="plugin comparison" target="_blank">full comparison</a>.', 'backupwordpress' ) . '</p>' .
11
+
12
+ '<p><strong>' . __( 'How do I restore my site from a backup?', 'backupwordpress' ) . '</strong></p>' .
13
+
14
+ '<p>' . __( 'You need to download the latest backup file either by clicking download on the backups page or via <code>FTP</code>. <code>Unzip</code> the files and upload all the files to your server overwriting your site. You can then import the database using your hosts database management tool (likely <code>phpMyAdmin</code>).', 'backupwordpress' ) . '</p>' .
15
+
16
+ '<p>' . __( 'See this guide for more details - <a href="https://bwp.hmn.md/support-center/restore-backup/" title="Go to support center" target="_blank">How to restore from backup</a>.', 'backupwordpress' ) . '</p>' .
17
+
18
+ '<p><strong>' . __( 'Does BackUpWordPress back up the backups directory?', 'backupwordpress' ) . '</strong></p>' .
19
+
20
+ '<p>' . __( 'No.', 'backupwordpress' ) . '</p>' .
21
+
22
+ '<p><strong>' . __( 'I\'m not receiving my backups by email', 'backupwordpress' ) . '</strong></p>' .
23
+
24
+ '<p>' . __( 'Most servers have a filesize limit on email attachments, it\'s generally about 10mb. If your backup file is over that limit, it won\'t be sent attached to the email. Instead, you should receive an email with a link to download the backup. If you aren\'t even receiving that, then you likely have a mail issue on your server that you\'ll need to contact your host about.', 'backupwordpress' ) . '</p>' .
25
+
26
+ '<p><strong>' . __( 'How many backups are stored by default?', 'backupwordpress' ) . '</strong></p>' .
27
+
28
+ '<p>' . __( 'BackUpWordPress stores the last 10 backups by default.', 'backupwordpress' ) . '</p>' .
29
+
30
+ '<p><strong>' . __( 'How long should a backup take?', 'backupwordpress' ) . '</strong></p>' .
31
+
32
+ '<p>' . __( 'Unless your site is very large (many gigabytes) it should only take a few minutes to perform a backup. If your back up has been running for longer than an hour, it\'s safe to assume that something has gone wrong. Try de-activating and re-activating the plugin. If it keeps happening, contact support.', 'backupwordpress' ) . '</p>' .
33
+
34
+ '<p><strong>' . __( 'What do I do if I get the wp-cron error message?', 'backupwordpress' ) . '</strong></p>' .
35
+
36
+ '<p>' . __( 'The issue is that your <code>wp-cron.php</code> is not returning a <code>200</code> response when hit with a HTTP request originating from your own server, it could be several things. In most cases, it\'s an issue with the server / site.', 'backupwordpress' ) . '</p>' .
37
+
38
+ '<p>' . __( 'There are some things you can test to confirm this is the issue.', 'backupwordpress' ) . '</p>' .
39
+
40
+ '<ul><li>' . __( 'Are scheduled posts working? (They use wp-cron as well.)', 'backupwordpress' ) . '</li>' .
41
+
42
+ '<li>' . __( 'Are you hosted on Heart Internet? (wp-cron may not be supported by Heart Internet, see below for work-around.)', 'backupwordpress' ) . '</li>' .
43
+
44
+ '<li>' . __( 'If you click manual backup, does it work?', 'backupwordpress' ) . '</li>' .
45
+
46
+ '<li>' . __( 'Try adding <code>define( \'ALTERNATE_WP_CRON\', true );</code> to your <code>wp-config.php</code>. Do automatic backups work?', 'backupwordpress' ) . '</li>' .
47
+
48
+ '<li>' . __( 'Is your site private (i.e. is it behind some kind of authentication, maintenance plugin, .htaccess)? If so, wp-cron won\'t work until you remove it. If you are and you temporarily remove the authentication, do backups start working?', 'backupwordpress' ) . '</li></ul>' .
49
+
50
+ '<p>' . __( 'Report the results to our support team for further help. To do this, email support@xibomarketing.com', 'backupwordpress' ) . '</p>' .
51
+
52
+ '<p><strong>' . __( 'How to get BackUpWordPress working in Heart Internet', 'backupwordpress' ) . '</strong></p>' .
53
+
54
+ '<p>' . __( 'The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the space between php5 and the location of the file). The file <code>wp-cron.php</code> <code>chmod</code> must be set to <code>711</code>.', 'backupwordpress' ) . '</p>' .
55
+
56
+ '<p><strong>' . __( 'My backups seem to be failing?', 'backupwordpress' ) . '</strong></p>' .
57
+
58
+ '<p>' . __( 'If your backups are failing, it\'s commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it\'s probably a server issue. If it does not succeed, report the results to our support team for further help. You can contact support by emailing support@xibomarketing.com', 'backupwordpress' ) . '</p>';
admin/filesystem-credentials.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
-
3
- $_POST['action'] = 'hmbkp_request_credentials';
4
- $extra_fields = array( 'action' );
5
-
6
- if ( ! isset( $_GET['creation_error'] ) ) {
7
- request_filesystem_credentials( admin_url( 'admin-post.php' ), '', isset( $_GET['connection_error'] ), false, $extra_fields );
8
- }
1
+ <?php
2
+
3
+ $_POST['action'] = 'hmbkp_request_credentials';
4
+ $extra_fields = array( 'action' );
5
+
6
+ if ( ! isset( $_GET['creation_error'] ) ) {
7
+ request_filesystem_credentials( admin_url( 'admin-post.php' ), '', isset( $_GET['connection_error'] ), false, $extra_fields );
8
+ }
admin/menu.php CHANGED
@@ -1,138 +1,138 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Add the backups menu item
7
- * to the tools menu
8
- */
9
- function admin_menu() {
10
-
11
- if ( is_multisite() ) {
12
- add_submenu_page( 'settings.php', __( 'Manage Backups | BackUpWordPress', 'backupwordpress' ), __( 'Backups', 'backupwordpress' ), ( defined( 'HMBKP_CAPABILITY' ) && HMBKP_CAPABILITY ) ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG, 'HM\BackUpWordPress\manage_backups' );
13
- } else {
14
- add_management_page( __( 'Manage Backups', 'backupwordpress' ), __( 'Backups', 'backupwordpress' ), ( defined( 'HMBKP_CAPABILITY' ) && HMBKP_CAPABILITY ) ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG, 'HM\BackUpWordPress\manage_backups' );
15
- }
16
-
17
- add_submenu_page( null, __( 'BackUpWordPress Extensions', 'backupwordpress' ), __( 'Extensions', 'backupwordpress' ), ( defined( 'HMBKP_CAPABILITY' ) && HMBKP_CAPABILITY ) ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG . '_extensions', 'HM\BackUpWordPress\extensions' );
18
-
19
- }
20
- add_action( 'network_admin_menu', 'HM\BackUpWordPress\admin_menu' );
21
- add_action( 'admin_menu', 'HM\BackUpWordPress\admin_menu' );
22
-
23
- /**
24
- * Load the backups admin page
25
- * when the menu option is clicked
26
- *
27
- * @return null
28
- */
29
- function manage_backups() {
30
- require_once( HMBKP_PLUGIN_PATH . 'admin/page.php' );
31
- }
32
-
33
-
34
- /**
35
- * Load the backups admin page
36
- * when the menu option is clicked
37
- *
38
- * @return null
39
- */
40
- function extensions() {
41
- require_once( HMBKP_PLUGIN_PATH . 'admin/extensions.php' );
42
- }
43
-
44
- /**
45
- * Highlights the 'Backups' submenu item when on the Extensions page
46
- *
47
- * @param string $submenu_file
48
- * @return string $submenu_file The slug of the menu item to highlight
49
- */
50
- function highlight_submenu( $submenu_file ) {
51
-
52
- $screen = get_current_screen();
53
-
54
- if ( 'tools_page_' . HMBKP_PLUGIN_SLUG . '_extensions' === $screen->id ) {
55
-
56
- // Set the main plugin page to be the active submenu page
57
- $submenu_file = HMBKP_PLUGIN_SLUG;
58
-
59
- }
60
-
61
- return $submenu_file;
62
-
63
- }
64
- add_filter( 'submenu_file', 'HM\BackUpWordPress\highlight_submenu' );
65
-
66
- /**
67
- * Add a link to the backups page to the plugin action links.
68
- *
69
- * @param array $links
70
- * @param string $file
71
- *
72
- * @return array $links
73
- */
74
- function plugin_action_link( $links, $file ) {
75
-
76
- if ( false !== strpos( $file, HMBKP_PLUGIN_SLUG ) ) {
77
- array_push( $links, '<a href="' . esc_url( HMBKP_ADMIN_URL ) . '">' . __( 'Backups', 'backupwordpress' ) . '</a>' );
78
- }
79
-
80
- return $links;
81
-
82
- }
83
- add_filter( 'plugin_action_links', 'HM\BackUpWordPress\plugin_action_link', 10, 2 );
84
-
85
- /**
86
- * Add Contextual Help to Backups tools page.
87
- *
88
- * Help is pulled from the readme FAQ.
89
- *
90
- * @return null
91
- */
92
- function contextual_help() {
93
-
94
- // Pre WordPress 3.3 compat
95
- if ( ! method_exists( get_current_screen(), 'add_help_tab' ) ) {
96
- return;
97
- }
98
-
99
- ob_start();
100
- require_once( HMBKP_PLUGIN_PATH . 'admin/constants.php' );
101
- $constants = ob_get_clean();
102
-
103
- ob_start();
104
- include_once( HMBKP_PLUGIN_PATH . 'admin/faq.php' );
105
- $faq = ob_get_clean();
106
-
107
- get_current_screen()->add_help_tab( array(
108
- 'title' => __( 'FAQ', 'backupwordpress' ),
109
- 'id' => 'hmbkp_faq',
110
- 'content' => wp_kses_post( $faq ),
111
- ) );
112
-
113
- get_current_screen()->add_help_tab( array(
114
- 'title' => __( 'Constants', 'backupwordpress' ),
115
- 'id' => 'hmbkp_constants',
116
- 'content' => wp_kses_post( $constants ),
117
- ) );
118
-
119
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-requirements.php' );
120
-
121
- ob_start();
122
- require_once( HMBKP_PLUGIN_PATH . 'admin/server-info.php' );
123
- $info = ob_get_clean();
124
-
125
- get_current_screen()->add_help_tab(
126
- array(
127
- 'title' => __( 'Server Info', 'backupwordpress' ),
128
- 'id' => 'hmbkp_server',
129
- 'content' => $info,
130
- )
131
- );
132
-
133
- get_current_screen()->set_help_sidebar(
134
- '<p><strong>' . esc_html__( 'For more information:', 'backupwordpress' ) . '</strong></p><p><a href="https://github.com/humanmade/backupwordpress" target="_blank">GitHub</a></p><p><a href="http://wordpress.org/tags/backupwordpress?forum_id=10" target="_blank">' . esc_html__( 'Support Forums', 'backupwordpress' ) . '</a></p><p><a href="https://translate.wordpress.org/projects/wp-plugins/backupwordpress/dev/" target="_blank">' . esc_html__( 'Help with translation', 'backupwordpress' ) . '</a></p>'
135
- );
136
-
137
- }
138
- add_action( 'load-' . HMBKP_ADMIN_PAGE, 'HM\BackUpWordPress\contextual_help' );
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Add the backups menu item
7
+ * to the tools menu
8
+ */
9
+ function admin_menu() {
10
+
11
+ if ( is_multisite() ) {
12
+ add_submenu_page( 'settings.php', __( 'Manage Backups | BackUpWordPress', 'backupwordpress' ), __( 'Backups', 'backupwordpress' ), ( defined( 'HMBKP_CAPABILITY' ) && HMBKP_CAPABILITY ) ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG, 'HM\BackUpWordPress\manage_backups' );
13
+ } else {
14
+ add_management_page( __( 'Manage Backups', 'backupwordpress' ), __( 'Backups', 'backupwordpress' ), ( defined( 'HMBKP_CAPABILITY' ) && HMBKP_CAPABILITY ) ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG, 'HM\BackUpWordPress\manage_backups' );
15
+ }
16
+
17
+ add_submenu_page( null, __( 'BackUpWordPress Extensions', 'backupwordpress' ), __( 'Extensions', 'backupwordpress' ), ( defined( 'HMBKP_CAPABILITY' ) && HMBKP_CAPABILITY ) ? HMBKP_CAPABILITY : 'manage_options', HMBKP_PLUGIN_SLUG . '_extensions', 'HM\BackUpWordPress\extensions' );
18
+
19
+ }
20
+ add_action( 'network_admin_menu', 'HM\BackUpWordPress\admin_menu' );
21
+ add_action( 'admin_menu', 'HM\BackUpWordPress\admin_menu' );
22
+
23
+ /**
24
+ * Load the backups admin page
25
+ * when the menu option is clicked
26
+ *
27
+ * @return null
28
+ */
29
+ function manage_backups() {
30
+ require_once( HMBKP_PLUGIN_PATH . 'admin/page.php' );
31
+ }
32
+
33
+
34
+ /**
35
+ * Load the backups admin page
36
+ * when the menu option is clicked
37
+ *
38
+ * @return null
39
+ */
40
+ function extensions() {
41
+ require_once( HMBKP_PLUGIN_PATH . 'admin/extensions.php' );
42
+ }
43
+
44
+ /**
45
+ * Highlights the 'Backups' submenu item when on the Extensions page
46
+ *
47
+ * @param string $submenu_file
48
+ * @return string $submenu_file The slug of the menu item to highlight
49
+ */
50
+ function highlight_submenu( $submenu_file ) {
51
+
52
+ $screen = get_current_screen();
53
+
54
+ if ( 'tools_page_' . HMBKP_PLUGIN_SLUG . '_extensions' === $screen->id ) {
55
+
56
+ // Set the main plugin page to be the active submenu page
57
+ $submenu_file = HMBKP_PLUGIN_SLUG;
58
+
59
+ }
60
+
61
+ return $submenu_file;
62
+
63
+ }
64
+ add_filter( 'submenu_file', 'HM\BackUpWordPress\highlight_submenu' );
65
+
66
+ /**
67
+ * Add a link to the backups page to the plugin action links.
68
+ *
69
+ * @param array $links
70
+ * @param string $file
71
+ *
72
+ * @return array $links
73
+ */
74
+ function plugin_action_link( $links, $file ) {
75
+
76
+ if ( false !== strpos( $file, HMBKP_PLUGIN_SLUG ) ) {
77
+ array_push( $links, '<a href="' . esc_url( HMBKP_ADMIN_URL ) . '">' . __( 'Backups', 'backupwordpress' ) . '</a>' );
78
+ }
79
+
80
+ return $links;
81
+
82
+ }
83
+ add_filter( 'plugin_action_links', 'HM\BackUpWordPress\plugin_action_link', 10, 2 );
84
+
85
+ /**
86
+ * Add Contextual Help to Backups tools page.
87
+ *
88
+ * Help is pulled from the readme FAQ.
89
+ *
90
+ * @return null
91
+ */
92
+ function contextual_help() {
93
+
94
+ // Pre WordPress 3.3 compat
95
+ if ( ! method_exists( get_current_screen(), 'add_help_tab' ) ) {
96
+ return;
97
+ }
98
+
99
+ ob_start();
100
+ require_once( HMBKP_PLUGIN_PATH . 'admin/constants.php' );
101
+ $constants = ob_get_clean();
102
+
103
+ ob_start();
104
+ include_once( HMBKP_PLUGIN_PATH . 'admin/faq.php' );
105
+ $faq = ob_get_clean();
106
+
107
+ get_current_screen()->add_help_tab( array(
108
+ 'title' => __( 'FAQ', 'backupwordpress' ),
109
+ 'id' => 'hmbkp_faq',
110
+ 'content' => wp_kses_post( $faq ),
111
+ ) );
112
+
113
+ get_current_screen()->add_help_tab( array(
114
+ 'title' => __( 'Constants', 'backupwordpress' ),
115
+ 'id' => 'hmbkp_constants',
116
+ 'content' => wp_kses_post( $constants ),
117
+ ) );
118
+
119
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-requirements.php' );
120
+
121
+ ob_start();
122
+ require_once( HMBKP_PLUGIN_PATH . 'admin/server-info.php' );
123
+ $info = ob_get_clean();
124
+
125
+ get_current_screen()->add_help_tab(
126
+ array(
127
+ 'title' => __( 'Server Info', 'backupwordpress' ),
128
+ 'id' => 'hmbkp_server',
129
+ 'content' => $info,
130
+ )
131
+ );
132
+
133
+ get_current_screen()->set_help_sidebar(
134
+ '<p><strong>' . esc_html__( 'For more information:', 'backupwordpress' ) . '</strong></p><p><a href="https://github.com/humanmade/backupwordpress" target="_blank">GitHub</a></p><p><a href="http://wordpress.org/tags/backupwordpress?forum_id=10" target="_blank">' . esc_html__( 'Support Forums', 'backupwordpress' ) . '</a></p><p><a href="https://translate.wordpress.org/projects/wp-plugins/backupwordpress/dev/" target="_blank">' . esc_html__( 'Help with translation', 'backupwordpress' ) . '</a></p>'
135
+ );
136
+
137
+ }
138
+ add_action( 'load-' . HMBKP_ADMIN_PAGE, 'HM\BackUpWordPress\contextual_help' );
admin/page.php CHANGED
@@ -1,40 +1,27 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- ?>
6
-
7
- <div class="wrap">
8
-
9
- <h1>
10
-
11
- BackUpWordPress
12
-
13
- <a class="page-title-action" href="https://bwp.hmn.md/" target="_blank">Extensions</a>
14
-
15
- <?php if ( get_option( 'hmbkp_enable_support' ) ) : ?>
16
-
17
- <a id="intercom" class="page-title-action" href="mailto:backupwordpress@hmn.md"><?php _e( 'Support', 'backupwordpress' ); ?></a>
18
-
19
- <?php else :
20
-
21
- add_thickbox(); ?>
22
- <a id="intercom-info" class="thickbox page-title-action" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'load_enable_support', 'width' => '600', 'height' => '420' ), self_admin_url( 'admin-ajax.php' ) ), 'hmbkp_nonce' ) ); ?>"><span class="dashicons dashicons-admin-users"></span>&nbsp;<?php _e( 'Enable Support', 'backupwordpress' ); ?></a>
23
-
24
- <?php endif; ?>
25
-
26
- </h1>
27
-
28
- <?php if ( has_server_permissions() ) : ?>
29
-
30
- <?php include_once( HMBKP_PLUGIN_PATH . 'admin/backups.php' ); ?>
31
-
32
- <?php include_once( HMBKP_PLUGIN_PATH . 'admin/upsell.php' ); ?>
33
-
34
- <?php else : ?>
35
-
36
- <?php include_once( HMBKP_PLUGIN_PATH . 'admin/filesystem-credentials.php' ); ?>
37
-
38
- <?php endif; ?>
39
-
40
- </div>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ ?>
6
+
7
+ <div class="wrap">
8
+
9
+ <h1>
10
+
11
+ BackUpWordPress
12
+
13
+ </h1>
14
+
15
+ <?php if ( has_server_permissions() ) : ?>
16
+
17
+ <?php include_once( HMBKP_PLUGIN_PATH . 'admin/backups.php' ); ?>
18
+
19
+ <?php include_once( HMBKP_PLUGIN_PATH . 'admin/upsell.php' ); ?>
20
+
21
+ <?php else : ?>
22
+
23
+ <?php include_once( HMBKP_PLUGIN_PATH . 'admin/filesystem-credentials.php' ); ?>
24
+
25
+ <?php endif; ?>
26
+
27
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/schedule-form-excludes.php CHANGED
@@ -1,426 +1,426 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- $excludes = $schedule->get_excludes();
6
- $user_excludes = $excludes->get_user_excludes(); ?>
7
-
8
- <div class="hmbkp-exclude-settings">
9
-
10
- <h3>
11
- <?php esc_html_e( 'Currently Excluded', 'backupwordpress' ); ?>
12
- </h3>
13
-
14
- <p>
15
- <?php esc_html_e( 'We automatically detect and ignore common Version Control Systems folders and other backup plugin folders.', 'backupwordpress' ); ?>
16
- </p>
17
-
18
- <table class="widefat">
19
-
20
- <tbody>
21
-
22
- <?php foreach ( $user_excludes as $key => $exclude ) :
23
-
24
- $exclude_path = new \SplFileInfo( trailingslashit( Path::get_root() ) . ltrim( str_ireplace( Path::get_root(), '', $exclude ), '/' ) ); ?>
25
-
26
- <tr>
27
-
28
- <th scope="row">
29
-
30
- <?php if ( $exclude_path->isFile() ) : ?>
31
-
32
- <div class="dashicons dashicons-media-default"></div>
33
-
34
- <?php elseif ( $exclude_path->isDir() ) : ?>
35
-
36
- <div class="dashicons dashicons-portfolio"></div>
37
-
38
- <?php endif; ?>
39
-
40
- </th>
41
-
42
- <td>
43
-
44
- <code><?php echo esc_html( str_ireplace( Path::get_root(), '', $exclude ) ); ?></code>
45
-
46
- </td>
47
-
48
- <td>
49
-
50
- <?php if (
51
- ( in_array( $exclude, $excludes->get_default_excludes() ) ) ||
52
- ( Path::get_path() === trailingslashit( Path::get_root() ) . untrailingslashit( $exclude ) )
53
- ) : ?>
54
-
55
- <?php esc_html_e( 'Default rule', 'backupwordpress' ); ?>
56
-
57
- <?php elseif ( defined( 'HMBKP_EXCLUDE' ) && false !== strpos( HMBKP_EXCLUDE, $exclude ) ) : ?>
58
-
59
- <?php printf( esc_html__( 'Defined in %s', 'backupwordpress' ), 'wp-config.php' ); ?>
60
-
61
- <?php else : ?>
62
-
63
- <a href="<?php echo admin_action_url( 'remove_exclude_rule', array(
64
- 'hmbkp_remove_exclude' => $exclude,
65
- 'hmbkp_schedule_id' => $schedule->get_id(),
66
- ) ); ?>" class="delete-action">
67
- <?php esc_html_e( 'Stop excluding', 'backupwordpress' ); ?>
68
- </a>
69
-
70
- <?php endif; ?>
71
-
72
- </td>
73
-
74
- </tr>
75
-
76
- <?php endforeach; ?>
77
-
78
- </tbody>
79
-
80
- </table>
81
-
82
- <h3 id="directory-listing">
83
- <?php esc_html_e( 'Your Site', 'backupwordpress' ); ?>
84
- </h3>
85
-
86
- <p>
87
- <?php esc_html_e( 'Here\'s a directory listing of all files on your site, you can browse through and exclude files or folders that you don\'t want included in your backup.', 'backupwordpress' ); ?>
88
- </p>
89
-
90
- <?php
91
-
92
- // The directory to display.
93
- $directory = Path::get_root();
94
-
95
- if ( isset( $_GET['hmbkp_directory_browse'] ) ) {
96
-
97
- $untrusted_directory = urldecode( $_GET['hmbkp_directory_browse'] );
98
-
99
- // Only allow real sub-directories of the site root to be browsed.
100
- if (
101
- false !== strpos( $untrusted_directory, Path::get_root() ) &&
102
- is_dir( $untrusted_directory )
103
- ) {
104
- $directory = $untrusted_directory;
105
- }
106
- }
107
-
108
- $site_size = new Site_Size( 'file' );
109
- $excluded_site_size = new Site_Size( 'file', $excludes );
110
-
111
- // Kick off a recursive filesize scan.
112
- $files = list_directory_by_total_filesize( $directory, $excludes );
113
- ?>
114
-
115
- <table class="widefat">
116
-
117
- <thead>
118
-
119
- <tr>
120
- <th></th>
121
- <th scope="col"><?php esc_html_e( 'Name', 'backupwordpress' ); ?></th>
122
- <th scope="col" class="column-format"><?php esc_html_e( 'Included Size', 'backupwordpress' ); ?></th>
123
- <th scope="col" class="column-format"><?php esc_html_e( 'Permissions', 'backupwordpress' ); ?></th>
124
- <th scope="col" class="column-format"><?php esc_html_e( 'Type', 'backupwordpress' ); ?></th>
125
- <th scope="col" class="column-format"><?php esc_html_e( 'Status', 'backupwordpress' ); ?></th>
126
- </tr>
127
-
128
- <tr>
129
-
130
- <th scope="row">
131
- <div class="dashicons dashicons-admin-home"></div>
132
- </th>
133
-
134
- <th scope="col">
135
-
136
- <?php if ( Path::get_root() !== $directory ) : ?>
137
-
138
- <a href="<?php echo esc_url( remove_query_arg( 'hmbkp_directory_browse' ) ); ?>">
139
- <?php echo esc_html( Path::get_root() ); ?>
140
- </a>
141
- <code>/</code>
142
-
143
- <?php
144
- $parents = array_filter( explode(
145
- '/',
146
- str_replace( trailingslashit( Path::get_root() ), '', trailingslashit( dirname( $directory ) ) )
147
- ) );
148
-
149
- foreach ( $parents as $directory_basename ) : ?>
150
-
151
- <a href="<?php echo esc_url( add_query_arg( 'hmbkp_directory_browse', urlencode( substr( $directory, 0, strpos( $directory, $directory_basename ) ) . $directory_basename ) ) ); ?>">
152
- <?php echo esc_html( $directory_basename ); ?>
153
- </a>
154
- <code>/</code>
155
-
156
- <?php endforeach; ?>
157
-
158
- <?php echo esc_html( basename( $directory ) ); ?>
159
-
160
- <?php else : ?>
161
-
162
- <?php echo esc_html( Path::get_root() ); ?>
163
-
164
- <?php endif; ?>
165
-
166
- </th>
167
-
168
- <td class="column-filesize">
169
-
170
- <?php if ( Site_Size::is_site_size_being_calculated() ) : ?>
171
-
172
- <span class="spinner is-active"></span>
173
-
174
- <?php else :
175
-
176
- $root = new \SplFileInfo( Path::get_root() );
177
- $size = $site_size->filesize( $root );
178
- $excluded_size = $excluded_site_size->filesize( $root );
179
- $excluded_size = is_same_size_format( $size, $excluded_size ) ? (int) size_format( $excluded_size ) : size_format( $excluded_size );
180
- ?>
181
-
182
- <code>
183
- <?php
184
- /* translators: 1: Excluded size 2: Overall site size */
185
- printf(
186
- esc_html__( '%1$s of %2$s', 'backupwordpress' ),
187
- $excluded_size,
188
- size_format( $size )
189
- );
190
- ?>
191
-
192
- <a class="dashicons dashicons-update" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'hmbkp_recalculate_directory_filesize', urlencode( Path::get_root() ) ), 'hmbkp-recalculate_directory_filesize' ) ); ?>">
193
- <span><?php esc_html_e( 'Refresh', 'backupwordpress' ); ?></span>
194
- </a>
195
- </code>
196
-
197
- <?php endif; ?>
198
-
199
- <td>
200
- <code><?php echo esc_html( substr( sprintf( '%o', fileperms( Path::get_root() ) ), - 4 ) ); ?></code>
201
- </td>
202
-
203
- <td>
204
-
205
- <code>
206
-
207
- <?php if ( is_link( Path::get_root() ) ) :
208
- esc_html_e( 'Symlink', 'backupwordpress' );
209
- elseif ( is_dir( Path::get_root() ) ) :
210
- esc_html_e( 'Folder', 'backupwordpress' );
211
- endif; ?>
212
-
213
- </code>
214
-
215
- </td>
216
-
217
- <td></td>
218
-
219
- </tr>
220
-
221
- </thead>
222
-
223
- <tbody>
224
-
225
- <?php if ( $files ) :
226
-
227
- foreach ( $files as $size => $file ) :
228
-
229
- $is_excluded = $is_unreadable = false;
230
-
231
- // Check if the file is excluded.
232
- if ( $excludes->is_file_excluded( $file ) ) :
233
- $is_excluded = true;
234
- endif;
235
-
236
- // Skip unreadable files.
237
- if ( ! @realpath( $file->getPathname() ) || ! $file->isReadable() ) :
238
- $is_unreadable = true;
239
- endif;
240
- ?>
241
-
242
- <tr>
243
-
244
- <td>
245
-
246
- <?php if ( $is_unreadable ) : ?>
247
-
248
- <div class="dashicons dashicons-dismiss"></div>
249
-
250
- <?php elseif ( $file->isFile() ) : ?>
251
-
252
- <div class="dashicons dashicons-media-default"></div>
253
-
254
- <?php elseif ( $file->isDir() ) : ?>
255
-
256
- <div class="dashicons dashicons-portfolio"></div>
257
-
258
- <?php endif; ?>
259
-
260
- </td>
261
-
262
- <td>
263
-
264
- <?php if ( $is_unreadable ) : ?>
265
-
266
- <code class="strikethrough" title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
267
- <?php echo esc_html( $file->getBasename() ); ?>
268
- </code>
269
-
270
- <?php elseif ( $file->isFile() ) : ?>
271
-
272
- <code title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
273
- <?php echo esc_html( $file->getBasename() ); ?>
274
- </code>
275
-
276
- <?php elseif ( $file->isDir() ) : ?>
277
-
278
- <code title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
279
- <a href="<?php echo esc_url( add_query_arg( 'hmbkp_directory_browse', urlencode( wp_normalize_path( $file->getPathname() ) ) ) ); ?>">
280
- <?php echo esc_html( $file->getBasename() ); ?>
281
- </a>
282
- </code>
283
-
284
- <?php endif; ?>
285
-
286
- </td>
287
-
288
- <td class="column-format column-filesize">
289
-
290
- <?php if ( $file->isDir() && Site_Size::is_site_size_being_calculated() ) : ?>
291
- <span class="spinner is-active"></span>
292
- <?php else :
293
- $size = $site_size->filesize( $file );
294
-
295
- if ( false !== $size ) :
296
-
297
- $size = $size;
298
- $excluded_size = $excluded_site_size->filesize( $file ); ?>
299
-
300
- <code>
301
-
302
- <?php
303
- // Display `included of total size` info for directories and excluded files only.
304
- if ( $file->isDir() || ( $file->isFile() && $is_excluded ) ) :
305
-
306
- if ( $excluded_size ) {
307
- $excluded_size = is_same_size_format( $size, $excluded_size ) ? (int) size_format( $excluded_size ) : size_format( $excluded_size );
308
- }
309
-
310
- if ( $size ) {
311
- $size = size_format( $size );
312
- }
313
-
314
- /* translators: 1: Excluded size 2: Overall directory/file size */
315
- printf(
316
- esc_html__( '%1$s of %2$s', 'backupwordpress' ),
317
- $excluded_size,
318
- $size
319
- );
320
-
321
- elseif ( ! $is_unreadable ) :
322
- echo esc_html( size_format( $size ) );
323
- else :
324
- echo '-';
325
- endif; ?>
326
-
327
- </code>
328
-
329
- <?php else : ?>
330
-
331
- <code>--</code>
332
-
333
- <?php endif;
334
- endif;
335
- ?>
336
-
337
- </td>
338
-
339
- <td>
340
- <code>
341
- <?php if ( ! $is_unreadable ) :
342
- echo esc_html( substr( sprintf( '%o', $file->getPerms() ), - 4 ) );
343
- else :
344
- echo '-';
345
- endif; ?>
346
- </code>
347
- </td>
348
-
349
- <td>
350
- <code>
351
- <?php if ( $file->isLink() ) : ?>
352
- <span title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
353
- <?php esc_html_e( 'Symlink', 'backupwordpress' ); ?>
354
- </span>
355
- <?php elseif ( $file->isDir() ) :
356
- esc_html_e( 'Folder', 'backupwordpress' );
357
- else :
358
- esc_html_e( 'File', 'backupwordpress' );
359
- endif; ?>
360
- </code>
361
- </td>
362
-
363
- <td class="column-format">
364
-
365
- <?php if ( $is_unreadable ) : ?>
366
-
367
- <strong title="<?php esc_attr_e( 'Unreadable files won\'t be backed up.', 'backupwordpress' ); ?>">
368
- <?php esc_html_e( 'Unreadable', 'backupwordpress' ); ?>
369
- </strong>
370
-
371
- <?php elseif ( $is_excluded ) : ?>
372
-
373
- <strong><?php esc_html_e( 'Excluded', 'backupwordpress' ); ?></strong>
374
-
375
- <?php else :
376
-
377
- $exclude_path = $file->getPathname();
378
-
379
- // Excluded directories need to be trailingslashed.
380
- if ( $file->isDir() ) :
381
- $exclude_path = trailingslashit( wp_normalize_path( $file->getPathname() ) );
382
- endif; ?>
383
-
384
- <a href="<?php echo esc_url( wp_nonce_url(
385
- add_query_arg( array(
386
- 'hmbkp_schedule_id' => $schedule->get_id(),
387
- 'action' => 'hmbkp_add_exclude_rule',
388
- 'hmbkp_exclude_pathname' => urlencode( $exclude_path ),
389
- ),
390
- admin_url( 'admin-post.php' )
391
- ),
392
- 'hmbkp-add-exclude-rule',
393
- 'hmbkp-add-exclude-rule-nonce'
394
- ) ); ?>" class="button-secondary">
395
- <?php esc_html_e( 'Exclude &rarr;', 'backupwordpress' ); ?>
396
- </a>
397
-
398
- <?php endif; ?>
399
-
400
- </td>
401
-
402
- </tr>
403
-
404
- <?php endforeach; ?>
405
-
406
- <?php else : ?>
407
-
408
- <tr>
409
- <td colspan="5">
410
- <span class="description"><?php esc_html_e( 'This folder is empty', 'backupwordpress' ); ?></span>
411
- </td>
412
- </tr>
413
-
414
- <?php endif; ?>
415
-
416
- </tbody>
417
-
418
- </table>
419
-
420
- <p class="submit">
421
- <a href="<?php echo esc_url( get_settings_url() ) ?>" class="button-primary">
422
- <?php esc_html_e( 'Done', 'backupwordpress' ); ?>
423
- </a>
424
- </p>
425
-
426
- </div>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ $excludes = $schedule->get_excludes();
6
+ $user_excludes = $excludes->get_user_excludes(); ?>
7
+
8
+ <div class="hmbkp-exclude-settings">
9
+
10
+ <h3>
11
+ <?php esc_html_e( 'Currently Excluded', 'backupwordpress' ); ?>
12
+ </h3>
13
+
14
+ <p>
15
+ <?php esc_html_e( 'We automatically detect and ignore common Version Control Systems folders and other backup plugin folders.', 'backupwordpress' ); ?>
16
+ </p>
17
+
18
+ <table class="widefat">
19
+
20
+ <tbody>
21
+
22
+ <?php foreach ( $user_excludes as $key => $exclude ) :
23
+
24
+ $exclude_path = new \SplFileInfo( trailingslashit( Path::get_root() ) . ltrim( str_ireplace( Path::get_root(), '', $exclude ), '/' ) ); ?>
25
+
26
+ <tr>
27
+
28
+ <th scope="row">
29
+
30
+ <?php if ( $exclude_path->isFile() ) : ?>
31
+
32
+ <div class="dashicons dashicons-media-default"></div>
33
+
34
+ <?php elseif ( $exclude_path->isDir() ) : ?>
35
+
36
+ <div class="dashicons dashicons-portfolio"></div>
37
+
38
+ <?php endif; ?>
39
+
40
+ </th>
41
+
42
+ <td>
43
+
44
+ <code><?php echo esc_html( str_ireplace( Path::get_root(), '', $exclude ) ); ?></code>
45
+
46
+ </td>
47
+
48
+ <td>
49
+
50
+ <?php if (
51
+ ( in_array( $exclude, $excludes->get_default_excludes() ) ) ||
52
+ ( Path::get_path() === trailingslashit( Path::get_root() ) . untrailingslashit( $exclude ) )
53
+ ) : ?>
54
+
55
+ <?php esc_html_e( 'Default rule', 'backupwordpress' ); ?>
56
+
57
+ <?php elseif ( defined( 'HMBKP_EXCLUDE' ) && false !== strpos( HMBKP_EXCLUDE, $exclude ) ) : ?>
58
+
59
+ <?php printf( esc_html__( 'Defined in %s', 'backupwordpress' ), 'wp-config.php' ); ?>
60
+
61
+ <?php else : ?>
62
+
63
+ <a href="<?php echo admin_action_url( 'remove_exclude_rule', array(
64
+ 'hmbkp_remove_exclude' => $exclude,
65
+ 'hmbkp_schedule_id' => $schedule->get_id(),
66
+ ) ); ?>" class="delete-action">
67
+ <?php esc_html_e( 'Stop excluding', 'backupwordpress' ); ?>
68
+ </a>
69
+
70
+ <?php endif; ?>
71
+
72
+ </td>
73
+
74
+ </tr>
75
+
76
+ <?php endforeach; ?>
77
+
78
+ </tbody>
79
+
80
+ </table>
81
+
82
+ <h3 id="directory-listing">
83
+ <?php esc_html_e( 'Your Site', 'backupwordpress' ); ?>
84
+ </h3>
85
+
86
+ <p>
87
+ <?php esc_html_e( 'Here\'s a directory listing of all files on your site, you can browse through and exclude files or folders that you don\'t want included in your backup.', 'backupwordpress' ); ?>
88
+ </p>
89
+
90
+ <?php
91
+
92
+ // The directory to display.
93
+ $directory = Path::get_root();
94
+
95
+ if ( isset( $_GET['hmbkp_directory_browse'] ) ) {
96
+
97
+ $untrusted_directory = urldecode( $_GET['hmbkp_directory_browse'] );
98
+
99
+ // Only allow real sub-directories of the site root to be browsed.
100
+ if (
101
+ false !== strpos( $untrusted_directory, Path::get_root() ) &&
102
+ is_dir( $untrusted_directory )
103
+ ) {
104
+ $directory = $untrusted_directory;
105
+ }
106
+ }
107
+
108
+ $site_size = new Site_Size( 'file' );
109
+ $excluded_site_size = new Site_Size( 'file', $excludes );
110
+
111
+ // Kick off a recursive filesize scan.
112
+ $files = list_directory_by_total_filesize( $directory, $excludes );
113
+ ?>
114
+
115
+ <table class="widefat">
116
+
117
+ <thead>
118
+
119
+ <tr>
120
+ <th></th>
121
+ <th scope="col"><?php esc_html_e( 'Name', 'backupwordpress' ); ?></th>
122
+ <th scope="col" class="column-format"><?php esc_html_e( 'Included Size', 'backupwordpress' ); ?></th>
123
+ <th scope="col" class="column-format"><?php esc_html_e( 'Permissions', 'backupwordpress' ); ?></th>
124
+ <th scope="col" class="column-format"><?php esc_html_e( 'Type', 'backupwordpress' ); ?></th>
125
+ <th scope="col" class="column-format"><?php esc_html_e( 'Status', 'backupwordpress' ); ?></th>
126
+ </tr>
127
+
128
+ <tr>
129
+
130
+ <th scope="row">
131
+ <div class="dashicons dashicons-admin-home"></div>
132
+ </th>
133
+
134
+ <th scope="col">
135
+
136
+ <?php if ( Path::get_root() !== $directory ) : ?>
137
+
138
+ <a href="<?php echo esc_url( remove_query_arg( 'hmbkp_directory_browse' ) ); ?>">
139
+ <?php echo esc_html( Path::get_root() ); ?>
140
+ </a>
141
+ <code>/</code>
142
+
143
+ <?php
144
+ $parents = array_filter( explode(
145
+ '/',
146
+ str_replace( trailingslashit( Path::get_root() ), '', trailingslashit( dirname( $directory ) ) )
147
+ ) );
148
+
149
+ foreach ( $parents as $directory_basename ) : ?>
150
+
151
+ <a href="<?php echo esc_url( add_query_arg( 'hmbkp_directory_browse', urlencode( substr( $directory, 0, strpos( $directory, $directory_basename ) ) . $directory_basename ) ) ); ?>">
152
+ <?php echo esc_html( $directory_basename ); ?>
153
+ </a>
154
+ <code>/</code>
155
+
156
+ <?php endforeach; ?>
157
+
158
+ <?php echo esc_html( basename( $directory ) ); ?>
159
+
160
+ <?php else : ?>
161
+
162
+ <?php echo esc_html( Path::get_root() ); ?>
163
+
164
+ <?php endif; ?>
165
+
166
+ </th>
167
+
168
+ <td class="column-filesize">
169
+
170
+ <?php if ( Site_Size::is_site_size_being_calculated() ) : ?>
171
+
172
+ <span class="spinner is-active"></span>
173
+
174
+ <?php else :
175
+
176
+ $root = new \SplFileInfo( Path::get_root() );
177
+ $size = $site_size->filesize( $root );
178
+ $excluded_size = $excluded_site_size->filesize( $root );
179
+ $excluded_size = is_same_size_format( $size, $excluded_size ) ? (int) size_format( $excluded_size ) : size_format( $excluded_size );
180
+ ?>
181
+
182
+ <code>
183
+ <?php
184
+ /* translators: 1: Excluded size 2: Overall site size */
185
+ printf(
186
+ esc_html__( '%1$s of %2$s', 'backupwordpress' ),
187
+ $excluded_size,
188
+ size_format( $size )
189
+ );
190
+ ?>
191
+
192
+ <a class="dashicons dashicons-update" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'hmbkp_recalculate_directory_filesize', urlencode( Path::get_root() ) ), 'hmbkp-recalculate_directory_filesize' ) ); ?>">
193
+ <span><?php esc_html_e( 'Refresh', 'backupwordpress' ); ?></span>
194
+ </a>
195
+ </code>
196
+
197
+ <?php endif; ?>
198
+
199
+ <td>
200
+ <code><?php echo esc_html( substr( sprintf( '%o', fileperms( Path::get_root() ) ), - 4 ) ); ?></code>
201
+ </td>
202
+
203
+ <td>
204
+
205
+ <code>
206
+
207
+ <?php if ( is_link( Path::get_root() ) ) :
208
+ esc_html_e( 'Symlink', 'backupwordpress' );
209
+ elseif ( is_dir( Path::get_root() ) ) :
210
+ esc_html_e( 'Folder', 'backupwordpress' );
211
+ endif; ?>
212
+
213
+ </code>
214
+
215
+ </td>
216
+
217
+ <td></td>
218
+
219
+ </tr>
220
+
221
+ </thead>
222
+
223
+ <tbody>
224
+
225
+ <?php if ( $files ) :
226
+
227
+ foreach ( $files as $size => $file ) :
228
+
229
+ $is_excluded = $is_unreadable = false;
230
+
231
+ // Check if the file is excluded.
232
+ if ( $excludes->is_file_excluded( $file ) ) :
233
+ $is_excluded = true;
234
+ endif;
235
+
236
+ // Skip unreadable files.
237
+ if ( ! @realpath( $file->getPathname() ) || ! $file->isReadable() ) :
238
+ $is_unreadable = true;
239
+ endif;
240
+ ?>
241
+
242
+ <tr>
243
+
244
+ <td>
245
+
246
+ <?php if ( $is_unreadable ) : ?>
247
+
248
+ <div class="dashicons dashicons-dismiss"></div>
249
+
250
+ <?php elseif ( $file->isFile() ) : ?>
251
+
252
+ <div class="dashicons dashicons-media-default"></div>
253
+
254
+ <?php elseif ( $file->isDir() ) : ?>
255
+
256
+ <div class="dashicons dashicons-portfolio"></div>
257
+
258
+ <?php endif; ?>
259
+
260
+ </td>
261
+
262
+ <td>
263
+
264
+ <?php if ( $is_unreadable ) : ?>
265
+
266
+ <code class="strikethrough" title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
267
+ <?php echo esc_html( $file->getBasename() ); ?>
268
+ </code>
269
+
270
+ <?php elseif ( $file->isFile() ) : ?>
271
+
272
+ <code title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
273
+ <?php echo esc_html( $file->getBasename() ); ?>
274
+ </code>
275
+
276
+ <?php elseif ( $file->isDir() ) : ?>
277
+
278
+ <code title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
279
+ <a href="<?php echo esc_url( add_query_arg( 'hmbkp_directory_browse', urlencode( wp_normalize_path( $file->getPathname() ) ) ) ); ?>">
280
+ <?php echo esc_html( $file->getBasename() ); ?>
281
+ </a>
282
+ </code>
283
+
284
+ <?php endif; ?>
285
+
286
+ </td>
287
+
288
+ <td class="column-format column-filesize">
289
+
290
+ <?php if ( $file->isDir() && Site_Size::is_site_size_being_calculated() ) : ?>
291
+ <span class="spinner is-active"></span>
292
+ <?php else :
293
+ $size = $site_size->filesize( $file );
294
+
295
+ if ( false !== $size ) :
296
+
297
+ $size = $size;
298
+ $excluded_size = $excluded_site_size->filesize( $file ); ?>
299
+
300
+ <code>
301
+
302
+ <?php
303
+ // Display `included of total size` info for directories and excluded files only.
304
+ if ( $file->isDir() || ( $file->isFile() && $is_excluded ) ) :
305
+
306
+ if ( $excluded_size ) {
307
+ $excluded_size = is_same_size_format( $size, $excluded_size ) ? (int) size_format( $excluded_size ) : size_format( $excluded_size );
308
+ }
309
+
310
+ if ( $size ) {
311
+ $size = size_format( $size );
312
+ }
313
+
314
+ /* translators: 1: Excluded size 2: Overall directory/file size */
315
+ printf(
316
+ esc_html__( '%1$s of %2$s', 'backupwordpress' ),
317
+ $excluded_size,
318
+ $size
319
+ );
320
+
321
+ elseif ( ! $is_unreadable ) :
322
+ echo esc_html( size_format( $size ) );
323
+ else :
324
+ echo '-';
325
+ endif; ?>
326
+
327
+ </code>
328
+
329
+ <?php else : ?>
330
+
331
+ <code>--</code>
332
+
333
+ <?php endif;
334
+ endif;
335
+ ?>
336
+
337
+ </td>
338
+
339
+ <td>
340
+ <code>
341
+ <?php if ( ! $is_unreadable ) :
342
+ echo esc_html( substr( sprintf( '%o', $file->getPerms() ), - 4 ) );
343
+ else :
344
+ echo '-';
345
+ endif; ?>
346
+ </code>
347
+ </td>
348
+
349
+ <td>
350
+ <code>
351
+ <?php if ( $file->isLink() ) : ?>
352
+ <span title="<?php echo esc_attr( wp_normalize_path( $file->getRealPath() ) ); ?>">
353
+ <?php esc_html_e( 'Symlink', 'backupwordpress' ); ?>
354
+ </span>
355
+ <?php elseif ( $file->isDir() ) :
356
+ esc_html_e( 'Folder', 'backupwordpress' );
357
+ else :
358
+ esc_html_e( 'File', 'backupwordpress' );
359
+ endif; ?>
360
+ </code>
361
+ </td>
362
+
363
+ <td class="column-format">
364
+
365
+ <?php if ( $is_unreadable ) : ?>
366
+
367
+ <strong title="<?php esc_attr_e( 'Unreadable files won\'t be backed up.', 'backupwordpress' ); ?>">
368
+ <?php esc_html_e( 'Unreadable', 'backupwordpress' ); ?>
369
+ </strong>
370
+
371
+ <?php elseif ( $is_excluded ) : ?>
372
+
373
+ <strong><?php esc_html_e( 'Excluded', 'backupwordpress' ); ?></strong>
374
+
375
+ <?php else :
376
+
377
+ $exclude_path = $file->getPathname();
378
+
379
+ // Excluded directories need to be trailingslashed.
380
+ if ( $file->isDir() ) :
381
+ $exclude_path = trailingslashit( wp_normalize_path( $file->getPathname() ) );
382
+ endif; ?>
383
+
384
+ <a href="<?php echo esc_url( wp_nonce_url(
385
+ add_query_arg( array(
386
+ 'hmbkp_schedule_id' => $schedule->get_id(),
387
+ 'action' => 'hmbkp_add_exclude_rule',
388
+ 'hmbkp_exclude_pathname' => urlencode( $exclude_path ),
389
+ ),
390
+ admin_url( 'admin-post.php' )
391
+ ),
392
+ 'hmbkp-add-exclude-rule',
393
+ 'hmbkp-add-exclude-rule-nonce'
394
+ ) ); ?>" class="button-secondary">
395
+ <?php esc_html_e( 'Exclude &rarr;', 'backupwordpress' ); ?>
396
+ </a>
397
+
398
+ <?php endif; ?>
399
+
400
+ </td>
401
+
402
+ </tr>
403
+
404
+ <?php endforeach; ?>
405
+
406
+ <?php else : ?>
407
+
408
+ <tr>
409
+ <td colspan="5">
410
+ <span class="description"><?php esc_html_e( 'This folder is empty', 'backupwordpress' ); ?></span>
411
+ </td>
412
+ </tr>
413
+
414
+ <?php endif; ?>
415
+
416
+ </tbody>
417
+
418
+ </table>
419
+
420
+ <p class="submit">
421
+ <a href="<?php echo esc_url( get_settings_url() ) ?>" class="button-primary">
422
+ <?php esc_html_e( 'Done', 'backupwordpress' ); ?>
423
+ </a>
424
+ </p>
425
+
426
+ </div>
admin/schedule-form.php CHANGED
@@ -1,206 +1,206 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- ?>
6
-
7
- <h3><?php esc_html_e( 'Settings', 'backupwordpress' ); ?></h3>
8
-
9
- <?php $hmbkp_form_errors = get_settings_errors(); ?>
10
-
11
- <?php if ( ! empty( $hmbkp_form_errors ) ) { ?>
12
-
13
- <div id="hmbkp-warning" class="error settings-error">
14
-
15
- <?php foreach ( $hmbkp_form_errors as $error ) { ?>
16
- <p><strong><?php echo wp_kses_data( $error ); ?></strong></p>
17
- <?php } ?>
18
-
19
- </div>
20
-
21
- <?php }
22
-
23
- // We can clear them now we've displayed them
24
- clear_settings_errors();
25
-
26
- ?>
27
-
28
- <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
29
-
30
- <input type="hidden" name="hmbkp_schedule_id" value="<?php echo esc_attr( $schedule->get_id() ); ?>" />
31
- <input type="hidden" name="action" value="hmbkp_edit_schedule_submit" />
32
-
33
- <?php wp_nonce_field( 'hmbkp-edit-schedule', 'hmbkp-edit-schedule-nonce' ); ?>
34
-
35
- <table class="form-table">
36
-
37
- <tbody>
38
-
39
- <tr valign="top">
40
-
41
- <th scope="row">
42
- <label for="hmbkp_schedule_type"><?php _e( 'Backup', 'backupwordpress' ); ?></label>
43
- </th>
44
-
45
- <td>
46
-
47
- <select name="hmbkp_schedule_type" id="hmbkp_schedule_type">
48
-
49
- <option<?php selected( $schedule->get_type(), 'complete' ); ?> value="complete"><?php _e( 'Both Database &amp; files', 'backupwordpress' ); ?></option>
50
-
51
- <option<?php selected( $schedule->get_type(), 'file' ); ?> value="file"><?php _e( 'Files only', 'backupwordpress' ); ?></option>
52
-
53
- <option<?php selected( $schedule->get_type(), 'database' ); ?> value="database"><?php _e( 'Database only', 'backupwordpress' ); ?></option>
54
-
55
- </select>
56
-
57
- </td>
58
-
59
- </tr>
60
-
61
- <tr>
62
-
63
- <th scope="row">
64
- <label for="hmbkp_schedule_recurrence_type"><?php _e( 'Schedule', 'backupwordpress' ); ?></label>
65
- </th>
66
-
67
- <td>
68
-
69
- <select name="hmbkp_schedule_recurrence[hmbkp_type]" id="hmbkp_schedule_recurrence_type">
70
-
71
- <option value="manually"><?php _e( 'Manual Only', 'backupwordpress' ); ?></option>
72
-
73
- <?php foreach ( get_cron_schedules() as $cron_schedule => $cron_details ) : ?>
74
-
75
- <option <?php selected( $schedule->get_reoccurrence(), $cron_schedule ); ?> value="<?php echo esc_attr( $cron_schedule ); ?>">
76
-
77
- <?php esc_html_e( $cron_details['display'], 'backupwordpress' ); ?>
78
-
79
- </option>
80
-
81
- <?php endforeach; ?>
82
-
83
- </select>
84
-
85
- </td>
86
-
87
- </tr>
88
-
89
- <?php if ( ! $start_time = $schedule->get_schedule_start_time( false ) ) :
90
- $start_time = time();
91
- endif; ?>
92
-
93
- <?php $start_date_array = date_parse( date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $start_time ) ); ?>
94
-
95
- <tr id="start-day" class="recurring-setting">
96
-
97
- <th scope="row">
98
- <label for="hmbkp_schedule_start_day_of_week"><?php _e( 'Start Day', 'backupwordpress' ); ?></label>
99
- </th>
100
-
101
- <td>
102
-
103
- <select id="hmbkp_schedule_start_day_of_week" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_day_of_week]">
104
-
105
- <?php $weekdays = array(
106
- 'monday' => __( 'Monday', 'backupwordpress' ),
107
- 'tuesday' => __( 'Tuesday', 'backupwordpress' ),
108
- 'wednesday' => __( 'Wednesday', 'backupwordpress' ),
109
- 'thursday' => __( 'Thursday', 'backupwordpress' ),
110
- 'friday' => __( 'Friday', 'backupwordpress' ),
111
- 'saturday' => __( 'Saturday', 'backupwordpress' ),
112
- 'sunday' => __( 'Sunday', 'backupwordpress' ),
113
- );
114
-
115
- foreach ( $weekdays as $key => $day ) : ?>
116
-
117
- <option value="<?php echo esc_attr( $key ) ?>" <?php selected( strtolower( date_i18n( 'l', $start_time ) ), $key ); ?>><?php echo esc_html( $day ); ?></option>
118
-
119
- <?php endforeach; ?>
120
-
121
- </select>
122
-
123
- </td>
124
-
125
- </tr>
126
-
127
- <tr id="start-date" class="recurring-setting">
128
-
129
- <th scope="row">
130
- <label for="hmbkp_schedule_start_day_of_month"><?php _e( 'Start Day of Month', 'backupwordpress' ); ?></label>
131
- </th>
132
-
133
- <td>
134
- <input type="number" min="0" max="31" step="1" id="hmbkp_schedule_start_day_of_month" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_day_of_month]" value="<?php echo esc_attr( $start_date_array['day'] ); ?>">
135
- </td>
136
-
137
- </tr>
138
-
139
- <tr id="schedule-start" class="recurring-setting">
140
-
141
- <th scope="row">
142
- <label for="hmbkp_schedule_start_hours"><?php _e( 'Start Time', 'backupwordpress' ); ?></label>
143
- </th>
144
-
145
- <td>
146
-
147
- <span class="field-group">
148
-
149
- <label for="hmbkp_schedule_start_hours"><input type="number" min="0" max="23" step="1" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_hours]" id="hmbkp_schedule_start_hours" value="<?php echo esc_attr( $start_date_array['hour'] ); ?>">
150
-
151
- <?php _e( 'Hours', 'backupwordpress' ); ?></label>
152
-
153
- <label for="hmbkp_schedule_start_minutes"><input type="number" min="0" max="59" step="1" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_minutes]" id="hmbkp_schedule_start_minutes" value="<?php echo esc_attr( $start_date_array['minute'] ); ?>">
154
-
155
- <?php _e( 'Minutes', 'backupwordpress' ); ?></label>
156
-
157
- </span>
158
-
159
- <p class="description">
160
- <?php esc_html_e( '24-hour format.', 'backupwordpress' ); ?>
161
- <span class="twice-js <?php if ( $schedule->get_reoccurrence() !== 'fortnightly' ) { ?> hidden<?php } ?>"><?php _e( 'The second backup will run 12 hours after the first.', 'backupwordpress' ); ?><span>
162
- </p>
163
-
164
- </td>
165
-
166
- </tr>
167
-
168
- <tr>
169
-
170
- <th scope="row">
171
- <label for="hmbkp_schedule_max_backups"><?php _e( 'Number of backups to store on this server', 'backupwordpress' ); ?></label>
172
- </th>
173
-
174
- <td>
175
-
176
- <input type="number" id="hmbkp_schedule_max_backups" name="hmbkp_schedule_max_backups" min="1" step="1" value="<?php echo esc_attr( $schedule->get_max_backups() ); ?>" />
177
-
178
- <p class="description">
179
-
180
- <?php printf( __( 'Past this limit older backups will be deleted automatically.', 'backupwordpress' ) ); ?>
181
-
182
- <?php
183
-
184
- $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
185
-
186
- if ( $site_size->is_site_size_cached() ) :
187
- printf( __( 'This schedule will store a maximum of %s of backups.', 'backupwordpress' ), '<code>' . esc_html( size_format( $site_size->get_site_size() * $schedule->get_max_backups() ) ) . '</code>' );
188
- endif; ?>
189
-
190
- </p>
191
-
192
- </td>
193
-
194
- </tr>
195
-
196
- <?php foreach ( Services::get_services( $schedule ) as $service ) :
197
- $service->field();
198
- endforeach; ?>
199
-
200
- </tbody>
201
-
202
- </table>
203
-
204
- <?php submit_button( __( 'Done', 'backupwordpress' ) ); ?>
205
-
206
- </form>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ ?>
6
+
7
+ <h3><?php esc_html_e( 'Settings', 'backupwordpress' ); ?></h3>
8
+
9
+ <?php $hmbkp_form_errors = get_settings_errors(); ?>
10
+
11
+ <?php if ( ! empty( $hmbkp_form_errors ) ) { ?>
12
+
13
+ <div id="hmbkp-warning" class="error settings-error">
14
+
15
+ <?php foreach ( $hmbkp_form_errors as $error ) { ?>
16
+ <p><strong><?php echo wp_kses_data( $error ); ?></strong></p>
17
+ <?php } ?>
18
+
19
+ </div>
20
+
21
+ <?php }
22
+
23
+ // We can clear them now we've displayed them
24
+ clear_settings_errors();
25
+
26
+ ?>
27
+
28
+ <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
29
+
30
+ <input type="hidden" name="hmbkp_schedule_id" value="<?php echo esc_attr( $schedule->get_id() ); ?>" />
31
+ <input type="hidden" name="action" value="hmbkp_edit_schedule_submit" />
32
+
33
+ <?php wp_nonce_field( 'hmbkp-edit-schedule', 'hmbkp-edit-schedule-nonce' ); ?>
34
+
35
+ <table class="form-table">
36
+
37
+ <tbody>
38
+
39
+ <tr valign="top">
40
+
41
+ <th scope="row">
42
+ <label for="hmbkp_schedule_type"><?php _e( 'Backup', 'backupwordpress' ); ?></label>
43
+ </th>
44
+
45
+ <td>
46
+
47
+ <select name="hmbkp_schedule_type" id="hmbkp_schedule_type">
48
+
49
+ <option<?php selected( $schedule->get_type(), 'complete' ); ?> value="complete"><?php _e( 'Both Database &amp; files', 'backupwordpress' ); ?></option>
50
+
51
+ <option<?php selected( $schedule->get_type(), 'file' ); ?> value="file"><?php _e( 'Files only', 'backupwordpress' ); ?></option>
52
+
53
+ <option<?php selected( $schedule->get_type(), 'database' ); ?> value="database"><?php _e( 'Database only', 'backupwordpress' ); ?></option>
54
+
55
+ </select>
56
+
57
+ </td>
58
+
59
+ </tr>
60
+
61
+ <tr>
62
+
63
+ <th scope="row">
64
+ <label for="hmbkp_schedule_recurrence_type"><?php _e( 'Schedule', 'backupwordpress' ); ?></label>
65
+ </th>
66
+
67
+ <td>
68
+
69
+ <select name="hmbkp_schedule_recurrence[hmbkp_type]" id="hmbkp_schedule_recurrence_type">
70
+
71
+ <option value="manually"><?php _e( 'Manual Only', 'backupwordpress' ); ?></option>
72
+
73
+ <?php foreach ( get_cron_schedules() as $cron_schedule => $cron_details ) : ?>
74
+
75
+ <option <?php selected( $schedule->get_reoccurrence(), $cron_schedule ); ?> value="<?php echo esc_attr( $cron_schedule ); ?>">
76
+
77
+ <?php esc_html_e( $cron_details['display'], 'backupwordpress' ); ?>
78
+
79
+ </option>
80
+
81
+ <?php endforeach; ?>
82
+
83
+ </select>
84
+
85
+ </td>
86
+
87
+ </tr>
88
+
89
+ <?php if ( ! $start_time = $schedule->get_schedule_start_time( false ) ) :
90
+ $start_time = time();
91
+ endif; ?>
92
+
93
+ <?php $start_date_array = date_parse( date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $start_time ) ); ?>
94
+
95
+ <tr id="start-day" class="recurring-setting">
96
+
97
+ <th scope="row">
98
+ <label for="hmbkp_schedule_start_day_of_week"><?php _e( 'Start Day', 'backupwordpress' ); ?></label>
99
+ </th>
100
+
101
+ <td>
102
+
103
+ <select id="hmbkp_schedule_start_day_of_week" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_day_of_week]">
104
+
105
+ <?php $weekdays = array(
106
+ 'monday' => __( 'Monday', 'backupwordpress' ),
107
+ 'tuesday' => __( 'Tuesday', 'backupwordpress' ),
108
+ 'wednesday' => __( 'Wednesday', 'backupwordpress' ),
109
+ 'thursday' => __( 'Thursday', 'backupwordpress' ),
110
+ 'friday' => __( 'Friday', 'backupwordpress' ),
111
+ 'saturday' => __( 'Saturday', 'backupwordpress' ),
112
+ 'sunday' => __( 'Sunday', 'backupwordpress' ),
113
+ );
114
+
115
+ foreach ( $weekdays as $key => $day ) : ?>
116
+
117
+ <option value="<?php echo esc_attr( $key ) ?>" <?php selected( strtolower( date_i18n( 'l', $start_time ) ), $key ); ?>><?php echo esc_html( $day ); ?></option>
118
+
119
+ <?php endforeach; ?>
120
+
121
+ </select>
122
+
123
+ </td>
124
+
125
+ </tr>
126
+
127
+ <tr id="start-date" class="recurring-setting">
128
+
129
+ <th scope="row">
130
+ <label for="hmbkp_schedule_start_day_of_month"><?php _e( 'Start Day of Month', 'backupwordpress' ); ?></label>
131
+ </th>
132
+
133
+ <td>
134
+ <input type="number" min="0" max="31" step="1" id="hmbkp_schedule_start_day_of_month" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_day_of_month]" value="<?php echo esc_attr( $start_date_array['day'] ); ?>">
135
+ </td>
136
+
137
+ </tr>
138
+
139
+ <tr id="schedule-start" class="recurring-setting">
140
+
141
+ <th scope="row">
142
+ <label for="hmbkp_schedule_start_hours"><?php _e( 'Start Time', 'backupwordpress' ); ?></label>
143
+ </th>
144
+
145
+ <td>
146
+
147
+ <span class="field-group">
148
+
149
+ <label for="hmbkp_schedule_start_hours"><input type="number" min="0" max="23" step="1" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_hours]" id="hmbkp_schedule_start_hours" value="<?php echo esc_attr( $start_date_array['hour'] ); ?>">
150
+
151
+ <?php _e( 'Hours', 'backupwordpress' ); ?></label>
152
+
153
+ <label for="hmbkp_schedule_start_minutes"><input type="number" min="0" max="59" step="1" name="hmbkp_schedule_recurrence[hmbkp_schedule_start_minutes]" id="hmbkp_schedule_start_minutes" value="<?php echo esc_attr( $start_date_array['minute'] ); ?>">
154
+
155
+ <?php _e( 'Minutes', 'backupwordpress' ); ?></label>
156
+
157
+ </span>
158
+
159
+ <p class="description">
160
+ <?php esc_html_e( '24-hour format.', 'backupwordpress' ); ?>
161
+ <span class="twice-js <?php if ( $schedule->get_reoccurrence() !== 'fortnightly' ) { ?> hidden<?php } ?>"><?php _e( 'The second backup will run 12 hours after the first.', 'backupwordpress' ); ?><span>
162
+ </p>
163
+
164
+ </td>
165
+
166
+ </tr>
167
+
168
+ <tr>
169
+
170
+ <th scope="row">
171
+ <label for="hmbkp_schedule_max_backups"><?php _e( 'Number of backups to store on this server', 'backupwordpress' ); ?></label>
172
+ </th>
173
+
174
+ <td>
175
+
176
+ <input type="number" id="hmbkp_schedule_max_backups" name="hmbkp_schedule_max_backups" min="1" step="1" value="<?php echo esc_attr( $schedule->get_max_backups() ); ?>" />
177
+
178
+ <p class="description">
179
+
180
+ <?php printf( __( 'Past this limit older backups will be deleted automatically.', 'backupwordpress' ) ); ?>
181
+
182
+ <?php
183
+
184
+ $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
185
+
186
+ if ( $site_size->is_site_size_cached() ) :
187
+ printf( __( 'This schedule will store a maximum of %s of backups.', 'backupwordpress' ), '<code>' . esc_html( size_format( $site_size->get_site_size() * $schedule->get_max_backups() ) ) . '</code>' );
188
+ endif; ?>
189
+
190
+ </p>
191
+
192
+ </td>
193
+
194
+ </tr>
195
+
196
+ <?php foreach ( Services::get_services( $schedule ) as $service ) :
197
+ $service->field();
198
+ endforeach; ?>
199
+
200
+ </tbody>
201
+
202
+ </table>
203
+
204
+ <?php submit_button( __( 'Done', 'backupwordpress' ) ); ?>
205
+
206
+ </form>
admin/schedule-sentence.php CHANGED
@@ -1,166 +1,166 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- $filesize = get_site_size_text( $schedule );
6
-
7
- // Backup Type
8
- $type = strtolower( human_get_type( $schedule->get_type() ) );
9
-
10
- // Backup Time
11
- $day = date_i18n( 'l', $schedule->get_next_occurrence( false ) );
12
-
13
- // Next Backup
14
- $next_backup = 'title="' . esc_attr( sprintf( __( 'The next backup will be on %1$s at %2$s %3$s', 'backupwordpress' ), date_i18n( get_option( 'date_format' ), $schedule->get_next_occurrence( false ) ), date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ), date_i18n( 'T', $schedule->get_next_occurrence( false ) ) ) ) . '"';
15
-
16
- // Backup status
17
- $status = new Backup_Status( $schedule->get_id() );
18
-
19
- // Backup Re-occurrence
20
- switch ( $schedule->get_reoccurrence() ) :
21
-
22
- case 'hourly' :
23
-
24
- $reoccurrence = date_i18n( 'i', $schedule->get_next_occurrence( false ) ) === '00' ? '<span ' . $next_backup . '>' . __( 'hourly on the hour', 'backupwordpress' ) . '</span>' : sprintf( __( 'hourly at %s minutes past the hour', 'backupwordpress' ), '<span ' . $next_backup . '>' . intval( date_i18n( 'i', $schedule->get_next_occurrence( false ) ) ) ) . '</span>';
25
-
26
- break;
27
-
28
- case 'daily' :
29
-
30
- $reoccurrence = sprintf( __( 'daily at %s', 'backupwordpress' ), '<span ' . $next_backup . '>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
31
-
32
- break;
33
-
34
- case 'twicedaily' :
35
-
36
- $times[] = date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) );
37
- $times[] = date_i18n( get_option( 'time_format' ), strtotime( '+ 12 hours', $schedule->get_next_occurrence( false ) ) );
38
-
39
- sort( $times );
40
-
41
- $reoccurrence = sprintf( __( 'every 12 hours at %1$s &amp; %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' . esc_html( reset( $times ) ) . '</span>', '<span>' . esc_html( end( $times ) ) ) . '</span>';
42
-
43
- break;
44
-
45
- case 'weekly' :
46
-
47
- $reoccurrence = sprintf( __( 'weekly on %1$s at %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' .esc_html( $day ) . '</span>', '<span>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
48
-
49
- break;
50
-
51
- case 'fortnightly' :
52
-
53
- $reoccurrence = sprintf( __( 'every two weeks on %1$s at %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' . $day . '</span>', '<span>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
54
-
55
- break;
56
-
57
- case 'monthly' :
58
-
59
- $reoccurrence = sprintf( __( 'on the %1$s of each month at %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' . esc_html( date_i18n( 'jS', $schedule->get_next_occurrence( false ) ) ) . '</span>', '<span>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
60
-
61
- break;
62
-
63
- case 'manually' :
64
-
65
- $reoccurrence = __( 'manually', 'backupwordpress' );
66
-
67
- break;
68
-
69
- default :
70
-
71
- $reoccurrence = __( 'manually', 'backupwordpress' );
72
- $schedule->set_reoccurrence( 'manually' );
73
-
74
- endswitch;
75
-
76
- $server = '<code title="' . __( 'Check the help tab to learn how to change where your backups are stored.', 'backupwordpress' ) . '">' . esc_attr( str_replace( Path::get_home_path(), '', Path::get_path() ) ) . '</code>';
77
-
78
- // Backup to keep
79
- switch ( $schedule->get_max_backups() ) :
80
-
81
- case 1 :
82
-
83
- $backup_to_keep = sprintf( __( 'store the most recent backup in %s', 'backupwordpress' ), $server );
84
-
85
- break;
86
-
87
- case 0 :
88
-
89
- $backup_to_keep = sprintf( __( 'don\'t store any backups in on this server', 'backupwordpress' ), Path::get_path() );
90
-
91
- break;
92
-
93
- default :
94
-
95
- $backup_to_keep = sprintf( __( 'store the last %1$s backups in %2$s', 'backupwordpress' ), esc_html( $schedule->get_max_backups() ), $server );
96
-
97
- endswitch;
98
-
99
- $email_msg = '';
100
- $services = array();
101
-
102
- foreach ( Services::get_services( $schedule ) as $file => $service ) {
103
-
104
- if ( is_wp_error( $service ) ) {
105
- $email_msg = $service->get_error_message();
106
- } elseif ( 'Email' === $service->name ) {
107
- $email_msg = wp_kses_post( $service->display() );
108
- } elseif ( $service->is_service_active() && $service->display() ) {
109
- $services[] = esc_html( $service->display() );
110
- }
111
- }
112
-
113
- if ( ! empty( $services ) && count( $services ) > 1 ) {
114
- $services[ count( $services ) -2 ] .= ' & ' . $services[ count( $services ) -1 ];
115
- array_pop( $services );
116
- } ?>
117
-
118
- <div class="hmbkp-schedule-sentence<?php if ( $status->get_status() ) { ?> hmbkp-running<?php } ?>">
119
-
120
- <?php $sentence = sprintf( _x( 'Backup my %1$s %2$s %3$s, %4$s.', '1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to store', 'backupwordpress' ), '<span>' . esc_html( $type ) . '</span>', $filesize, $reoccurrence, $backup_to_keep );
121
-
122
- if ( $email_msg ) {
123
- $sentence .= ' ' . $email_msg;
124
- }
125
-
126
- if ( ! empty( $services ) ) {
127
- $sentence .= ' ' . sprintf( __( 'Send a copy of each backup to %s.', 'backupwordpress' ), implode( ', ', $services ) );
128
- }
129
-
130
- echo $sentence; ?>
131
-
132
- <?php if ( Schedules::get_instance()->get_schedule( $schedule->get_id() ) ) :
133
- schedule_status( $schedule );
134
- endif; ?>
135
-
136
- <?php require( HMBKP_PLUGIN_PATH . 'admin/schedule-settings.php' ); ?>
137
-
138
- </div>
139
-
140
- <?php
141
-
142
- /**
143
- * Returns a formatted string containing the calculated total site size or a message
144
- * to indicate it is being calculated.
145
- *
146
- * @param HM\BackUpWordPress\Scheduled_Backup $schedule
147
- *
148
- * @return string
149
- */
150
- function get_site_size_text( Scheduled_Backup $schedule ) {
151
-
152
- if ( isset( $_GET['hmbkp_add_schedule'] ) ) {
153
- return '';
154
- }
155
-
156
- $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
157
-
158
- if ( 'database' === $schedule->get_type() || $site_size->is_site_size_cached() ) {
159
- return sprintf(
160
- '(<code title="' . __( 'Backups will be compressed and should be smaller than this.', 'backupwordpress' ) . '">%s</code>)',
161
- esc_html( $site_size->get_formatted_site_size() )
162
- );
163
- }
164
-
165
- return '';
166
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ $filesize = get_site_size_text( $schedule );
6
+
7
+ // Backup Type
8
+ $type = strtolower( human_get_type( $schedule->get_type() ) );
9
+
10
+ // Backup Time
11
+ $day = date_i18n( 'l', $schedule->get_next_occurrence( false ) );
12
+
13
+ // Next Backup
14
+ $next_backup = 'title="' . esc_attr( sprintf( __( 'The next backup will be on %1$s at %2$s %3$s', 'backupwordpress' ), date_i18n( get_option( 'date_format' ), $schedule->get_next_occurrence( false ) ), date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ), date_i18n( 'T', $schedule->get_next_occurrence( false ) ) ) ) . '"';
15
+
16
+ // Backup status
17
+ $status = new Backup_Status( $schedule->get_id() );
18
+
19
+ // Backup Re-occurrence
20
+ switch ( $schedule->get_reoccurrence() ) :
21
+
22
+ case 'hourly' :
23
+
24
+ $reoccurrence = date_i18n( 'i', $schedule->get_next_occurrence( false ) ) === '00' ? '<span ' . $next_backup . '>' . __( 'hourly on the hour', 'backupwordpress' ) . '</span>' : sprintf( __( 'hourly at %s minutes past the hour', 'backupwordpress' ), '<span ' . $next_backup . '>' . intval( date_i18n( 'i', $schedule->get_next_occurrence( false ) ) ) ) . '</span>';
25
+
26
+ break;
27
+
28
+ case 'daily' :
29
+
30
+ $reoccurrence = sprintf( __( 'daily at %s', 'backupwordpress' ), '<span ' . $next_backup . '>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
31
+
32
+ break;
33
+
34
+ case 'twicedaily' :
35
+
36
+ $times[] = date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) );
37
+ $times[] = date_i18n( get_option( 'time_format' ), strtotime( '+ 12 hours', $schedule->get_next_occurrence( false ) ) );
38
+
39
+ sort( $times );
40
+
41
+ $reoccurrence = sprintf( __( 'every 12 hours at %1$s &amp; %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' . esc_html( reset( $times ) ) . '</span>', '<span>' . esc_html( end( $times ) ) ) . '</span>';
42
+
43
+ break;
44
+
45
+ case 'weekly' :
46
+
47
+ $reoccurrence = sprintf( __( 'weekly on %1$s at %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' .esc_html( $day ) . '</span>', '<span>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
48
+
49
+ break;
50
+
51
+ case 'fortnightly' :
52
+
53
+ $reoccurrence = sprintf( __( 'every two weeks on %1$s at %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' . $day . '</span>', '<span>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
54
+
55
+ break;
56
+
57
+ case 'monthly' :
58
+
59
+ $reoccurrence = sprintf( __( 'on the %1$s of each month at %2$s', 'backupwordpress' ), '<span ' . $next_backup . '>' . esc_html( date_i18n( 'jS', $schedule->get_next_occurrence( false ) ) ) . '</span>', '<span>' . esc_html( date_i18n( get_option( 'time_format' ), $schedule->get_next_occurrence( false ) ) ) . '</span>' );
60
+
61
+ break;
62
+
63
+ case 'manually' :
64
+
65
+ $reoccurrence = __( 'manually', 'backupwordpress' );
66
+
67
+ break;
68
+
69
+ default :
70
+
71
+ $reoccurrence = __( 'manually', 'backupwordpress' );
72
+ $schedule->set_reoccurrence( 'manually' );
73
+
74
+ endswitch;
75
+
76
+ $server = '<code title="' . __( 'Check the help tab to learn how to change where your backups are stored.', 'backupwordpress' ) . '">' . esc_attr( str_replace( Path::get_home_path(), '', Path::get_path() ) ) . '</code>';
77
+
78
+ // Backup to keep
79
+ switch ( $schedule->get_max_backups() ) :
80
+
81
+ case 1 :
82
+
83
+ $backup_to_keep = sprintf( __( 'store the most recent backup in %s', 'backupwordpress' ), $server );
84
+
85
+ break;
86
+
87
+ case 0 :
88
+
89
+ $backup_to_keep = sprintf( __( 'don\'t store any backups in on this server', 'backupwordpress' ), Path::get_path() );
90
+
91
+ break;
92
+
93
+ default :
94
+
95
+ $backup_to_keep = sprintf( __( 'store the last %1$s backups in %2$s', 'backupwordpress' ), esc_html( $schedule->get_max_backups() ), $server );
96
+
97
+ endswitch;
98
+
99
+ $email_msg = '';
100
+ $services = array();
101
+
102
+ foreach ( Services::get_services( $schedule ) as $file => $service ) {
103
+
104
+ if ( is_wp_error( $service ) ) {
105
+ $email_msg = $service->get_error_message();
106
+ } elseif ( 'Email' === $service->name ) {
107
+ $email_msg = wp_kses_post( $service->display() );
108
+ } elseif ( $service->is_service_active() && $service->display() ) {
109
+ $services[] = esc_html( $service->display() );
110
+ }
111
+ }
112
+
113
+ if ( ! empty( $services ) && count( $services ) > 1 ) {
114
+ $services[ count( $services ) -2 ] .= ' & ' . $services[ count( $services ) -1 ];
115
+ array_pop( $services );
116
+ } ?>
117
+
118
+ <div class="hmbkp-schedule-sentence<?php if ( $status->get_status() ) { ?> hmbkp-running<?php } ?>">
119
+
120
+ <?php $sentence = sprintf( _x( 'Backup my %1$s %2$s %3$s, %4$s.', '1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to store', 'backupwordpress' ), '<span>' . esc_html( $type ) . '</span>', $filesize, $reoccurrence, $backup_to_keep );
121
+
122
+ if ( $email_msg ) {
123
+ $sentence .= ' ' . $email_msg;
124
+ }
125
+
126
+ if ( ! empty( $services ) ) {
127
+ $sentence .= ' ' . sprintf( __( 'Send a copy of each backup to %s.', 'backupwordpress' ), implode( ', ', $services ) );
128
+ }
129
+
130
+ echo $sentence; ?>
131
+
132
+ <?php if ( Schedules::get_instance()->get_schedule( $schedule->get_id() ) ) :
133
+ schedule_status( $schedule );
134
+ endif; ?>
135
+
136
+ <?php require( HMBKP_PLUGIN_PATH . 'admin/schedule-settings.php' ); ?>
137
+
138
+ </div>
139
+
140
+ <?php
141
+
142
+ /**
143
+ * Returns a formatted string containing the calculated total site size or a message
144
+ * to indicate it is being calculated.
145
+ *
146
+ * @param HM\BackUpWordPress\Scheduled_Backup $schedule
147
+ *
148
+ * @return string
149
+ */
150
+ function get_site_size_text( Scheduled_Backup $schedule ) {
151
+
152
+ if ( isset( $_GET['hmbkp_add_schedule'] ) ) {
153
+ return '';
154
+ }
155
+
156
+ $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
157
+
158
+ if ( 'database' === $schedule->get_type() || $site_size->is_site_size_cached() ) {
159
+ return sprintf(
160
+ '(<code title="' . __( 'Backups will be compressed and should be smaller than this.', 'backupwordpress' ) . '">%s</code>)',
161
+ esc_html( $site_size->get_formatted_site_size() )
162
+ );
163
+ }
164
+
165
+ return '';
166
+ }
admin/schedule-settings.php CHANGED
@@ -1,99 +1,99 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- if ( Schedules::get_instance()->get_schedule( $schedule->get_id() ) ) { ?>
6
-
7
- <div class="hmbkp-schedule-actions row-actions">
8
-
9
- <?php if ( is_backup_possible() ) : ?>
10
-
11
- <a class="hmbkp-run" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_run_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ), 'hmbkp_run_schedule', 'hmbkp_run_schedule_nonce' ) ); ?>"><?php _e( 'Run now', 'backupwordpress' ); ?></a> |
12
-
13
- <?php endif; ?>
14
-
15
- <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings', 'hmbkp_schedule_id' => $schedule->get_id() ), get_settings_url() ), 'hmbkp-edit-schedule' ); ?>"><?php _e( 'Settings', 'backupwordpress' ); ?></a> |
16
-
17
- <?php
18
-
19
- // Only show excludes if we are backing up files
20
- if ( 'database' !== $schedule->get_type() ) : ?>
21
- <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes', 'hmbkp_schedule_id' => $schedule->get_id() ), get_settings_url() ) ); ?>"><?php _e( 'Excludes', 'backupwordpress' ); ?></a> |
22
- <?php endif; ?>
23
-
24
- <?php foreach ( Services::get_services( $schedule ) as $service ) :
25
-
26
- if ( ! $service->has_form() ) {
27
- continue;
28
- } ?>
29
-
30
- <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings_' . $service->get_slug(), 'hmbkp_schedule_id' => $schedule->get_id() ), get_settings_url() ) ); ?>"><?php echo esc_html( $service->name ); ?></a> |
31
-
32
- <?php endforeach; ?>
33
-
34
- <a class="delete-action" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_request_delete_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-post.php' ) ), 'hmbkp_delete_schedule', 'hmbkp_delete_schedule_nonce' ) ); ?>"><?php _e( 'Delete', 'backupwordpress' ); ?></a>
35
-
36
- </div>
37
-
38
- <?php } ?>
39
-
40
- <?php if ( ! isset( $_GET['action'] ) || 'hmbkp_edit_schedule' !== $_GET['action'] || ! isset( $_GET['hmbkp_panel'] ) ) {
41
- return;
42
- } ?>
43
-
44
- <div class="hmbkp-schedule-settings">
45
-
46
- <?php if ( 'hmbkp_edit_schedule' === $_GET['action'] && 'hmbkp_edit_schedule_settings' === $_GET['hmbkp_panel'] ) :
47
- require( HMBKP_PLUGIN_PATH . 'admin/schedule-form.php' );
48
- endif; ?>
49
-
50
- <?php if ( 'hmbkp_edit_schedule' === $_GET['action'] && 'hmbkp_edit_schedule_excludes' === $_GET['hmbkp_panel'] ) :
51
- require( HMBKP_PLUGIN_PATH . 'admin/schedule-form-excludes.php' );
52
- endif; ?>
53
-
54
- <?php // Show the service form if we are viewing one
55
- foreach ( Services::get_services( $schedule ) as $service ) : ?>
56
-
57
- <?php if ( 'hmbkp_edit_schedule' === $_GET['action'] && 'hmbkp_edit_schedule_settings_' . $service->get_slug() === $_GET['hmbkp_panel'] ) : ?>
58
-
59
- <h3><?php echo esc_html( $service->name ); ?></h3>
60
-
61
- <?php $hmbkp_form_errors = get_settings_errors();
62
-
63
- if ( ! empty( $hmbkp_form_errors ) ) :
64
-
65
- ?>
66
-
67
- <div id="hmbkp-warning" class="error settings-error">
68
-
69
- <?php foreach ( $hmbkp_form_errors as $error ) : ?>
70
- <p><strong><?php echo esc_html( $error ); ?></strong></p>
71
- <?php endforeach; ?>
72
-
73
- </div>
74
-
75
- <?php endif;
76
-
77
- // We can clear them now we've displayed them
78
- clear_settings_errors(); ?>
79
-
80
- <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
81
-
82
- <input type="hidden" name="hmbkp_schedule_id" value="<?php echo esc_attr( $schedule->get_id() ); ?>" />
83
- <input type="hidden" name="action" value="hmbkp_edit_schedule_services_submit" />
84
-
85
- <?php wp_nonce_field( 'hmbkp-edit-schedule-services', 'hmbkp-edit-schedule-services-nonce' ); ?>
86
-
87
- <?php $service->form(); ?>
88
-
89
- <?php submit_button( __( 'Done', 'backupwordpress' ) ); ?>
90
-
91
- </form>
92
-
93
- <?php break; ?>
94
-
95
- <?php endif; ?>
96
-
97
- <?php endforeach; ?>
98
-
99
- </div>
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ if ( Schedules::get_instance()->get_schedule( $schedule->get_id() ) ) { ?>
6
+
7
+ <div class="hmbkp-schedule-actions row-actions">
8
+
9
+ <?php if ( is_backup_possible() ) : ?>
10
+
11
+ <a class="hmbkp-run" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_run_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ), 'hmbkp_run_schedule', 'hmbkp_run_schedule_nonce' ) ); ?>"><?php _e( 'Run now', 'backupwordpress' ); ?></a> |
12
+
13
+ <?php endif; ?>
14
+
15
+ <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings', 'hmbkp_schedule_id' => $schedule->get_id() ), get_settings_url() ), 'hmbkp-edit-schedule' ); ?>"><?php _e( 'Settings', 'backupwordpress' ); ?></a> |
16
+
17
+ <?php
18
+
19
+ // Only show excludes if we are backing up files
20
+ if ( 'database' !== $schedule->get_type() ) : ?>
21
+ <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes', 'hmbkp_schedule_id' => $schedule->get_id() ), get_settings_url() ) ); ?>"><?php _e( 'Excludes', 'backupwordpress' ); ?></a> |
22
+ <?php endif; ?>
23
+
24
+ <?php foreach ( Services::get_services( $schedule ) as $service ) :
25
+
26
+ if ( ! $service->has_form() ) {
27
+ continue;
28
+ } ?>
29
+
30
+ <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings_' . $service->get_slug(), 'hmbkp_schedule_id' => $schedule->get_id() ), get_settings_url() ) ); ?>"><?php echo esc_html( $service->name ); ?></a> |
31
+
32
+ <?php endforeach; ?>
33
+
34
+ <a class="delete-action" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'hmbkp_request_delete_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-post.php' ) ), 'hmbkp_delete_schedule', 'hmbkp_delete_schedule_nonce' ) ); ?>"><?php _e( 'Delete', 'backupwordpress' ); ?></a>
35
+
36
+ </div>
37
+
38
+ <?php } ?>
39
+
40
+ <?php if ( ! isset( $_GET['action'] ) || 'hmbkp_edit_schedule' !== $_GET['action'] || ! isset( $_GET['hmbkp_panel'] ) ) {
41
+ return;
42
+ } ?>
43
+
44
+ <div class="hmbkp-schedule-settings">
45
+
46
+ <?php if ( 'hmbkp_edit_schedule' === $_GET['action'] && 'hmbkp_edit_schedule_settings' === $_GET['hmbkp_panel'] ) :
47
+ require( HMBKP_PLUGIN_PATH . 'admin/schedule-form.php' );
48
+ endif; ?>
49
+
50
+ <?php if ( 'hmbkp_edit_schedule' === $_GET['action'] && 'hmbkp_edit_schedule_excludes' === $_GET['hmbkp_panel'] ) :
51
+ require( HMBKP_PLUGIN_PATH . 'admin/schedule-form-excludes.php' );
52
+ endif; ?>
53
+
54
+ <?php // Show the service form if we are viewing one
55
+ foreach ( Services::get_services( $schedule ) as $service ) : ?>
56
+
57
+ <?php if ( 'hmbkp_edit_schedule' === $_GET['action'] && 'hmbkp_edit_schedule_settings_' . $service->get_slug() === $_GET['hmbkp_panel'] ) : ?>
58
+
59
+ <h3><?php echo esc_html( $service->name ); ?></h3>
60
+
61
+ <?php $hmbkp_form_errors = get_settings_errors();
62
+
63
+ if ( ! empty( $hmbkp_form_errors ) ) :
64
+
65
+ ?>
66
+
67
+ <div id="hmbkp-warning" class="error settings-error">
68
+
69
+ <?php foreach ( $hmbkp_form_errors as $error ) : ?>
70
+ <p><strong><?php echo esc_html( $error ); ?></strong></p>
71
+ <?php endforeach; ?>
72
+
73
+ </div>
74
+
75
+ <?php endif;
76
+
77
+ // We can clear them now we've displayed them
78
+ clear_settings_errors(); ?>
79
+
80
+ <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
81
+
82
+ <input type="hidden" name="hmbkp_schedule_id" value="<?php echo esc_attr( $schedule->get_id() ); ?>" />
83
+ <input type="hidden" name="action" value="hmbkp_edit_schedule_services_submit" />
84
+
85
+ <?php wp_nonce_field( 'hmbkp-edit-schedule-services', 'hmbkp-edit-schedule-services-nonce' ); ?>
86
+
87
+ <?php $service->form(); ?>
88
+
89
+ <?php submit_button( __( 'Done', 'backupwordpress' ) ); ?>
90
+
91
+ </form>
92
+
93
+ <?php break; ?>
94
+
95
+ <?php endif; ?>
96
+
97
+ <?php endforeach; ?>
98
+
99
+ </div>
admin/server-info.php CHANGED
@@ -1,63 +1,63 @@
1
- <?php
2
-
3
- foreach ( HM\BackUpWordPress\Requirements::get_requirement_groups() as $group ) : ?>
4
-
5
- <h3><?php echo esc_html( ucwords( $group ) ); ?></h3>
6
-
7
- <table class="fixed widefat">
8
-
9
- <tbody>
10
-
11
- <?php foreach ( HM\BackUpWordPress\Requirements::get_requirements( $group ) as $requirement ) : ?>
12
-
13
- <?php if ( ( is_string( $requirement->raw_result() ) && strlen( $requirement->result() ) < 20 ) || is_bool( $requirement->raw_result() ) ) : ?>
14
-
15
- <tr>
16
-
17
- <td><?php echo esc_html( $requirement->name() ); ?></td>
18
-
19
- <td>
20
- <code><?php echo esc_html( $requirement->result() ); ?></code>
21
- </td>
22
-
23
- </tr>
24
-
25
- <?php elseif ( is_array( $requirement->raw_result() ) ) : ?>
26
-
27
- <tr>
28
-
29
- <td><?php echo esc_html( $requirement->name() ); ?></td>
30
-
31
- <td>
32
- <ul>
33
-
34
- <pre><?php var_export( $requirement->raw_result() ); ?></pre>
35
-
36
- </ul>
37
- </td>
38
- </tr>
39
-
40
- <?php else : ?>
41
-
42
- <tr>
43
-
44
- <td colspan="2">
45
- <?php echo esc_html( $requirement->name() ); ?>
46
- <pre><?php echo esc_html( $requirement->result() ); ?></pre>
47
- </td>
48
-
49
- </tr>
50
-
51
- <?php endif; ?>
52
-
53
- <?php endforeach; ?>
54
-
55
- </tbody>
56
-
57
- </table>
58
-
59
- <?php endforeach;
60
-
61
- foreach ( HM\BackUpWordPress\Services::get_services() as $file => $service ) :
62
- echo wp_kses_post( call_user_func( array( $service, 'intercom_data_html' ) ) );
63
- endforeach;
1
+ <?php
2
+
3
+ foreach ( HM\BackUpWordPress\Requirements::get_requirement_groups() as $group ) : ?>
4
+
5
+ <h3><?php echo esc_html( ucwords( $group ) ); ?></h3>
6
+
7
+ <table class="fixed widefat">
8
+
9
+ <tbody>
10
+
11
+ <?php foreach ( HM\BackUpWordPress\Requirements::get_requirements( $group ) as $requirement ) : ?>
12
+
13
+ <?php if ( ( is_string( $requirement->raw_result() ) && strlen( $requirement->result() ) < 20 ) || is_bool( $requirement->raw_result() ) ) : ?>
14
+
15
+ <tr>
16
+
17
+ <td><?php echo esc_html( $requirement->name() ); ?></td>
18
+
19
+ <td>
20
+ <code><?php echo esc_html( $requirement->result() ); ?></code>
21
+ </td>
22
+
23
+ </tr>
24
+
25
+ <?php elseif ( is_array( $requirement->raw_result() ) ) : ?>
26
+
27
+ <tr>
28
+
29
+ <td><?php echo esc_html( $requirement->name() ); ?></td>
30
+
31
+ <td>
32
+ <ul>
33
+
34
+ <pre><?php var_export( $requirement->raw_result() ); ?></pre>
35
+
36
+ </ul>
37
+ </td>
38
+ </tr>
39
+
40
+ <?php else : ?>
41
+
42
+ <tr>
43
+
44
+ <td colspan="2">
45
+ <?php echo esc_html( $requirement->name() ); ?>
46
+ <pre><?php echo esc_html( $requirement->result() ); ?></pre>
47
+ </td>
48
+
49
+ </tr>
50
+
51
+ <?php endif; ?>
52
+
53
+ <?php endforeach; ?>
54
+
55
+ </tbody>
56
+
57
+ </table>
58
+
59
+ <?php endforeach;
60
+
61
+ foreach ( HM\BackUpWordPress\Services::get_services() as $file => $service ) :
62
+ echo wp_kses_post( call_user_func( array( $service, 'intercom_data_html' ) ) );
63
+ endforeach;
admin/upsell.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php namespace HM\BackUpWordPress; ?>
2
- <div class="hmbkp-upsell">
3
-
4
- <?php
5
- /** translators: the 1st placeholder is the first part of the anchor tag with the link to the plugin review page and the second is the closing anchor tag */
6
- $cta_message = sprintf(
7
- __( 'If you\'re finding BackUpWordPress useful, please %1$s rate it on the plugin directory%2$s.', 'backupwordpress' ),
8
- '<a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/backupwordpress">',
9
- '</a>'
10
- );
11
- ?>
12
- <div id="hmbkp-cta-message" class="updated notice is-dismissible">
13
- <p><?php echo wp_kses_post( $cta_message ); ?></p>
14
- <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'backupwordpress' ); ?></span></button>
15
- </div>
16
-
17
- </div>
1
+ <?php namespace HM\BackUpWordPress; ?>
2
+ <div class="hmbkp-upsell">
3
+
4
+ <?php
5
+ /** translators: the 1st placeholder is the first part of the anchor tag with the link to the plugin review page and the second is the closing anchor tag */
6
+ $cta_message = sprintf(
7
+ __( 'If you\'re finding BackUpWordPress useful, please %1$s rate it on the plugin directory%2$s.', 'backupwordpress' ),
8
+ '<a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/backupwordpress">',
9
+ '</a>'
10
+ );
11
+ ?>
12
+ <div id="hmbkp-cta-message" class="updated notice is-dismissible">
13
+ <p><?php echo wp_kses_post( $cta_message ); ?></p>
14
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'backupwordpress' ); ?></span></button>
15
+ </div>
16
+
17
+ </div>
assets/hmbkp.css CHANGED
@@ -1,87 +1,87 @@
1
- /*Constants Tab*/
2
- .hmbkp_active td:first-child > code:before { content: "\00a0 \2713 "; font-size: 11px; }
3
- .hmbkp_active { background: #E5F7E8; }
4
-
5
- /*Fix the bottom margin for warning messages in the admin*/
6
- div#hmbkp-warning, h2.nav-tab-wrapper + div[id^="hmbkp"] { margin: 20px 0 15px; }
7
- h2 + div[id^="hmbkp"] input { max-width: 100%; }
8
-
9
- li a.hmbkp-running:not(.current):before { width: 20px; height: 20px; margin: -1px 10px -5px 0; content: ""; background: transparent url('spinner-2x.gif') no-repeat 0 0; background-size: 20px; display: inline-block; }
10
-
11
- .hmbkp-upsell { margin-top: 40px; padding-top: 16px; border-top: 1px solid #ccc; }
12
-
13
- .hmbkp-schedule-sentence { font-size: 16px; margin: 0 0 20px 0; background-color: #FBFBFB; padding: 20px; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba( 0,0,0,.04 ); }
14
- .hmbkp-schedule-sentence::before { content: "\2714"; margin-right: 10px; width: 16px; height: 60px; display: block; float: left; }
15
- .hmbkp-schedule-sentence.hmbkp-error:before { content: "\2718"; }
16
- .hmbkp-schedule-sentence.hmbkp-running:before { width: 20px; height: 80px; margin: -1px 10px 0 0; content: ""; background: transparent url('spinner-2x.gif') no-repeat 0 0; background-size: 20px; display: inline-block; }
17
- .hmbkp-schedule-sentence .hmbkp-status { display: none; font-size: 12px; color: #666; margin: 2px 0 0 30px; }
18
- .hmbkp-schedule-sentence.hmbkp-running .hmbkp-status { display: block; }
19
- .hmbkp-schedule-sentence.hmbkp-running .hmbkp-schedule-actions { display: none; }
20
- .hmbkp-schedule-sentence *:not(a)[title] { border-bottom: 1px dotted #CCC; cursor: help; }
21
- .hmbkp-schedule-sentence .hmbkp-status[title] { border-bottom: none; }
22
- .hmbkp-schedule-sentence .submit { padding: 0; }
23
- .hmbkp-schedule-sentence .hmbkp-schedule-actions { visibility: visible; font-size: 12px; margin: 0 0 0 26px; padding: 10px 0 0; }
24
- .hmbkp-schedule-actions a { white-space: nowrap; }
25
- .hmbkp-schedule-sentence .row-actions { position: static; }
26
-
27
- .hmbkp-schedule-settings { border-top: 1px solid #e5e5e5; margin: 20px -20px -20px; background-color: #f5f5f5; padding: 0 20px 20px; }
28
-
29
- .hmbkp-ajax-loading, button.hmbkp-ajax-loading { padding-left: 20px; position: relative; }
30
- .hmbkp-ajax-loading::after { content: ""; width: 16px; height: 16px; background-image: url('spinner-2x.gif'); background-size: 16px 16px; background-repeat: no-repeat; background-position: 0 0; position: absolute; right: -30px; top: 5px; }
31
-
32
- .delete-action { color: #a00; transition: all 300ms ease; }
33
- .delete-action:hover .delete-action:focus { color: red; transition: all 300ms ease; }
34
-
35
- .strikethrough { text-decoration: line-through; }
36
-
37
- table.widefat tbody tr:nth-child(odd) { background-color: #f9f9f9 }
38
- .hmbkp-exclude-settings td:first-child, .hmbkp-exclude-settings th:first-child { width: 20px; padding-right: 0 }
39
- .hmbkp-exclude-settings thead tr:last-child { background-color: #f9f9f9; }
40
- .hmbkp-exclude-settings table .button-secondary { line-height: 18px; height: 20px; }
41
- thead td { border-bottom: 1px solid #e1e1e1; }
42
- .hmbkp-exclude-settings table .spinner { display: block; float: left; margin: 0; }
43
- .hmbkp-schedule-settings .column-format code { white-space: nowrap; }
44
-
45
- .column-filesize code { position: relative; }
46
- .column-filesize .dashicons-update { display: none; overflow: hidden; position: absolute; width: 100%; left: 0; text-align: center; background-color: rgba( 255, 255, 255, .8 ) }
47
- .column-filesize .dashicons-update span { display: none; }
48
- .column-filesize:hover .dashicons-update { display: inline-block; }
49
-
50
- .hmbkp-exclude-settings td span.reason { color: #CCC; }
51
-
52
- .server-info { overflow: auto; max-height: 50%; outline: black 1px solid; }
53
- .server-info pre { max-height: 100px; overflow-x:hidden; }
54
-
55
- .page-title-action span.dashicons-admin-users { position: relative; display:inline-block; vertical-align: middle; top:-2px; }
56
-
57
- pre { background-color: #eee; padding: 10px; white-space: pre; max-height: 320px; overflow: auto; word-wrap: normal !important; }
58
-
59
- @media screen and (max-width: 768px) {
60
-
61
- .wrap h2 {
62
- padding: 10px 0 0 0;
63
- }
64
-
65
- .hmbkp-schedule-sentence::before { height: 80px; }
66
-
67
- h2 .nav-tab {
68
- display: block;
69
- padding: 10px;
70
- margin: 0;
71
- }
72
-
73
- .hmbkp-schedule-sentence {
74
- margin: 10px 0;
75
- padding: 10px;
76
- }
77
- #intercom-info { display: none; }
78
- .hmbkp-schedule-settings { padding: 0 10px 10px; }
79
- .hmbkp-exclude-settings table { margin: 0 -10px; border-left: none; border-right: none; width: calc(100% + 20px) }
80
- .hmbkp-exclude-settings tr > *:first-child { display: none; }
81
- .hmbkp-schedule-settings tr *:nth-child(4), .hmbkp-schedule-settings tr *:nth-child(5) { display: none; }
82
- .hmbkp-schedule-settings thead tr:nth-child(2) { display: none; }
83
- .hmbkp-schedule-settings { margin-left: -10px; margin-right: -10px; margin-bottom: -10px; }
84
- table.widefat tbody tr:nth-child(even) { background-color: #fff }
85
- table.widefat tbody tr:nth-child(odd) { background-color: #f9f9f9 }
86
-
87
- }
1
+ /*Constants Tab*/
2
+ .hmbkp_active td:first-child > code:before { content: "\00a0 \2713 "; font-size: 11px; }
3
+ .hmbkp_active { background: #E5F7E8; }
4
+
5
+ /*Fix the bottom margin for warning messages in the admin*/
6
+ div#hmbkp-warning, h2.nav-tab-wrapper + div[id^="hmbkp"] { margin: 20px 0 15px; }
7
+ h2 + div[id^="hmbkp"] input { max-width: 100%; }
8
+
9
+ li a.hmbkp-running:not(.current):before { width: 20px; height: 20px; margin: -1px 10px -5px 0; content: ""; background: transparent url('spinner-2x.gif') no-repeat 0 0; background-size: 20px; display: inline-block; }
10
+
11
+ .hmbkp-upsell { margin-top: 40px; padding-top: 16px; border-top: 1px solid #ccc; }
12
+
13
+ .hmbkp-schedule-sentence { font-size: 16px; margin: 0 0 20px 0; background-color: #FBFBFB; padding: 20px; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba( 0,0,0,.04 ); }
14
+ .hmbkp-schedule-sentence::before { content: "\2714"; margin-right: 10px; width: 16px; height: 60px; display: block; float: left; }
15
+ .hmbkp-schedule-sentence.hmbkp-error:before { content: "\2718"; }
16
+ .hmbkp-schedule-sentence.hmbkp-running:before { width: 20px; height: 80px; margin: -1px 10px 0 0; content: ""; background: transparent url('spinner-2x.gif') no-repeat 0 0; background-size: 20px; display: inline-block; }
17
+ .hmbkp-schedule-sentence .hmbkp-status { display: none; font-size: 12px; color: #666; margin: 2px 0 0 30px; }
18
+ .hmbkp-schedule-sentence.hmbkp-running .hmbkp-status { display: block; }
19
+ .hmbkp-schedule-sentence.hmbkp-running .hmbkp-schedule-actions { display: none; }
20
+ .hmbkp-schedule-sentence *:not(a)[title] { border-bottom: 1px dotted #CCC; cursor: help; }
21
+ .hmbkp-schedule-sentence .hmbkp-status[title] { border-bottom: none; }
22
+ .hmbkp-schedule-sentence .submit { padding: 0; }
23
+ .hmbkp-schedule-sentence .hmbkp-schedule-actions { visibility: visible; font-size: 12px; margin: 0 0 0 26px; padding: 10px 0 0; }
24
+ .hmbkp-schedule-actions a { white-space: nowrap; }
25
+ .hmbkp-schedule-sentence .row-actions { position: static; }
26
+
27
+ .hmbkp-schedule-settings { border-top: 1px solid #e5e5e5; margin: 20px -20px -20px; background-color: #f5f5f5; padding: 0 20px 20px; }
28
+
29
+ .hmbkp-ajax-loading, button.hmbkp-ajax-loading { padding-left: 20px; position: relative; }
30
+ .hmbkp-ajax-loading::after { content: ""; width: 16px; height: 16px; background-image: url('spinner-2x.gif'); background-size: 16px 16px; background-repeat: no-repeat; background-position: 0 0; position: absolute; right: -30px; top: 5px; }
31
+
32
+ .delete-action { color: #a00; transition: all 300ms ease; }
33
+ .delete-action:hover .delete-action:focus { color: red; transition: all 300ms ease; }
34
+
35
+ .strikethrough { text-decoration: line-through; }
36
+
37
+ table.widefat tbody tr:nth-child(odd) { background-color: #f9f9f9 }
38
+ .hmbkp-exclude-settings td:first-child, .hmbkp-exclude-settings th:first-child { width: 20px; padding-right: 0 }
39
+ .hmbkp-exclude-settings thead tr:last-child { background-color: #f9f9f9; }
40
+ .hmbkp-exclude-settings table .button-secondary { line-height: 18px; height: 20px; }
41
+ thead td { border-bottom: 1px solid #e1e1e1; }
42
+ .hmbkp-exclude-settings table .spinner { display: block; float: left; margin: 0; }
43
+ .hmbkp-schedule-settings .column-format code { white-space: nowrap; }
44
+
45
+ .column-filesize code { position: relative; }
46
+ .column-filesize .dashicons-update { display: none; overflow: hidden; position: absolute; width: 100%; left: 0; text-align: center; background-color: rgba( 255, 255, 255, .8 ) }
47
+ .column-filesize .dashicons-update span { display: none; }
48
+ .column-filesize:hover .dashicons-update { display: inline-block; }
49
+
50
+ .hmbkp-exclude-settings td span.reason { color: #CCC; }
51
+
52
+ .server-info { overflow: auto; max-height: 50%; outline: black 1px solid; }
53
+ .server-info pre { max-height: 100px; overflow-x:hidden; }
54
+
55
+ .page-title-action span.dashicons-admin-users { position: relative; display:inline-block; vertical-align: middle; top:-2px; }
56
+
57
+ pre { background-color: #eee; padding: 10px; white-space: pre; max-height: 320px; overflow: auto; word-wrap: normal !important; }
58
+
59
+ @media screen and (max-width: 768px) {
60
+
61
+ .wrap h2 {
62
+ padding: 10px 0 0 0;
63
+ }
64
+
65
+ .hmbkp-schedule-sentence::before { height: 80px; }
66
+
67
+ h2 .nav-tab {
68
+ display: block;
69
+ padding: 10px;
70
+ margin: 0;
71
+ }
72
+
73
+ .hmbkp-schedule-sentence {
74
+ margin: 10px 0;
75
+ padding: 10px;
76
+ }
77
+ #intercom-info { display: none; }
78
+ .hmbkp-schedule-settings { padding: 0 10px 10px; }
79
+ .hmbkp-exclude-settings table { margin: 0 -10px; border-left: none; border-right: none; width: calc(100% + 20px) }
80
+ .hmbkp-exclude-settings tr > *:first-child { display: none; }
81
+ .hmbkp-schedule-settings tr *:nth-child(4), .hmbkp-schedule-settings tr *:nth-child(5) { display: none; }
82
+ .hmbkp-schedule-settings thead tr:nth-child(2) { display: none; }
83
+ .hmbkp-schedule-settings { margin-left: -10px; margin-right: -10px; margin-bottom: -10px; }
84
+ table.widefat tbody tr:nth-child(even) { background-color: #fff }
85
+ table.widefat tbody tr:nth-child(odd) { background-color: #f9f9f9 }
86
+
87
+ }
assets/hmbkp.js CHANGED
@@ -1,201 +1,201 @@
1
- var BackUpWordPressAdmin = (function($){
2
- 'use strict';
3
-
4
- var recurrenceType;
5
-
6
- function init(){
7
-
8
- recurrenceType = $( 'select#hmbkp_schedule_recurrence_type' );
9
- // Don't ever cache ajax requests
10
- $.ajaxSetup( {'cache': false} );
11
-
12
- if ( recurrenceType.length ) {
13
-
14
- hmbkpToggleScheduleFields( recurrenceType.val() );
15
-
16
- $( document ).on( 'change', 'select#hmbkp_schedule_recurrence_type', function () {
17
- hmbkpToggleScheduleFields( $( this ).val() );
18
- } );
19
-
20
- }
21
-
22
- $('.notice.is-dismissible').on('click', '.notice-dismiss', function(){
23
- $.post(
24
- ajaxurl,
25
- {
26
- 'action': 'hmbkp_dismiss_notice'
27
- }
28
- );
29
- });
30
-
31
- // Show delete confirm message for delete schedule
32
- $( document ).on( 'click', '.hmbkp-schedule-actions .delete-action', function ( e ) {
33
-
34
- if ( ! confirm( hmbkp.delete_schedule ) ) {
35
- e.preventDefault();
36
- }
37
-
38
- } );
39
-
40
- // Show delete confirm message for delete backup
41
- $( document ).on( 'click', '.hmbkp_manage_backups_row .delete-action', function ( e ) {
42
-
43
- if ( ! confirm( hmbkp.delete_backup ) ) {
44
- e.preventDefault();
45
- }
46
-
47
- } );
48
-
49
- // Show delete confirm message for remove exclude rule
50
- $( document ).on( 'click', '.hmbkp-edit-schedule-excludes-form .delete-action', function ( e ) {
51
-
52
- if ( ! confirm( hmbkp.remove_exclude_rule ) ) {
53
- e.preventDefault();
54
- }
55
-
56
- } );
57
-
58
- // Test the cron response using ajax
59
- $.post( ajaxurl, {'nonce': hmbkp.nonce, 'action': 'hmbkp_cron_test'},
60
- function ( data ) {
61
- if ( data !== '1' ) {
62
- $( '.wrap > h2' ).after( data );
63
- }
64
- }
65
- );
66
-
67
- // Run a backup
68
- $( document ).on( 'click', '.hmbkp-run', function ( e ) {
69
- wp.heartbeat.interval( 'fast' );
70
- $( this ).closest( '.hmbkp-schedule-sentence' ).addClass( 'hmbkp-running' );
71
-
72
- $( '.hmbkp-error' ).removeClass( 'hmbkp-error' );
73
-
74
- var scheduleId = $( '[data-hmbkp-schedule-id]' ).attr( 'data-hmbkp-schedule-id' );
75
-
76
- $.post(
77
- ajaxurl,
78
- {
79
- 'hmbkp_run_schedule_nonce': hmbkp.hmbkp_run_schedule_nonce,
80
- 'action': 'hmbkp_run_schedule',
81
- 'hmbkp_schedule_id': scheduleId
82
- }
83
- );
84
-
85
- e.preventDefault();
86
-
87
- } );
88
-
89
- // Send the schedule id with the heartbeat
90
- $( document ).on( 'heartbeat-send', function ( e, data ) {
91
-
92
- data.hmbkp_schedule_id = $( '[data-hmbkp-schedule-id]' ).attr( 'data-hmbkp-schedule-id' );
93
-
94
- if ( $( '.hmbkp-schedule-sentence.hmbkp-running' ).length ) {
95
- data.hmbkp_is_in_progress = true;
96
- } else {
97
- data.hmbkp_client_request = 'site_size';
98
- }
99
-
100
- } );
101
-
102
- // Update schedule status on heartbeat tick
103
- $( document ).on( 'heartbeat-tick', function ( e, data ) {
104
-
105
- // If the schedule has finished then reload the page
106
- if ( data.hmbkp_schedule_status === 0 && ! $( '.hmbkp-error' ).length ) {
107
- location.reload( true );
108
- }
109
-
110
- // If the schedule is still running then update the schedule status
111
- if ( ( data.hmbkp_schedule_status !== 0 ) && ( data.hmbkp_schedule_status !== undefined ) ) {
112
- $( '.hmbkp-status' ).replaceWith( data.hmbkp_schedule_status );
113
- }
114
-
115
- if ( ( data.hmbkp_site_size !== undefined ) && ( $( 'code.calculating' ).length ) ) {
116
- $( 'code.calculating' ).text( data.hmbkp_site_size );
117
- var excludes = $( '.hmbkp-exclude-settings' );
118
- if ( excludes.length ) {
119
- excludes.replaceWith( data.hmbkp_dir_sizes );
120
- }
121
- }
122
-
123
- } );
124
-
125
- // Closing ThickBox Modal Window
126
- $( document ).on( 'click', '.hmbkp-thickbox-close', function ( e ) {
127
-
128
- e.preventDefault();
129
- window.parent.tb_remove();
130
-
131
- } );
132
-
133
- $( document ).on( 'click', '[id^="hmbkp-warning-"] .notice-dismiss', function(){
134
- $.post(
135
- ajaxurl,
136
- {
137
- 'action': 'hmbkp_dismiss_error'
138
- }
139
- );
140
- } );
141
-
142
- }
143
-
144
- function hmbkpToggleScheduleFields( recurrence ) {
145
-
146
- recurrence = (
147
- typeof recurrence !== 'undefined'
148
- ) ? recurrence : 'manually';
149
-
150
- var settingFields = jQuery( '.recurring-setting' );
151
- var scheduleSettingFields = jQuery( '#schedule-start' );
152
- var twiceDailyNote = jQuery( '.twice-js' );
153
-
154
- switch ( recurrence ) {
155
-
156
- case 'manually':
157
- settingFields.hide();
158
- break;
159
-
160
- case 'hourly' :
161
- settingFields.hide();
162
- break;
163
-
164
- case 'daily' :
165
- settingFields.hide();
166
- scheduleSettingFields.show();
167
- twiceDailyNote.hide();
168
- break;
169
-
170
- case 'twicedaily' :
171
- settingFields.hide();
172
- scheduleSettingFields.show();
173
- twiceDailyNote.show();
174
- break;
175
-
176
- case 'weekly' : // fall through
177
- case 'fortnightly' :
178
- settingFields.hide();
179
- jQuery( '#start-day' ).show();
180
- scheduleSettingFields.show();
181
- twiceDailyNote.hide();
182
- break;
183
-
184
- case 'monthly' :
185
- settingFields.hide();
186
- scheduleSettingFields.show();
187
- jQuery( '#start-date' ).show();
188
- twiceDailyNote.hide();
189
- break;
190
-
191
- }
192
-
193
- }
194
-
195
- return {
196
- init: init
197
- };
198
-
199
- })(jQuery);
200
-
201
- jQuery( document ).ready( BackUpWordPressAdmin.init );
1
+ var BackUpWordPressAdmin = (function($){
2
+ 'use strict';
3
+
4
+ var recurrenceType;
5
+
6
+ function init(){
7
+
8
+ recurrenceType = $( 'select#hmbkp_schedule_recurrence_type' );
9
+ // Don't ever cache ajax requests
10
+ $.ajaxSetup( {'cache': false} );
11
+
12
+ if ( recurrenceType.length ) {
13
+
14
+ hmbkpToggleScheduleFields( recurrenceType.val() );
15
+
16
+ $( document ).on( 'change', 'select#hmbkp_schedule_recurrence_type', function () {
17
+ hmbkpToggleScheduleFields( $( this ).val() );
18
+ } );
19
+
20
+ }
21
+
22
+ $('.notice.is-dismissible').on('click', '.notice-dismiss', function(){
23
+ $.post(
24
+ ajaxurl,
25
+ {
26
+ 'action': 'hmbkp_dismiss_notice'
27
+ }
28
+ );
29
+ });
30
+
31
+ // Show delete confirm message for delete schedule
32
+ $( document ).on( 'click', '.hmbkp-schedule-actions .delete-action', function ( e ) {
33
+
34
+ if ( ! confirm( hmbkp.delete_schedule ) ) {
35
+ e.preventDefault();
36
+ }
37
+
38
+ } );
39
+
40
+ // Show delete confirm message for delete backup
41
+ $( document ).on( 'click', '.hmbkp_manage_backups_row .delete-action', function ( e ) {
42
+
43
+ if ( ! confirm( hmbkp.delete_backup ) ) {
44
+ e.preventDefault();
45
+ }
46
+
47
+ } );
48
+
49
+ // Show delete confirm message for remove exclude rule
50
+ $( document ).on( 'click', '.hmbkp-edit-schedule-excludes-form .delete-action', function ( e ) {
51
+
52
+ if ( ! confirm( hmbkp.remove_exclude_rule ) ) {
53
+ e.preventDefault();
54
+ }
55
+
56
+ } );
57
+
58
+ // Test the cron response using ajax
59
+ $.post( ajaxurl, {'nonce': hmbkp.nonce, 'action': 'hmbkp_cron_test'},
60
+ function ( data ) {
61
+ if ( data !== '1' ) {
62
+ $( '.wrap > h2' ).after( data );
63
+ }
64
+ }
65
+ );
66
+
67
+ // Run a backup
68
+ $( document ).on( 'click', '.hmbkp-run', function ( e ) {
69
+ wp.heartbeat.interval( 'fast' );
70
+ $( this ).closest( '.hmbkp-schedule-sentence' ).addClass( 'hmbkp-running' );
71
+
72
+ $( '.hmbkp-error' ).removeClass( 'hmbkp-error' );
73
+
74
+ var scheduleId = $( '[data-hmbkp-schedule-id]' ).attr( 'data-hmbkp-schedule-id' );
75
+
76
+ $.post(
77
+ ajaxurl,
78
+ {
79
+ 'hmbkp_run_schedule_nonce': hmbkp.hmbkp_run_schedule_nonce,
80
+ 'action': 'hmbkp_run_schedule',
81
+ 'hmbkp_schedule_id': scheduleId
82
+ }
83
+ );
84
+
85
+ e.preventDefault();
86
+
87
+ } );
88
+
89
+ // Send the schedule id with the heartbeat
90
+ $( document ).on( 'heartbeat-send', function ( e, data ) {
91
+
92
+ data.hmbkp_schedule_id = $( '[data-hmbkp-schedule-id]' ).attr( 'data-hmbkp-schedule-id' );
93
+
94
+ if ( $( '.hmbkp-schedule-sentence.hmbkp-running' ).length ) {
95
+ data.hmbkp_is_in_progress = true;
96
+ } else {
97
+ data.hmbkp_client_request = 'site_size';
98
+ }
99
+
100
+ } );
101
+
102
+ // Update schedule status on heartbeat tick
103
+ $( document ).on( 'heartbeat-tick', function ( e, data ) {
104
+
105
+ // If the schedule has finished then reload the page
106
+ if ( data.hmbkp_schedule_status === 0 && ! $( '.hmbkp-error' ).length ) {
107
+ location.reload( true );
108
+ }
109
+
110
+ // If the schedule is still running then update the schedule status
111
+ if ( ( data.hmbkp_schedule_status !== 0 ) && ( data.hmbkp_schedule_status !== undefined ) ) {
112
+ $( '.hmbkp-status' ).replaceWith( data.hmbkp_schedule_status );
113
+ }
114
+
115
+ if ( ( data.hmbkp_site_size !== undefined ) && ( $( 'code.calculating' ).length ) ) {
116
+ $( 'code.calculating' ).text( data.hmbkp_site_size );
117
+ var excludes = $( '.hmbkp-exclude-settings' );
118
+ if ( excludes.length ) {
119
+ excludes.replaceWith( data.hmbkp_dir_sizes );
120
+ }
121
+ }
122
+
123
+ } );
124
+
125
+ // Closing ThickBox Modal Window
126
+ $( document ).on( 'click', '.hmbkp-thickbox-close', function ( e ) {
127
+
128
+ e.preventDefault();
129
+ window.parent.tb_remove();
130
+
131
+ } );
132
+
133
+ $( document ).on( 'click', '[id^="hmbkp-warning-"] .notice-dismiss', function(){
134
+ $.post(
135
+ ajaxurl,
136
+ {
137
+ 'action': 'hmbkp_dismiss_error'
138
+ }
139
+ );
140
+ } );
141
+
142
+ }
143
+
144
+ function hmbkpToggleScheduleFields( recurrence ) {
145
+
146
+ recurrence = (
147
+ typeof recurrence !== 'undefined'
148
+ ) ? recurrence : 'manually';
149
+
150
+ var settingFields = jQuery( '.recurring-setting' );
151
+ var scheduleSettingFields = jQuery( '#schedule-start' );
152
+ var twiceDailyNote = jQuery( '.twice-js' );
153
+
154
+ switch ( recurrence ) {
155
+
156
+ case 'manually':
157
+ settingFields.hide();
158
+ break;
159
+
160
+ case 'hourly' :
161
+ settingFields.hide();
162
+ break;
163
+
164
+ case 'daily' :
165
+ settingFields.hide();
166
+ scheduleSettingFields.show();
167
+ twiceDailyNote.hide();
168
+ break;
169
+
170
+ case 'twicedaily' :
171
+ settingFields.hide();
172
+ scheduleSettingFields.show();
173
+ twiceDailyNote.show();
174
+ break;
175
+
176
+ case 'weekly' : // fall through
177
+ case 'fortnightly' :
178
+ settingFields.hide();
179
+ jQuery( '#start-day' ).show();
180
+ scheduleSettingFields.show();
181
+ twiceDailyNote.hide();
182
+ break;
183
+
184
+ case 'monthly' :
185
+ settingFields.hide();
186
+ scheduleSettingFields.show();
187
+ jQuery( '#start-date' ).show();
188
+ twiceDailyNote.hide();
189
+ break;
190
+
191
+ }
192
+
193
+ }
194
+
195
+ return {
196
+ init: init
197
+ };
198
+
199
+ })(jQuery);
200
+
201
+ jQuery( document ).ready( BackUpWordPressAdmin.init );
backdrop/README.md ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Backdrop
2
+ Backdrop is a simple library that does one thing: allows you to run one-off
3
+ tasks in the background.
4
+
5
+ ## How to Use
6
+ ```php
7
+ function my_awesome_function( $id ) {
8
+ // Download initial data to my site. Might take a long time!
9
+ $data = wp_remote_get( 'http://example.com/' . $id );
10
+
11
+ if ( is_wp_error( $data ) ) {
12
+ return $data;
13
+ }
14
+
15
+ update_option( 'initial_data', $data );
16
+ }
17
+
18
+ add_action( 'init', function () {
19
+ if ( ! get_option( 'initial_data' ) ) {
20
+ $task = new \HM\Backdrop\Task( 'my_awesome_function', get_current_user_id() );
21
+ $task->schedule();
22
+ }
23
+ } );
24
+ ```
25
+
26
+ ## API
27
+ ### `Task::__construct( $callback [, $...] )`
28
+ Creating a new task sets up all of the internal data for your task. Pass in your
29
+ callback followed by your arguments to the function, and Backdrop will call it
30
+ in a background process.
31
+
32
+ #### Arguments
33
+ * `$callback`: Callback method you want to use. Can be any callable type
34
+ (including object methods and static methods) **except for anonymous
35
+ functions**. Closures cannot be serialized, so they cannot be used for
36
+ Backdrop callbacks. This is an internal PHP limitation.
37
+ * `$...`: Any other arguments you'd like to pass to your callback, as variable
38
+ arguments. e.g. `new Task( 'a', 'b', 'c', 'd' )` maps to `a( 'b', 'c', 'd' )`
39
+
40
+ #### Return Value
41
+ None (constructor).
42
+
43
+ ### `Task::schedule()`
44
+ Schedules your task to run. Typically runs after your page has been rendered, in
45
+ a separate process.
46
+
47
+ Backdrop de-duplicates tasks based on the arguments passed in. For example, you
48
+ can do `new Task( 'myfunc', 1 )` on every request, and only one will be run.
49
+ After this has been run, the next call will schedule again.
50
+
51
+ To avoid this, you should pass in unique identifiers as needed. Everything that
52
+ makes your task unique should be passed in and used by your function, as global
53
+ state may change.
54
+
55
+ #### Arguments
56
+ None.
57
+
58
+ #### Return Value
59
+ Either `true`, or a `WP_Error` on failure. The error object will indicate the
60
+ type of error; typically this is a `hm_backdrop_scheduled` if the task is
61
+ already scheduled to run or is currently running.
62
+
63
+ ### `Task::is_scheduled()`
64
+ Checks whether your task is scheduled to run.
65
+
66
+ #### Arguments
67
+ None.
68
+
69
+ #### Return Value
70
+ Boolean indicating whether your task is scheduled to run, or is already running.
71
+
72
+ #### `Task::cancel()`
73
+ Cancels a previously scheduled task.
74
+
75
+ Note that if the task is already running, this will not cancel execution; it
76
+ simply removes it from the tasks scheduled to run.
77
+
78
+ #### Arguments
79
+ None.
80
+
81
+ #### Return Value
82
+ Either `true`, or a `WP_Error` on failure. The error object will indicate the
83
+ type of error; typically this is a `hm_backdrop_not_scheduled` if the task
84
+ hasn't been scheduled.
85
+
86
+ ## Compatibility
87
+ Backdrop is compatible with PHP 5.2 and upwards.
88
+
89
+ ### PHP 5.2
90
+ Use the `HM_Backdrop_Task` class (and `HM_Backdrop_Server`).
91
+
92
+ **Important note:** If subclassing `HM_Backdrop_Server` with 5.2 compatibility,
93
+ you *must* reimplement the `spawn` method, as PHP 5.2 does not include late
94
+ static bindings. This is automatically handled for 5.3+.
95
+
96
+ Here's a minimal implementation that you can use:
97
+
98
+ ```
99
+ class MyBackdrop_Server extends HM_Backdrop_Server {
100
+ public static function spawn() {
101
+ return self::spawn_run( __CLASS__ );
102
+ }
103
+ }
104
+ ```
105
+
106
+ ### PHP 5.3+
107
+ Use the `HM\Backdrop\Task` class (and `HM\Backdrop\Server`). You can also import
108
+ the classes with the `use` keyword; for example, `use HM\Backdrop\Task` will
109
+ allow you to create tasks with `new Task`.
110
+
111
+ ## License
112
+ Backdrop is licensed under the GPL version 2.
113
+
114
+ Copyright 2014 Human Made Limited
backdrop/hm-backdrop.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- require dirname( __FILE__ ) . '/server.php';
4
- require dirname( __FILE__ ) . '/task.php';
5
-
6
- if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
7
- require dirname( __FILE__ ) . '/namespace.php';
8
- add_action( 'wp_ajax_nopriv_hm_backdrop_run', 'HM\Backdrop\Server::spawn' );
9
- }
10
- else {
11
- add_action( 'wp_ajax_nopriv_hm_backdrop_run', 'HM_Backdrop_Server::spawn' );
12
- }
1
+ <?php
2
+
3
+ require dirname( __FILE__ ) . '/server.php';
4
+ require dirname( __FILE__ ) . '/task.php';
5
+
6
+ if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
7
+ require dirname( __FILE__ ) . '/namespace.php';
8
+ add_action( 'wp_ajax_nopriv_hm_backdrop_run', 'HM\Backdrop\Server::spawn' );
9
+ }
10
+ else {
11
+ add_action( 'wp_ajax_nopriv_hm_backdrop_run', 'HM_Backdrop_Server::spawn' );
12
+ }
backdrop/license.txt CHANGED
@@ -1,340 +1,340 @@
1
-
2
- GNU GENERAL PUBLIC LICENSE
3
- Version 2, June 1991
4
-
5
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
6
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7
- Everyone is permitted to copy and distribute verbatim copies
8
- of this license document, but changing it is not allowed.
9
-
10
- Preamble
11
-
12
- The licenses for most software are designed to take away your
13
- freedom to share and change it. By contrast, the GNU General Public
14
- License is intended to guarantee your freedom to share and change free
15
- software--to make sure the software is free for all its users. This
16
- General Public License applies to most of the Free Software
17
- Foundation's software and to any other program whose authors commit to
18
- using it. (Some other Free Software Foundation software is covered by
19
- the GNU Lesser General Public License instead.) You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- this service if you wish), that you receive source code or can get it
26
- if you want it, that you can change the software or use pieces of it
27
- in new free programs; and that you know you can do these things.
28
-
29
- To protect your rights, we need to make restrictions that forbid
30
- anyone to deny you these rights or to ask you to surrender the rights.
31
- These restrictions translate to certain responsibilities for you if you
32
- distribute copies of the software, or if you modify it.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must give the recipients all the rights that
36
- you have. You must make sure that they, too, receive or can get the
37
- source code. And you must show them these terms so they know their
38
- rights.
39
-
40
- We protect your rights with two steps: (1) copyright the software, and
41
- (2) offer you this license which gives you legal permission to copy,
42
- distribute and/or modify the software.
43
-
44
- Also, for each author's protection and ours, we want to make certain
45
- that everyone understands that there is no warranty for this free
46
- software. If the software is modified by someone else and passed on, we
47
- want its recipients to know that what they have is not the original, so
48
- that any problems introduced by others will not reflect on the original
49
- authors' reputations.
50
-
51
- Finally, any free program is threatened constantly by software
52
- patents. We wish to avoid the danger that redistributors of a free
53
- program will individually obtain patent licenses, in effect making the
54
- program proprietary. To prevent this, we have made it clear that any
55
- patent must be licensed for everyone's free use or not licensed at all.
56
-
57
- The precise terms and conditions for copying, distribution and
58
- modification follow.
59
-
60
- GNU GENERAL PUBLIC LICENSE
61
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62
-
63
- 0. This License applies to any program or other work which contains
64
- a notice placed by the copyright holder saying it may be distributed
65
- under the terms of this General Public License. The "Program", below,
66
- refers to any such program or work, and a "work based on the Program"
67
- means either the Program or any derivative work under copyright law:
68
- that is to say, a work containing the Program or a portion of it,
69
- either verbatim or with modifications and/or translated into another
70
- language. (Hereinafter, translation is included without limitation in
71
- the term "modification".) Each licensee is addressed as "you".
72
-
73
- Activities other than copying, distribution and modification are not
74
- covered by this License; they are outside its scope. The act of
75
- running the Program is not restricted, and the output from the Program
76
- is covered only if its contents constitute a work based on the
77
- Program (independent of having been made by running the Program).
78
- Whether that is true depends on what the Program does.
79
-
80
- 1. You may copy and distribute verbatim copies of the Program's
81
- source code as you receive it, in any medium, provided that you
82
- conspicuously and appropriately publish on each copy an appropriate
83
- copyright notice and disclaimer of warranty; keep intact all the
84
- notices that refer to this License and to the absence of any warranty;
85
- and give any other recipients of the Program a copy of this License
86
- along with the Program.
87
-
88
- You may charge a fee for the physical act of transferring a copy, and
89
- you may at your option offer warranty protection in exchange for a fee.
90
-
91
- 2. You may modify your copy or copies of the Program or any portion
92
- of it, thus forming a work based on the Program, and copy and
93
- distribute such modifications or work under the terms of Section 1
94
- above, provided that you also meet all of these conditions:
95
-
96
- a) You must cause the modified files to carry prominent notices
97
- stating that you changed the files and the date of any change.
98
-
99
- b) You must cause any work that you distribute or publish, that in
100
- whole or in part contains or is derived from the Program or any
101
- part thereof, to be licensed as a whole at no charge to all third
102
- parties under the terms of this License.
103
-
104
- c) If the modified program normally reads commands interactively
105
- when run, you must cause it, when started running for such
106
- interactive use in the most ordinary way, to print or display an
107
- announcement including an appropriate copyright notice and a
108
- notice that there is no warranty (or else, saying that you provide
109
- a warranty) and that users may redistribute the program under
110
- these conditions, and telling the user how to view a copy of this
111
- License. (Exception: if the Program itself is interactive but
112
- does not normally print such an announcement, your work based on
113
- the Program is not required to print an announcement.)
114
-
115
- These requirements apply to the modified work as a whole. If
116
- identifiable sections of that work are not derived from the Program,
117
- and can be reasonably considered independent and separate works in
118
- themselves, then this License, and its terms, do not apply to those
119
- sections when you distribute them as separate works. But when you
120
- distribute the same sections as part of a whole which is a work based
121
- on the Program, the distribution of the whole must be on the terms of
122
- this License, whose permissions for other licensees extend to the
123
- entire whole, and thus to each and every part regardless of who wrote it.
124
-
125
- Thus, it is not the intent of this section to claim rights or contest
126
- your rights to work written entirely by you; rather, the intent is to
127
- exercise the right to control the distribution of derivative or
128
- collective works based on the Program.
129
-
130
- In addition, mere aggregation of another work not based on the Program
131
- with the Program (or with a work based on the Program) on a volume of
132
- a storage or distribution medium does not bring the other work under
133
- the scope of this License.
134
-
135
- 3. You may copy and distribute the Program (or a work based on it,
136
- under Section 2) in object code or executable form under the terms of
137
- Sections 1 and 2 above provided that you also do one of the following:
138
-
139
- a) Accompany it with the complete corresponding machine-readable
140
- source code, which must be distributed under the terms of Sections
141
- 1 and 2 above on a medium customarily used for software interchange; or,
142
-
143
- b) Accompany it with a written offer, valid for at least three
144
- years, to give any third party, for a charge no more than your
145
- cost of physically performing source distribution, a complete
146
- machine-readable copy of the corresponding source code, to be
147
- distributed under the terms of Sections 1 and 2 above on a medium
148
- customarily used for software interchange; or,
149
-
150
- c) Accompany it with the information you received as to the offer
151
- to distribute corresponding source code. (This alternative is
152
- allowed only for noncommercial distribution and only if you
153
- received the program in object code or executable form with such
154
- an offer, in accord with Subsection b above.)
155
-
156
- The source code for a work means the preferred form of the work for
157
- making modifications to it. For an executable work, complete source
158
- code means all the source code for all modules it contains, plus any
159
- associated interface definition files, plus the scripts used to
160
- control compilation and installation of the executable. However, as a
161
- special exception, the source code distributed need not include
162
- anything that is normally distributed (in either source or binary
163
- form) with the major components (compiler, kernel, and so on) of the
164
- operating system on which the executable runs, unless that component
165
- itself accompanies the executable.
166
-
167
- If distribution of executable or object code is made by offering
168
- access to copy from a designated place, then offering equivalent
169
- access to copy the source code from the same place counts as
170
- distribution of the source code, even though third parties are not
171
- compelled to copy the source along with the object code.
172
-
173
- 4. You may not copy, modify, sublicense, or distribute the Program
174
- except as expressly provided under this License. Any attempt
175
- otherwise to copy, modify, sublicense or distribute the Program is
176
- void, and will automatically terminate your rights under this License.
177
- However, parties who have received copies, or rights, from you under
178
- this License will not have their licenses terminated so long as such
179
- parties remain in full compliance.
180
-
181
- 5. You are not required to accept this License, since you have not
182
- signed it. However, nothing else grants you permission to modify or
183
- distribute the Program or its derivative works. These actions are
184
- prohibited by law if you do not accept this License. Therefore, by
185
- modifying or distributing the Program (or any work based on the
186
- Program), you indicate your acceptance of this License to do so, and
187
- all its terms and conditions for copying, distributing or modifying
188
- the Program or works based on it.
189
-
190
- 6. Each time you redistribute the Program (or any work based on the
191
- Program), the recipient automatically receives a license from the
192
- original licensor to copy, distribute or modify the Program subject to
193
- these terms and conditions. You may not impose any further
194
- restrictions on the recipients' exercise of the rights granted herein.
195
- You are not responsible for enforcing compliance by third parties to
196
- this License.
197
-
198
- 7. If, as a consequence of a court judgment or allegation of patent
199
- infringement or for any other reason (not limited to patent issues),
200
- conditions are imposed on you (whether by court order, agreement or
201
- otherwise) that contradict the conditions of this License, they do not
202
- excuse you from the conditions of this License. If you cannot
203
- distribute so as to satisfy simultaneously your obligations under this
204
- License and any other pertinent obligations, then as a consequence you
205
- may not distribute the Program at all. For example, if a patent
206
- license would not permit royalty-free redistribution of the Program by
207
- all those who receive copies directly or indirectly through you, then
208
- the only way you could satisfy both it and this License would be to
209
- refrain entirely from distribution of the Program.
210
-
211
- If any portion of this section is held invalid or unenforceable under
212
- any particular circumstance, the balance of the section is intended to
213
- apply and the section as a whole is intended to apply in other
214
- circumstances.
215
-
216
- It is not the purpose of this section to induce you to infringe any
217
- patents or other property right claims or to contest validity of any
218
- such claims; this section has the sole purpose of protecting the
219
- integrity of the free software distribution system, which is
220
- implemented by public license practices. Many people have made
221
- generous contributions to the wide range of software distributed
222
- through that system in reliance on consistent application of that
223
- system; it is up to the author/donor to decide if he or she is willing
224
- to distribute software through any other system and a licensee cannot
225
- impose that choice.
226
-
227
- This section is intended to make thoroughly clear what is believed to
228
- be a consequence of the rest of this License.
229
-
230
- 8. If the distribution and/or use of the Program is restricted in
231
- certain countries either by patents or by copyrighted interfaces, the
232
- original copyright holder who places the Program under this License
233
- may add an explicit geographical distribution limitation excluding
234
- those countries, so that distribution is permitted only in or among
235
- countries not thus excluded. In such case, this License incorporates
236
- the limitation as if written in the body of this License.
237
-
238
- 9. The Free Software Foundation may publish revised and/or new versions
239
- of the General Public License from time to time. Such new versions will
240
- be similar in spirit to the present version, but may differ in detail to
241
- address new problems or concerns.
242
-
243
- Each version is given a distinguishing version number. If the Program
244
- specifies a version number of this License which applies to it and "any
245
- later version", you have the option of following the terms and conditions
246
- either of that version or of any later version published by the Free
247
- Software Foundation. If the Program does not specify a version number of
248
- this License, you may choose any version ever published by the Free Software
249
- Foundation.
250
-
251
- 10. If you wish to incorporate parts of the Program into other free
252
- programs whose distribution conditions are different, write to the author
253
- to ask for permission. For software which is copyrighted by the Free
254
- Software Foundation, write to the Free Software Foundation; we sometimes
255
- make exceptions for this. Our decision will be guided by the two goals
256
- of preserving the free status of all derivatives of our free software and
257
- of promoting the sharing and reuse of software generally.
258
-
259
- NO WARRANTY
260
-
261
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
262
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
263
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
264
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
265
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
266
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
267
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
268
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
269
- REPAIR OR CORRECTION.
270
-
271
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
272
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
273
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
274
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
275
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
276
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
277
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
278
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
279
- POSSIBILITY OF SUCH DAMAGES.
280
-
281
- END OF TERMS AND CONDITIONS
282
-
283
- How to Apply These Terms to Your New Programs
284
-
285
- If you develop a new program, and you want it to be of the greatest
286
- possible use to the public, the best way to achieve this is to make it
287
- free software which everyone can redistribute and change under these terms.
288
-
289
- To do so, attach the following notices to the program. It is safest
290
- to attach them to the start of each source file to most effectively
291
- convey the exclusion of warranty; and each file should have at least
292
- the "copyright" line and a pointer to where the full notice is found.
293
-
294
- <one line to give the program's name and a brief idea of what it does.>
295
- Copyright (C) <year> <name of author>
296
-
297
- This program is free software; you can redistribute it and/or modify
298
- it under the terms of the GNU General Public License as published by
299
- the Free Software Foundation; either version 2 of the License, or
300
- (at your option) any later version.
301
-
302
- This program is distributed in the hope that it will be useful,
303
- but WITHOUT ANY WARRANTY; without even the implied warranty of
304
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
305
- GNU General Public License for more details.
306
-
307
- You should have received a copy of the GNU General Public License along
308
- with this program; if not, write to the Free Software Foundation, Inc.,
309
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
310
-
311
- Also add information on how to contact you by electronic and paper mail.
312
-
313
- If the program is interactive, make it output a short notice like this
314
- when it starts in an interactive mode:
315
-
316
- Gnomovision version 69, Copyright (C) year name of author
317
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
- This is free software, and you are welcome to redistribute it
319
- under certain conditions; type `show c' for details.
320
-
321
- The hypothetical commands `show w' and `show c' should show the appropriate
322
- parts of the General Public License. Of course, the commands you use may
323
- be called something other than `show w' and `show c'; they could even be
324
- mouse-clicks or menu items--whatever suits your program.
325
-
326
- You should also get your employer (if you work as a programmer) or your
327
- school, if any, to sign a "copyright disclaimer" for the program, if
328
- necessary. Here is a sample; alter the names:
329
-
330
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
-
333
- <signature of Ty Coon>, 1 April 1989
334
- Ty Coon, President of Vice
335
-
336
- This General Public License does not permit incorporating your program into
337
- proprietary programs. If your program is a subroutine library, you may
338
- consider it more useful to permit linking proprietary applications with the
339
- library. If this is what you want to do, use the GNU Lesser General
340
- Public License instead of this License.
1
+
2
+ GNU GENERAL PUBLIC LICENSE
3
+ Version 2, June 1991
4
+
5
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
6
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7
+ Everyone is permitted to copy and distribute verbatim copies
8
+ of this license document, but changing it is not allowed.
9
+
10
+ Preamble
11
+
12
+ The licenses for most software are designed to take away your
13
+ freedom to share and change it. By contrast, the GNU General Public
14
+ License is intended to guarantee your freedom to share and change free
15
+ software--to make sure the software is free for all its users. This
16
+ General Public License applies to most of the Free Software
17
+ Foundation's software and to any other program whose authors commit to
18
+ using it. (Some other Free Software Foundation software is covered by
19
+ the GNU Lesser General Public License instead.) You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ this service if you wish), that you receive source code or can get it
26
+ if you want it, that you can change the software or use pieces of it
27
+ in new free programs; and that you know you can do these things.
28
+
29
+ To protect your rights, we need to make restrictions that forbid
30
+ anyone to deny you these rights or to ask you to surrender the rights.
31
+ These restrictions translate to certain responsibilities for you if you
32
+ distribute copies of the software, or if you modify it.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must give the recipients all the rights that
36
+ you have. You must make sure that they, too, receive or can get the
37
+ source code. And you must show them these terms so they know their
38
+ rights.
39
+
40
+ We protect your rights with two steps: (1) copyright the software, and
41
+ (2) offer you this license which gives you legal permission to copy,
42
+ distribute and/or modify the software.
43
+
44
+ Also, for each author's protection and ours, we want to make certain
45
+ that everyone understands that there is no warranty for this free
46
+ software. If the software is modified by someone else and passed on, we
47
+ want its recipients to know that what they have is not the original, so
48
+ that any problems introduced by others will not reflect on the original
49
+ authors' reputations.
50
+
51
+ Finally, any free program is threatened constantly by software
52
+ patents. We wish to avoid the danger that redistributors of a free
53
+ program will individually obtain patent licenses, in effect making the
54
+ program proprietary. To prevent this, we have made it clear that any
55
+ patent must be licensed for everyone's free use or not licensed at all.
56
+
57
+ The precise terms and conditions for copying, distribution and
58
+ modification follow.
59
+
60
+ GNU GENERAL PUBLIC LICENSE
61
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62
+
63
+ 0. This License applies to any program or other work which contains
64
+ a notice placed by the copyright holder saying it may be distributed
65
+ under the terms of this General Public License. The "Program", below,
66
+ refers to any such program or work, and a "work based on the Program"
67
+ means either the Program or any derivative work under copyright law:
68
+ that is to say, a work containing the Program or a portion of it,
69
+ either verbatim or with modifications and/or translated into another
70
+ language. (Hereinafter, translation is included without limitation in
71
+ the term "modification".) Each licensee is addressed as "you".
72
+
73
+ Activities other than copying, distribution and modification are not
74
+ covered by this License; they are outside its scope. The act of
75
+ running the Program is not restricted, and the output from the Program
76
+ is covered only if its contents constitute a work based on the
77
+ Program (independent of having been made by running the Program).
78
+ Whether that is true depends on what the Program does.
79
+
80
+ 1. You may copy and distribute verbatim copies of the Program's
81
+ source code as you receive it, in any medium, provided that you
82
+ conspicuously and appropriately publish on each copy an appropriate
83
+ copyright notice and disclaimer of warranty; keep intact all the
84
+ notices that refer to this License and to the absence of any warranty;
85
+ and give any other recipients of the Program a copy of this License
86
+ along with the Program.
87
+
88
+ You may charge a fee for the physical act of transferring a copy, and
89
+ you may at your option offer warranty protection in exchange for a fee.
90
+
91
+ 2. You may modify your copy or copies of the Program or any portion
92
+ of it, thus forming a work based on the Program, and copy and
93
+ distribute such modifications or work under the terms of Section 1
94
+ above, provided that you also meet all of these conditions:
95
+
96
+ a) You must cause the modified files to carry prominent notices
97
+ stating that you changed the files and the date of any change.
98
+
99
+ b) You must cause any work that you distribute or publish, that in
100
+ whole or in part contains or is derived from the Program or any
101
+ part thereof, to be licensed as a whole at no charge to all third
102
+ parties under the terms of this License.
103
+
104
+ c) If the modified program normally reads commands interactively
105
+ when run, you must cause it, when started running for such
106
+ interactive use in the most ordinary way, to print or display an
107
+ announcement including an appropriate copyright notice and a
108
+ notice that there is no warranty (or else, saying that you provide
109
+ a warranty) and that users may redistribute the program under
110
+ these conditions, and telling the user how to view a copy of this
111
+ License. (Exception: if the Program itself is interactive but
112
+ does not normally print such an announcement, your work based on
113
+ the Program is not required to print an announcement.)
114
+
115
+ These requirements apply to the modified work as a whole. If
116
+ identifiable sections of that work are not derived from the Program,
117
+ and can be reasonably considered independent and separate works in
118
+ themselves, then this License, and its terms, do not apply to those
119
+ sections when you distribute them as separate works. But when you
120
+ distribute the same sections as part of a whole which is a work based
121
+ on the Program, the distribution of the whole must be on the terms of
122
+ this License, whose permissions for other licensees extend to the
123
+ entire whole, and thus to each and every part regardless of who wrote it.
124
+
125
+ Thus, it is not the intent of this section to claim rights or contest
126
+ your rights to work written entirely by you; rather, the intent is to
127
+ exercise the right to control the distribution of derivative or
128
+ collective works based on the Program.
129
+
130
+ In addition, mere aggregation of another work not based on the Program
131
+ with the Program (or with a work based on the Program) on a volume of
132
+ a storage or distribution medium does not bring the other work under
133
+ the scope of this License.
134
+
135
+ 3. You may copy and distribute the Program (or a work based on it,
136
+ under Section 2) in object code or executable form under the terms of
137
+ Sections 1 and 2 above provided that you also do one of the following:
138
+
139
+ a) Accompany it with the complete corresponding machine-readable
140
+ source code, which must be distributed under the terms of Sections
141
+ 1 and 2 above on a medium customarily used for software interchange; or,
142
+
143
+ b) Accompany it with a written offer, valid for at least three
144
+ years, to give any third party, for a charge no more than your
145
+ cost of physically performing source distribution, a complete
146
+ machine-readable copy of the corresponding source code, to be
147
+ distributed under the terms of Sections 1 and 2 above on a medium
148
+ customarily used for software interchange; or,
149
+
150
+ c) Accompany it with the information you received as to the offer
151
+ to distribute corresponding source code. (This alternative is
152
+ allowed only for noncommercial distribution and only if you
153
+ received the program in object code or executable form with such
154
+ an offer, in accord with Subsection b above.)
155
+
156
+ The source code for a work means the preferred form of the work for
157
+ making modifications to it. For an executable work, complete source
158
+ code means all the source code for all modules it contains, plus any
159
+ associated interface definition files, plus the scripts used to
160
+ control compilation and installation of the executable. However, as a
161
+ special exception, the source code distributed need not include
162
+ anything that is normally distributed (in either source or binary
163
+ form) with the major components (compiler, kernel, and so on) of the
164
+ operating system on which the executable runs, unless that component
165
+ itself accompanies the executable.
166
+
167
+ If distribution of executable or object code is made by offering
168
+ access to copy from a designated place, then offering equivalent
169
+ access to copy the source code from the same place counts as
170
+ distribution of the source code, even though third parties are not
171
+ compelled to copy the source along with the object code.
172
+
173
+ 4. You may not copy, modify, sublicense, or distribute the Program
174
+ except as expressly provided under this License. Any attempt
175
+ otherwise to copy, modify, sublicense or distribute the Program is
176
+ void, and will automatically terminate your rights under this License.
177
+ However, parties who have received copies, or rights, from you under
178
+ this License will not have their licenses terminated so long as such
179
+ parties remain in full compliance.
180
+
181
+ 5. You are not required to accept this License, since you have not
182
+ signed it. However, nothing else grants you permission to modify or
183
+ distribute the Program or its derivative works. These actions are
184
+ prohibited by law if you do not accept this License. Therefore, by
185
+ modifying or distributing the Program (or any work based on the
186
+ Program), you indicate your acceptance of this License to do so, and
187
+ all its terms and conditions for copying, distributing or modifying
188
+ the Program or works based on it.
189
+
190
+ 6. Each time you redistribute the Program (or any work based on the
191
+ Program), the recipient automatically receives a license from the
192
+ original licensor to copy, distribute or modify the Program subject to
193
+ these terms and conditions. You may not impose any further
194
+ restrictions on the recipients' exercise of the rights granted herein.
195
+ You are not responsible for enforcing compliance by third parties to
196
+ this License.
197
+
198
+ 7. If, as a consequence of a court judgment or allegation of patent
199
+ infringement or for any other reason (not limited to patent issues),
200
+ conditions are imposed on you (whether by court order, agreement or
201
+ otherwise) that contradict the conditions of this License, they do not
202
+ excuse you from the conditions of this License. If you cannot
203
+ distribute so as to satisfy simultaneously your obligations under this
204
+ License and any other pertinent obligations, then as a consequence you
205
+ may not distribute the Program at all. For example, if a patent
206
+ license would not permit royalty-free redistribution of the Program by
207
+ all those who receive copies directly or indirectly through you, then
208
+ the only way you could satisfy both it and this License would be to
209
+ refrain entirely from distribution of the Program.
210
+
211
+ If any portion of this section is held invalid or unenforceable under
212
+ any particular circumstance, the balance of the section is intended to
213
+ apply and the section as a whole is intended to apply in other
214
+ circumstances.
215
+
216
+ It is not the purpose of this section to induce you to infringe any
217
+ patents or other property right claims or to contest validity of any
218
+ such claims; this section has the sole purpose of protecting the
219
+ integrity of the free software distribution system, which is
220
+ implemented by public license practices. Many people have made
221
+ generous contributions to the wide range of software distributed
222
+ through that system in reliance on consistent application of that
223
+ system; it is up to the author/donor to decide if he or she is willing
224
+ to distribute software through any other system and a licensee cannot
225
+ impose that choice.
226
+
227
+ This section is intended to make thoroughly clear what is believed to
228
+ be a consequence of the rest of this License.
229
+
230
+ 8. If the distribution and/or use of the Program is restricted in
231
+ certain countries either by patents or by copyrighted interfaces, the
232
+ original copyright holder who places the Program under this License
233
+ may add an explicit geographical distribution limitation excluding
234
+ those countries, so that distribution is permitted only in or among
235
+ countries not thus excluded. In such case, this License incorporates
236
+ the limitation as if written in the body of this License.
237
+
238
+ 9. The Free Software Foundation may publish revised and/or new versions
239
+ of the General Public License from time to time. Such new versions will
240
+ be similar in spirit to the present version, but may differ in detail to
241
+ address new problems or concerns.
242
+
243
+ Each version is given a distinguishing version number. If the Program
244
+ specifies a version number of this License which applies to it and "any
245
+ later version", you have the option of following the terms and conditions
246
+ either of that version or of any later version published by the Free
247
+ Software Foundation. If the Program does not specify a version number of
248
+ this License, you may choose any version ever published by the Free Software
249
+ Foundation.
250
+
251
+ 10. If you wish to incorporate parts of the Program into other free
252
+ programs whose distribution conditions are different, write to the author
253
+ to ask for permission. For software which is copyrighted by the Free
254
+ Software Foundation, write to the Free Software Foundation; we sometimes
255
+ make exceptions for this. Our decision will be guided by the two goals
256
+ of preserving the free status of all derivatives of our free software and
257
+ of promoting the sharing and reuse of software generally.
258
+
259
+ NO WARRANTY
260
+
261
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
262
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
263
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
264
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
265
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
266
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
267
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
268
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
269
+ REPAIR OR CORRECTION.
270
+
271
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
272
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
273
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
274
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
275
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
276
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
277
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
278
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
279
+ POSSIBILITY OF SUCH DAMAGES.
280
+
281
+ END OF TERMS AND CONDITIONS
282
+
283
+ How to Apply These Terms to Your New Programs
284
+
285
+ If you develop a new program, and you want it to be of the greatest
286
+ possible use to the public, the best way to achieve this is to make it
287
+ free software which everyone can redistribute and change under these terms.
288
+
289
+ To do so, attach the following notices to the program. It is safest
290
+ to attach them to the start of each source file to most effectively
291
+ convey the exclusion of warranty; and each file should have at least
292
+ the "copyright" line and a pointer to where the full notice is found.
293
+
294
+ <one line to give the program's name and a brief idea of what it does.>
295
+ Copyright (C) <year> <name of author>
296
+
297
+ This program is free software; you can redistribute it and/or modify
298
+ it under the terms of the GNU General Public License as published by
299
+ the Free Software Foundation; either version 2 of the License, or
300
+ (at your option) any later version.
301
+
302
+ This program is distributed in the hope that it will be useful,
303
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
304
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
305
+ GNU General Public License for more details.
306
+
307
+ You should have received a copy of the GNU General Public License along
308
+ with this program; if not, write to the Free Software Foundation, Inc.,
309
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
310
+
311
+ Also add information on how to contact you by electronic and paper mail.
312
+
313
+ If the program is interactive, make it output a short notice like this
314
+ when it starts in an interactive mode:
315
+
316
+ Gnomovision version 69, Copyright (C) year name of author
317
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
+ This is free software, and you are welcome to redistribute it
319
+ under certain conditions; type `show c' for details.
320
+
321
+ The hypothetical commands `show w' and `show c' should show the appropriate
322
+ parts of the General Public License. Of course, the commands you use may
323
+ be called something other than `show w' and `show c'; they could even be
324
+ mouse-clicks or menu items--whatever suits your program.
325
+
326
+ You should also get your employer (if you work as a programmer) or your
327
+ school, if any, to sign a "copyright disclaimer" for the program, if
328
+ necessary. Here is a sample; alter the names:
329
+
330
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
+
333
+ <signature of Ty Coon>, 1 April 1989
334
+ Ty Coon, President of Vice
335
+
336
+ This General Public License does not permit incorporating your program into
337
+ proprietary programs. If your program is a subroutine library, you may
338
+ consider it more useful to permit linking proprietary applications with the
339
+ library. If this is what you want to do, use the GNU Lesser General
340
+ Public License instead of this License.
backdrop/namespace.php CHANGED
@@ -1,6 +1,6 @@
1
- <?php
2
-
3
- namespace HM\Backdrop;
4
-
5
- class Server extends \HM_Backdrop_Server {}
6
  class Task extends \HM_Backdrop_Task {}
1
+ <?php
2
+
3
+ namespace HM\Backdrop;
4
+
5
+ class Server extends \HM_Backdrop_Server {}
6
  class Task extends \HM_Backdrop_Task {}
backdrop/server.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php
2
-
3
- class HM_Backdrop_Server {
4
- public function run() {
5
- if ( empty( $_POST['key'] ) ) {
6
- return new WP_Error( 'hm_backdrop_no_key', __( 'No key supplied', 'hm_backdrop' ) );
7
- }
8
-
9
- $data = get_transient( 'hm_backdrop-' . $_POST['key'] );
10
- if ( empty( $data ) ) {
11
- return new WP_Error( 'hm_backdrop_invalid_key', __( 'Supplied key was not valid', 'hm_backdrop' ) );
12
- }
13
-
14
- $result = call_user_func_array( $data['callback'], $data['params'] );
15
- delete_transient( 'hm_backdrop-' . $_POST['key'] );
16
-
17
- if ( is_wp_error( $result ) ) {
18
- return $result;
19
- }
20
-
21
- return true;
22
- }
23
-
24
- public static function spawn() {
25
- $class = get_class();
26
- if ( function_exists( 'get_called_class' ) ) {
27
- $class = get_called_class();
28
- }
29
-
30
- return call_user_func( array( $class, 'spawn_run' ), $class );
31
- }
32
-
33
- protected static function spawn_run( $class ) {
34
- $server = new $class();
35
- $server->run();
36
- exit;
37
- }
38
- }
1
+ <?php
2
+
3
+ class HM_Backdrop_Server {
4
+ public function run() {
5
+ if ( empty( $_POST['key'] ) ) {
6
+ return new WP_Error( 'hm_backdrop_no_key', __( 'No key supplied', 'hm_backdrop' ) );
7
+ }
8
+
9
+ $data = get_transient( 'hm_backdrop-' . $_POST['key'] );
10
+ if ( empty( $data ) ) {
11
+ return new WP_Error( 'hm_backdrop_invalid_key', __( 'Supplied key was not valid', 'hm_backdrop' ) );
12
+ }
13
+
14
+ $result = call_user_func_array( $data['callback'], $data['params'] );
15
+ delete_transient( 'hm_backdrop-' . $_POST['key'] );
16
+
17
+ if ( is_wp_error( $result ) ) {
18
+ return $result;
19
+ }
20
+
21
+ return true;
22
+ }
23
+
24
+ public static function spawn() {
25
+ $class = get_class();
26
+ if ( function_exists( 'get_called_class' ) ) {
27
+ $class = get_called_class();
28
+ }
29
+
30
+ return call_user_func( array( $class, 'spawn_run' ), $class );
31
+ }
32
+
33
+ protected static function spawn_run( $class ) {
34
+ $server = new $class();
35
+ $server->run();
36
+ exit;
37
+ }
38
+ }
backdrop/task.php CHANGED
@@ -1,71 +1,71 @@
1
- <?php
2
-
3
- class HM_Backdrop_Task {
4
- protected $key;
5
- protected $callback;
6
- protected $params = array();
7
-
8
- public function __construct( $callback /* , $... */ ) {
9
- $this->callback = $callback;
10
-
11
- if ( func_num_args() > 1 ) {
12
- $args = func_get_args();
13
- $this->params = array_slice( $args, 1 );
14
- }
15
-
16
- $this->key = $this->get_unique_id();
17
- }
18
-
19
- public function schedule() {
20
-
21
- if ( $this->is_scheduled() ) {
22
- return new WP_Error( 'hm_backdrop_scheduled', __( 'Task is already scheduled to run', 'hm_backdrop' ) );
23
- }
24
-
25
- $data = array(
26
- 'callback' => $this->callback,
27
- 'params' => $this->params
28
- );
29
- set_transient( 'hm_backdrop-' . $this->key, $data, 300 );
30
- add_action( 'shutdown', array( $this, 'spawn_server' ) );
31
-
32
- return true;
33
- }
34
-
35
- public function is_scheduled() {
36
- return (bool) $this->get_data();
37
- }
38
-
39
- public function cancel() {
40
- if ( ! $this->is_scheduled() ) {
41
- return new WP_Error( 'hm_backdrop_not_scheduled', __( 'Task is not scheduled to run', 'hm_backdrop' ) );
42
- }
43
-
44
- delete_transient( 'hm_backdrop-' . $this->key );
45
- return true;
46
- }
47
-
48
- public function spawn_server() {
49
- $server_url = admin_url( 'admin-ajax.php' );
50
- $data = array(
51
- 'action' => 'hm_backdrop_run',
52
- 'key' => $this->key,
53
- );
54
- $args = array(
55
- 'body' => $data,
56
- 'timeout' => 0.01,
57
- 'blocking' => false,
58
- 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
59
- );
60
- wp_remote_post( $server_url, $args );
61
- return true;
62
- }
63
-
64
- protected function get_data() {
65
- return get_transient( 'hm_backdrop-' . $this->key );
66
- }
67
-
68
- protected function get_unique_id() {
69
- return substr( sha1( serialize( $this->callback ) . serialize( $this->params ) ), -28 );
70
- }
71
- }
1
+ <?php
2
+
3
+ class HM_Backdrop_Task {
4
+ protected $key;
5
+ protected $callback;
6
+ protected $params = array();
7
+
8
+ public function __construct( $callback /* , $... */ ) {
9
+ $this->callback = $callback;
10
+
11
+ if ( func_num_args() > 1 ) {
12
+ $args = func_get_args();
13
+ $this->params = array_slice( $args, 1 );
14
+ }
15
+
16
+ $this->key = $this->get_unique_id();
17
+ }
18
+
19
+ public function schedule() {
20
+
21
+ if ( $this->is_scheduled() ) {
22
+ return new WP_Error( 'hm_backdrop_scheduled', __( 'Task is already scheduled to run', 'hm_backdrop' ) );
23
+ }
24
+
25
+ $data = array(
26
+ 'callback' => $this->callback,
27
+ 'params' => $this->params
28
+ );
29
+ set_transient( 'hm_backdrop-' . $this->key, $data, 300 );
30
+ add_action( 'shutdown', array( $this, 'spawn_server' ) );
31
+
32
+ return true;
33
+ }
34
+
35
+ public function is_scheduled() {
36
+ return (bool) $this->get_data();
37
+ }
38
+
39
+ public function cancel() {
40
+ if ( ! $this->is_scheduled() ) {
41
+ return new WP_Error( 'hm_backdrop_not_scheduled', __( 'Task is not scheduled to run', 'hm_backdrop' ) );
42
+ }
43
+
44
+ delete_transient( 'hm_backdrop-' . $this->key );
45
+ return true;
46
+ }
47
+
48
+ public function spawn_server() {
49
+ $server_url = admin_url( 'admin-ajax.php' );
50
+ $data = array(
51
+ 'action' => 'hm_backdrop_run',
52
+ 'key' => $this->key,
53
+ );
54
+ $args = array(
55
+ 'body' => $data,
56
+ 'timeout' => 0.01,
57
+ 'blocking' => false,
58
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
59
+ );
60
+ wp_remote_post( $server_url, $args );
61
+ return true;
62
+ }
63
+
64
+ protected function get_data() {
65
+ return get_transient( 'hm_backdrop-' . $this->key );
66
+ }
67
+
68
+ protected function get_unique_id() {
69
+ return substr( sha1( serialize( $this->callback ) . serialize( $this->params ) ), -28 );
70
+ }
71
+ }
backupwordpress.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
- /*
3
- Plugin Name: BackUpWordPress
4
- Plugin URI: http://bwp.hmn.md/
5
- Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, you'll find me under the Network Settings menu.
6
- Version: 3.6.4
7
- Author: Human Made Limited
8
- Author URI: http://hmn.md/
9
- License: GPL-2+
10
- License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11
- Text Domain: backupwordpress
12
- Domain Path: /languages
13
- Network: true
14
- */
15
-
16
- /*
17
- Copyright 2011 - 2014 Human Made Limited (email : backupwordpress@hmn.md)
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 2 of the License, or
22
- (at your option) any later version.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
31
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
- */
33
-
34
- // Only load if >= PHP 5.3
35
-
36
-
37
- if ( ! defined( 'HMBKP_PLUGIN_PATH' ) ) {
38
- define( 'HMBKP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
39
- }
40
-
41
- if ( ! defined( 'HMBKP_BASENAME' ) ) {
42
- define( 'HMBKP_BASENAME', plugin_basename( __FILE__ ) );
43
- }
44
-
45
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' );
46
-
47
- register_activation_hook( __FILE__, array( 'HMBKP_Setup', 'activate' ) );
48
- register_deactivation_hook( __FILE__, array( 'HMBKP_Setup', 'deactivate' ) );
49
-
50
- if ( HMBKP_Setup::meets_requirements() ) {
51
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-plugin.php' );
52
- } else {
53
- add_action( 'admin_init', array( 'HMBKP_Setup', 'self_deactivate' ) );
54
- add_action( 'all_admin_notices', array( 'HMBKP_Setup', 'display_admin_notices' ) );
55
- }
1
+ <?php
2
+ /*
3
+ Plugin Name: BackUpWordPress
4
+ Plugin URI: https://updraftplus.com/backupwordpress/?afref=744
5
+ Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, you'll find me under the Network Settings menu.
6
+ Version: 3.6.4
7
+ Author: Human Made Limited
8
+ Author URI: http://hmn.md/
9
+ License: GPL-2+
10
+ License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11
+ Text Domain: backupwordpress
12
+ Domain Path: /languages
13
+ Network: true
14
+ */
15
+
16
+ /*
17
+ Copyright 2011 - 2014 Human Made Limited (email : support@xibomarketing.com)
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program; if not, write to the Free Software
31
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
+ */
33
+
34
+ // Only load if >= PHP 5.3
35
+
36
+
37
+ if ( ! defined( 'HMBKP_PLUGIN_PATH' ) ) {
38
+ define( 'HMBKP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
39
+ }
40
+
41
+ if ( ! defined( 'HMBKP_BASENAME' ) ) {
42
+ define( 'HMBKP_BASENAME', plugin_basename( __FILE__ ) );
43
+ }
44
+
45
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' );
46
+
47
+ register_activation_hook( __FILE__, array( 'HMBKP_Setup', 'activate' ) );
48
+ register_deactivation_hook( __FILE__, array( 'HMBKP_Setup', 'deactivate' ) );
49
+
50
+ if ( HMBKP_Setup::meets_requirements() ) {
51
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-plugin.php' );
52
+ } else {
53
+ add_action( 'admin_init', array( 'HMBKP_Setup', 'self_deactivate' ) );
54
+ add_action( 'all_admin_notices', array( 'HMBKP_Setup', 'display_admin_notices' ) );
55
+ }
classes/backup/class-backup-engine-database-imysqldump.php CHANGED
@@ -1,79 +1,79 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- use Ifsnop\Mysqldump as IMysqldump;
6
-
7
- /**
8
- * Perform a database backup using the mysqldump-php library
9
- *
10
- * @see https://github.com/ifsnop/mysqldump-php
11
- */
12
- class IMysqldump_Database_Backup_Engine extends Database_Backup_Engine {
13
-
14
- public function __construct() {
15
- parent::__construct();
16
- }
17
-
18
- /**
19
- * Perform the database backupwordpress
20
- *
21
- * @return bool True if the backup completed successfully, else false.
22
- */
23
- public function backup() {
24
-
25
- try {
26
-
27
- $dump = new IMysqldump\Mysqldump( $this->get_dsn(), $this->get_user(), $this->get_password(), $this->get_dump_settings() );
28
- $dump->start( $this->get_backup_filepath() );
29
-
30
- } catch ( \Exception $e ) {
31
- $this->error( __CLASS__, $e->getMessage() );
32
- }
33
-
34
- return $this->verify_backup();
35
-
36
- }
37
-
38
- /**
39
- * Get the settings for the database bump.
40
- *
41
- * @return array The array of database dump settings.
42
- */
43
- public function get_dump_settings() {
44
-
45
- /**
46
- * Allow additional settings to be added.
47
- *
48
- * @param string[] $settings The array of settings.
49
- * @todo can these be standardised across all database backup engines
50
- */
51
- return apply_filters( 'hmbkp_imysqldump_command', array(
52
- 'default-character-set' => $this->get_charset(),
53
- 'hex-blob' => true,
54
- 'single-transaction' => defined( 'HMBKP_MYSQLDUMP_SINGLE_TRANSACTION' ) && HMBKP_MYSQLDUMP_SINGLE_TRANSACTION,
55
- ) );
56
-
57
- }
58
-
59
- /**
60
- * Correctly calculates the DSN string for the various mysql
61
- * connection variations including simplt hostname, non-standard ports
62
- * and socket connections.
63
- *
64
- * @return string The DSN connection string
65
- */
66
- public function get_dsn() {
67
-
68
- $dsn = 'mysql:host=' . $this->get_host() . ';dbname=' . $this->get_name();
69
-
70
- if ( $this->get_host() && $this->get_port() ) {
71
- $dsn = 'mysql:host=' . $this->get_host() . ';port=' . $this->get_port() . ';dbname=' . $this->get_name();
72
- } elseif ( $this->get_socket() ) {
73
- $dsn = 'mysql:unix_socket=' . $this->get_socket() . ';dbname=' . $this->get_name();
74
- }
75
-
76
- return $dsn;
77
-
78
- }
79
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ use Ifsnop\Mysqldump as IMysqldump;
6
+
7
+ /**
8
+ * Perform a database backup using the mysqldump-php library
9
+ *
10
+ * @see https://github.com/ifsnop/mysqldump-php
11
+ */
12
+ class IMysqldump_Database_Backup_Engine extends Database_Backup_Engine {
13
+
14
+ public function __construct() {
15
+ parent::__construct();
16
+ }
17
+
18
+ /**
19
+ * Perform the database backupwordpress
20
+ *
21
+ * @return bool True if the backup completed successfully, else false.
22
+ */
23
+ public function backup() {
24
+
25
+ try {
26
+
27
+ $dump = new IMysqldump\Mysqldump( $this->get_dsn(), $this->get_user(), $this->get_password(), $this->get_dump_settings() );
28
+ $dump->start( $this->get_backup_filepath() );
29
+
30
+ } catch ( \Exception $e ) {
31
+ $this->error( __CLASS__, $e->getMessage() );
32
+ }
33
+
34
+ return $this->verify_backup();
35
+
36
+ }
37
+
38
+ /**
39
+ * Get the settings for the database bump.
40
+ *
41
+ * @return array The array of database dump settings.
42
+ */
43
+ public function get_dump_settings() {
44
+
45
+ /**
46
+ * Allow additional settings to be added.
47
+ *
48
+ * @param string[] $settings The array of settings.
49
+ * @todo can these be standardised across all database backup engines
50
+ */
51
+ return apply_filters( 'hmbkp_imysqldump_command', array(
52
+ 'default-character-set' => $this->get_charset(),
53
+ 'hex-blob' => true,
54
+ 'single-transaction' => defined( 'HMBKP_MYSQLDUMP_SINGLE_TRANSACTION' ) && HMBKP_MYSQLDUMP_SINGLE_TRANSACTION,
55
+ ) );
56
+
57
+ }
58
+
59
+ /**
60
+ * Correctly calculates the DSN string for the various mysql
61
+ * connection variations including simplt hostname, non-standard ports
62
+ * and socket connections.
63
+ *
64
+ * @return string The DSN connection string
65
+ */
66
+ public function get_dsn() {
67
+
68
+ $dsn = 'mysql:host=' . $this->get_host() . ';dbname=' . $this->get_name();
69
+
70
+ if ( $this->get_host() && $this->get_port() ) {
71
+ $dsn = 'mysql:host=' . $this->get_host() . ';port=' . $this->get_port() . ';dbname=' . $this->get_name();
72
+ } elseif ( $this->get_socket() ) {
73
+ $dsn = 'mysql:unix_socket=' . $this->get_socket() . ';dbname=' . $this->get_name();
74
+ }
75
+
76
+ return $dsn;
77
+
78
+ }
79
+ }
classes/backup/class-backup-engine-database-mysqldump.php CHANGED
@@ -1,154 +1,154 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- use Symfony\Component\Process\Process as Process;
6
-
7
- /**
8
- * Perform a database backup using the mysqldump cli command
9
- */
10
- class Mysqldump_Database_Backup_Engine extends Database_Backup_Engine {
11
-
12
- /**
13
- * The path to the mysqldump executable
14
- *
15
- * @var string|false
16
- */
17
- private $mysqldump_executable_path = '';
18
-
19
- public function __construct() {
20
- parent::__construct();
21
- }
22
-
23
- /**
24
- * Calculate the path to the mysqldump executable.
25
- *
26
- * The executable path can be overridden using either the `HMBKP_MYSQLDUMP_PATH`
27
- * Constant or the `hmbkp_mysqldump_executable_path` filter.
28
- *
29
- * If neither of those are set then we fallback to checking a number of
30
- * common locations.
31
- *
32
- * @return string|false The path to the executable or false.
33
- */
34
- public function get_mysqldump_executable_path() {
35
-
36
- // Return now if it's set in a Constant
37
- if ( defined( 'HMBKP_MYSQLDUMP_PATH' ) && HMBKP_MYSQLDUMP_PATH ) {
38
- $this->mysqldump_executable_path = HMBKP_MYSQLDUMP_PATH;
39
- }
40
-
41
- /**
42
- * Allow the executable path to be set via a filter
43
- *
44
- * @param string The path to the mysqldump executable
45
- */
46
- $this->mysqldump_executable_path = apply_filters( 'hmbkp_mysqldump_executable_path', '' );
47
-
48
- if ( ! $this->mysqldump_executable_path ) {
49
-
50
- // List of possible mysqldump locations
51
- $paths = array(
52
- 'mysqldump',
53
- '/usr/local/bin/mysqldump',
54
- '/usr/local/mysql/bin/mysqldump',
55
- '/usr/mysql/bin/mysqldump',
56
- '/usr/bin/mysqldump',
57
- '/opt/local/lib/mysql6/bin/mysqldump',
58
- '/opt/local/lib/mysql5/bin/mysqldump',
59
- '/opt/local/lib/mysql4/bin/mysqldump',
60
- '/xampp/mysql/bin/mysqldump',
61
- '/Program Files/xampp/mysql/bin/mysqldump',
62
- '/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump',
63
- '/Program Files/MySQL/MySQL Server 5.7/bin/mysqldump',
64
- '/Program Files/MySQL/MySQL Server 5.6/bin/mysqldump',
65
- '/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
66
- '/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump',
67
- '/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump',
68
- '/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump',
69
- '/Program Files/MySQL/MySQL Server 4.1/bin/mysqldump',
70
- '/opt/local/bin/mysqldump',
71
- );
72
-
73
- $this->mysqldump_executable_path = Backup_Utilities::get_executable_path( $paths );
74
-
75
- }
76
-
77
- return $this->mysqldump_executable_path;
78
-
79
- }
80
-
81
- /**
82
- * Perform the database backup.
83
- *
84
- * @return bool Whether the backup completed successfully or not.
85
- */
86
- public function backup() {
87
-
88
- if ( ! $this->get_mysqldump_executable_path() ) {
89
- return false;
90
- }
91
-
92
- // Grab the database connections args
93
- $args = $this->get_mysql_connection_args();
94
-
95
- // Allow lock-tables to be overridden
96
- if ( defined( 'HMBKP_MYSQLDUMP_SINGLE_TRANSACTION' ) && HMBKP_MYSQLDUMP_SINGLE_TRANSACTION ) {
97
- $args[] = '--single-transaction';
98
- }
99
-
100
- // Make sure binary data is exported properly
101
- $args[] = '--hex-blob';
102
-
103
- // The file we're saving too
104
- $args[] = '-r ' . escapeshellarg( $this->get_backup_filepath() );
105
-
106
- // The database we're dumping
107
- $args[] = escapeshellarg( $this->get_name() );
108
-
109
- $process = new Process( $this->get_mysqldump_executable_path() . ' ' . implode( ' ', $args ) );
110
- $process->setTimeout( HOUR_IN_SECONDS );
111
-
112
- try {
113
- $process->run();
114
- } catch ( \Exception $e ) {
115
- $this->error( __CLASS__, $e->getMessage() );
116
- }
117
-
118
- if ( ! $process->isSuccessful() ) {
119
- $this->error( __CLASS__, $process->getErrorOutput() );
120
- }
121
-
122
- return $this->verify_backup();
123
-
124
- }
125
-
126
- /**
127
- * Get the connection args for the mysqldump command
128
- *
129
- * @return string[] The array of connection args
130
- */
131
- public function get_mysql_connection_args() {
132
-
133
- $args = array();
134
-
135
- $args[] = '-u ' . escapeshellarg( $this->get_user() );
136
-
137
- if ( $this->get_password() ) {
138
- $args[] = '-p' . escapeshellarg( $this->get_password() );
139
- }
140
-
141
- $args[] = '-h ' . escapeshellarg( $this->get_host() );
142
-
143
- if ( $this->get_port() ) {
144
- $args[] = '-P ' . escapeshellarg( $this->get_port() );
145
- }
146
-
147
- if ( $this->get_socket() ) {
148
- $args[] = '--protocol=socket -S ' . escapeshellarg( $this->get_socket() );
149
- }
150
-
151
- return $args;
152
-
153
- }
154
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ use Symfony\Component\Process\Process as Process;
6
+
7
+ /**
8
+ * Perform a database backup using the mysqldump cli command
9
+ */
10
+ class Mysqldump_Database_Backup_Engine extends Database_Backup_Engine {
11
+
12
+ /**
13
+ * The path to the mysqldump executable
14
+ *
15
+ * @var string|false
16
+ */
17
+ private $mysqldump_executable_path = '';
18
+
19
+ public function __construct() {
20
+ parent::__construct();
21
+ }
22
+
23
+ /**
24
+ * Calculate the path to the mysqldump executable.
25
+ *
26
+ * The executable path can be overridden using either the `HMBKP_MYSQLDUMP_PATH`
27
+ * Constant or the `hmbkp_mysqldump_executable_path` filter.
28
+ *
29
+ * If neither of those are set then we fallback to checking a number of
30
+ * common locations.
31
+ *
32
+ * @return string|false The path to the executable or false.
33
+ */
34
+ public function get_mysqldump_executable_path() {
35
+
36
+ // Return now if it's set in a Constant
37
+ if ( defined( 'HMBKP_MYSQLDUMP_PATH' ) && HMBKP_MYSQLDUMP_PATH ) {
38
+ $this->mysqldump_executable_path = HMBKP_MYSQLDUMP_PATH;
39
+ }
40
+
41
+ /**
42
+ * Allow the executable path to be set via a filter
43
+ *
44
+ * @param string The path to the mysqldump executable
45
+ */
46
+ $this->mysqldump_executable_path = apply_filters( 'hmbkp_mysqldump_executable_path', '' );
47
+
48
+ if ( ! $this->mysqldump_executable_path ) {
49
+
50
+ // List of possible mysqldump locations
51
+ $paths = array(
52
+ 'mysqldump',
53
+ '/usr/local/bin/mysqldump',
54
+ '/usr/local/mysql/bin/mysqldump',
55
+ '/usr/mysql/bin/mysqldump',
56
+ '/usr/bin/mysqldump',
57
+ '/opt/local/lib/mysql6/bin/mysqldump',
58
+ '/opt/local/lib/mysql5/bin/mysqldump',
59
+ '/opt/local/lib/mysql4/bin/mysqldump',
60
+ '/xampp/mysql/bin/mysqldump',
61
+ '/Program Files/xampp/mysql/bin/mysqldump',
62
+ '/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump',
63
+ '/Program Files/MySQL/MySQL Server 5.7/bin/mysqldump',
64
+ '/Program Files/MySQL/MySQL Server 5.6/bin/mysqldump',
65
+ '/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
66
+ '/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump',
67
+ '/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump',
68
+ '/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump',
69
+ '/Program Files/MySQL/MySQL Server 4.1/bin/mysqldump',
70
+ '/opt/local/bin/mysqldump',
71
+ );
72
+
73
+ $this->mysqldump_executable_path = Backup_Utilities::get_executable_path( $paths );
74
+
75
+ }
76
+
77
+ return $this->mysqldump_executable_path;
78
+
79
+ }
80
+
81
+ /**
82
+ * Perform the database backup.
83
+ *
84
+ * @return bool Whether the backup completed successfully or not.
85
+ */
86
+ public function backup() {
87
+
88
+ if ( ! $this->get_mysqldump_executable_path() ) {
89
+ return false;
90
+ }
91
+
92
+ // Grab the database connections args
93
+ $args = $this->get_mysql_connection_args();
94
+
95
+ // Allow lock-tables to be overridden
96
+ if ( defined( 'HMBKP_MYSQLDUMP_SINGLE_TRANSACTION' ) && HMBKP_MYSQLDUMP_SINGLE_TRANSACTION ) {
97
+ $args[] = '--single-transaction';
98
+ }
99
+
100
+ // Make sure binary data is exported properly
101
+ $args[] = '--hex-blob';
102
+
103
+ // The file we're saving too
104
+ $args[] = '-r ' . escapeshellarg( $this->get_backup_filepath() );
105
+
106
+ // The database we're dumping
107
+ $args[] = escapeshellarg( $this->get_name() );
108
+
109
+ $process = new Process( $this->get_mysqldump_executable_path() . ' ' . implode( ' ', $args ) );
110
+ $process->setTimeout( HOUR_IN_SECONDS );
111
+
112
+ try {
113
+ $process->run();
114
+ } catch ( \Exception $e ) {
115
+ $this->error( __CLASS__, $e->getMessage() );
116
+ }
117
+
118
+ if ( ! $process->isSuccessful() ) {
119
+ $this->error( __CLASS__, $process->getErrorOutput() );
120
+ }
121
+
122
+ return $this->verify_backup();
123
+
124
+ }
125
+
126
+ /**
127
+ * Get the connection args for the mysqldump command
128
+ *
129
+ * @return string[] The array of connection args
130
+ */
131
+ public function get_mysql_connection_args() {
132
+
133
+ $args = array();
134
+
135
+ $args[] = '-u ' . escapeshellarg( $this->get_user() );
136
+
137
+ if ( $this->get_password() ) {
138
+ $args[] = '-p' . escapeshellarg( $this->get_password() );
139
+ }
140
+
141
+ $args[] = '-h ' . escapeshellarg( $this->get_host() );
142
+
143
+ if ( $this->get_port() ) {
144
+ $args[] = '-P ' . escapeshellarg( $this->get_port() );
145
+ }
146
+
147
+ if ( $this->get_socket() ) {
148
+ $args[] = '--protocol=socket -S ' . escapeshellarg( $this->get_socket() );
149
+ }
150
+
151
+ return $args;
152
+
153
+ }
154
+ }
classes/backup/class-backup-engine-database.php CHANGED
@@ -1,214 +1,214 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * The Database Backup Engine type
7
- *
8
- * All Database Backup Engine implementations should extend this class
9
- */
10
- abstract class Database_Backup_Engine extends Backup_Engine {
11
-
12
- /**
13
- * The filename for the resulting Backup
14
- *
15
- * @var string
16
- */
17
- public $backup_filename = '';
18
-
19
- /**
20
- * The database host string, typically the value of
21
- * the `DB_HOST` Constant.
22
- *
23
- * @var string
24
- */
25
- private $host = '';
26
-
27
- /**
28
- * The database socket, if it's using a socket connection
29
- *
30
- * @var string
31
- */
32
- private $socket = '';
33
-
34
- /**
35
- * The database port, if a custom one is set
36
- *
37
- * @var integer
38
- */
39
- private $port = 0;
40
-
41
- /**
42
- * Individual Database Backup Engine implementations must include
43
- * a backup method at a minimum.
44
- *
45
- * @return bool Whether the backup completed successfully or not.
46
- */
47
- abstract public function backup();
48
-
49
- /**
50
- * Setup some general database backup settings
51
- *
52
- * Child classes must call `parent::__construct` in their own constructor.
53
- */
54
- public function __construct() {
55
-
56
- parent::__construct();
57
-
58
- $this->parse_db_host_constant();
59
-
60
- // Set a default backup filename
61
- $this->set_backup_filename( 'database-' . $this->get_name() . '.sql' );
62
-
63
- }
64
-
65
- /**
66
- * Get the database charset setting.
67
- *
68
- * @return string The database charset.
69
- */
70
- public function get_charset() {
71
- global $wpdb;
72
- return $wpdb->charset;
73
- }
74
-
75
- /**
76
- * Get the database collate setting.
77
- *
78
- * @return string The database collage setting.
79
- */
80
- public function get_collate() {
81
- global $wpdb;
82
- return $wpdb->collate;
83
- }
84
-
85
- /**
86
- * Get the database name.
87
- *
88
- * @return string The database name.
89
- */
90
- public function get_name() {
91
- global $wpdb;
92
- return $wpdb->dbname;
93
- }
94
-
95
- /**
96
- * Get the database user.
97
- *
98
- * @return string The database user.
99
- */
100
- public function get_user() {
101
- global $wpdb;
102
- return $wpdb->dbuser;
103
- }
104
-
105
- /**
106
- * Get the database password.
107
- *
108
- * @return string The database password.
109
- */
110
- public function get_password() {
111
- global $wpdb;
112
- return $wpdb->dbpassword;
113
- }
114
-
115
- /**
116
- * Get the database hostname.
117
- *
118
- * @return string The database hostname.
119
- */
120
- public function get_host() {
121
- return $this->host;
122
- }
123
-
124
- /**
125
- * Get the database port.
126
- *
127
- * @return int The database port.
128
- */
129
- public function get_port() {
130
- return $this->port;
131
- }
132
-
133
- /**
134
- * Get the database socket.
135
- *
136
- * @return string The database socket.
137
- */
138
- public function get_socket() {
139
- return $this->socket;
140
- }
141
-
142
- /**
143
- * Parse the `DB_HOST` constant.
144
- *
145
- * The `DB_HOST` constant potentially contains the hostname, port or socket.
146
- * We need to parse it to figure out the type of mysql connection to make.
147
- *
148
- * @param string $constant The Constant to parse. If the string isn't a
149
- * defined Constant then it will be parsed directly.
150
- */
151
- public function parse_db_host_constant( $constant = 'DB_HOST' ) {
152
-
153
- // If we've been passed a Constant then grab it's contents
154
- if ( defined( $constant ) ) {
155
- $constant = constant( $constant );
156
- }
157
-
158
- // If we weren't passed a Constant then just parse the string directly.
159
- $this->host = (string) $constant;
160
-
161
- // Grab the part after :, it could either be a port or a socket
162
- $port_or_socket = strstr( $constant, ':' );
163
-
164
- if ( $port_or_socket ) {
165
-
166
- // The host is the bit up to the :
167
- $this->host = substr( $constant, 0, strpos( $constant, ':' ) );
168
-
169
- // Strip the :
170
- $port_or_socket = substr( $port_or_socket, 1 );
171
-
172
- if ( 0 !== strpos( $port_or_socket, '/' ) ) {
173
-
174
- $this->port = intval( $port_or_socket );
175
- $maybe_socket = strstr( $port_or_socket, ':' );
176
-
177
- if ( ! empty( $maybe_socket ) ) {
178
- $this->socket = substr( $maybe_socket, 1 );
179
- }
180
- } else {
181
- $this->socket = $port_or_socket;
182
- }
183
- }
184
- }
185
-
186
- /**
187
- * Verify that the database backup was successful.
188
- *
189
- * It's important this function is performant as it's called after every
190
- * backup.
191
- *
192
- * @return bool Whether the backup completed successfully
193
- */
194
- public function verify_backup() {
195
-
196
- // If there are errors delete the database dump file
197
- if ( $this->get_errors( get_called_class() ) && file_exists( $this->get_backup_filepath() ) ) {
198
- unlink( $this->get_backup_filepath() );
199
- }
200
-
201
- // If we have an empty file delete it
202
- if ( @filesize( $this->get_backup_filepath() ) === 0 ) {
203
- unlink( $this->get_backup_filepath() );
204
- }
205
-
206
- // If the database backup doesn't exist then the backup must have failed
207
- if ( ! file_exists( $this->get_backup_filepath() ) ) {
208
- return false;
209
- }
210
-
211
- return true;
212
-
213
- }
214
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * The Database Backup Engine type
7
+ *
8
+ * All Database Backup Engine implementations should extend this class
9
+ */
10
+ abstract class Database_Backup_Engine extends Backup_Engine {
11
+
12
+ /**
13
+ * The filename for the resulting Backup
14
+ *
15
+ * @var string
16
+ */
17
+ public $backup_filename = '';
18
+
19
+ /**
20
+ * The database host string, typically the value of
21
+ * the `DB_HOST` Constant.
22
+ *
23
+ * @var string
24
+ */
25
+ private $host = '';
26
+
27
+ /**
28
+ * The database socket, if it's using a socket connection
29
+ *
30
+ * @var string
31
+ */
32
+ private $socket = '';
33
+
34
+ /**
35
+ * The database port, if a custom one is set
36
+ *
37
+ * @var integer
38
+ */
39
+ private $port = 0;
40
+
41
+ /**
42
+ * Individual Database Backup Engine implementations must include
43
+ * a backup method at a minimum.
44
+ *
45
+ * @return bool Whether the backup completed successfully or not.
46
+ */
47
+ abstract public function backup();
48
+
49
+ /**
50
+ * Setup some general database backup settings
51
+ *
52
+ * Child classes must call `parent::__construct` in their own constructor.
53
+ */
54
+ public function __construct() {
55
+
56
+ parent::__construct();
57
+
58
+ $this->parse_db_host_constant();
59
+
60
+ // Set a default backup filename
61
+ $this->set_backup_filename( 'database-' . $this->get_name() . '.sql' );
62
+
63
+ }
64
+
65
+ /**
66
+ * Get the database charset setting.
67
+ *
68
+ * @return string The database charset.
69
+ */
70
+ public function get_charset() {
71
+ global $wpdb;
72
+ return $wpdb->charset;
73
+ }
74
+
75
+ /**
76
+ * Get the database collate setting.
77
+ *
78
+ * @return string The database collage setting.
79
+ */
80
+ public function get_collate() {
81
+ global $wpdb;
82
+ return $wpdb->collate;
83
+ }
84
+
85
+ /**
86
+ * Get the database name.
87
+ *
88
+ * @return string The database name.
89
+ */
90
+ public function get_name() {
91
+ global $wpdb;
92
+ return $wpdb->dbname;
93
+ }
94
+
95
+ /**
96
+ * Get the database user.
97
+ *
98
+ * @return string The database user.
99
+ */
100
+ public function get_user() {
101
+ global $wpdb;
102
+ return $wpdb->dbuser;
103
+ }
104
+
105
+ /**
106
+ * Get the database password.
107
+ *
108
+ * @return string The database password.
109
+ */
110
+ public function get_password() {
111
+ global $wpdb;
112
+ return $wpdb->dbpassword;
113
+ }
114
+
115
+ /**
116
+ * Get the database hostname.
117
+ *
118
+ * @return string The database hostname.
119
+ */
120
+ public function get_host() {
121
+ return $this->host;
122
+ }
123
+
124
+ /**
125
+ * Get the database port.
126
+ *
127
+ * @return int The database port.
128
+ */
129
+ public function get_port() {
130
+ return $this->port;
131
+ }
132
+
133
+ /**
134
+ * Get the database socket.
135
+ *
136
+ * @return string The database socket.
137
+ */
138
+ public function get_socket() {
139
+ return $this->socket;
140
+ }
141
+
142
+ /**
143
+ * Parse the `DB_HOST` constant.
144
+ *
145
+ * The `DB_HOST` constant potentially contains the hostname, port or socket.
146
+ * We need to parse it to figure out the type of mysql connection to make.
147
+ *
148
+ * @param string $constant The Constant to parse. If the string isn't a
149
+ * defined Constant then it will be parsed directly.
150
+ */
151
+ public function parse_db_host_constant( $constant = 'DB_HOST' ) {
152
+
153
+ // If we've been passed a Constant then grab it's contents
154
+ if ( defined( $constant ) ) {
155
+ $constant = constant( $constant );
156
+ }
157
+
158
+ // If we weren't passed a Constant then just parse the string directly.
159
+ $this->host = (string) $constant;
160
+
161
+ // Grab the part after :, it could either be a port or a socket
162
+ $port_or_socket = strstr( $constant, ':' );
163
+
164
+ if ( $port_or_socket ) {
165
+
166
+ // The host is the bit up to the :
167
+ $this->host = substr( $constant, 0, strpos( $constant, ':' ) );
168
+
169
+ // Strip the :
170
+ $port_or_socket = substr( $port_or_socket, 1 );
171
+
172
+ if ( 0 !== strpos( $port_or_socket, '/' ) ) {
173
+
174
+ $this->port = intval( $port_or_socket );
175
+ $maybe_socket = strstr( $port_or_socket, ':' );
176
+
177
+ if ( ! empty( $maybe_socket ) ) {
178
+ $this->socket = substr( $maybe_socket, 1 );
179
+ }
180
+ } else {
181
+ $this->socket = $port_or_socket;
182
+ }
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Verify that the database backup was successful.
188
+ *
189
+ * It's important this function is performant as it's called after every
190
+ * backup.
191
+ *
192
+ * @return bool Whether the backup completed successfully
193
+ */
194
+ public function verify_backup() {
195
+
196
+ // If there are errors delete the database dump file
197
+ if ( $this->get_errors( get_called_class() ) && file_exists( $this->get_backup_filepath() ) ) {
198
+ unlink( $this->get_backup_filepath() );
199
+ }
200
+
201
+ // If we have an empty file delete it
202
+ if ( @filesize( $this->get_backup_filepath() ) === 0 ) {
203
+ unlink( $this->get_backup_filepath() );
204
+ }
205
+
206
+ // If the database backup doesn't exist then the backup must have failed
207
+ if ( ! file_exists( $this->get_backup_filepath() ) ) {
208
+ return false;
209
+ }
210
+
211
+ return true;
212
+
213
+ }
214
+ }
classes/backup/class-backup-engine-file-zip-archive.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Perform a file backup using the native PHP ZipArchive extension
7
- */
8
- class Zip_Archive_File_Backup_Engine extends File_Backup_Engine {
9
-
10
- public function __construct() {
11
- parent::__construct();
12
- }
13
-
14
- public function backup() {
15
-
16
- if ( ! class_exists( 'ZipArchive' ) ) {
17
- return false;
18
- }
19
-
20
- $zip = new \ZipArchive();
21
-
22
- // Attempt to create the zip file.
23
- if ( $zip->open( $this->get_backup_filepath(), \ZIPARCHIVE::CREATE ) ) {
24
-
25
- foreach ( $this->get_files() as $file ) {
26
-
27
- // Create an empty directory for each directory in the filesystem
28
- if ( $file->isDir() ) {
29
- $zip->addEmptyDir( $file->getRelativePathname() );
30
- } elseif ( $file->isFile() ) { // Archive the file with a relative path
31
- $zip->addFile( $file->getPathname(), $file->getRelativePathname() );
32
- }
33
- }
34
-
35
- // Track any internal warnings
36
- if ( $zip->status ) {
37
- $this->warning( __CLASS__, $zip->status );
38
- }
39
-
40
- // @codingStandardsIgnoreStart
41
- if ( $zip->statusSys ) {
42
- $this->warning( __CLASS__, $zip->statusSys );
43
- }
44
- // @codingStandardsIgnoreEnd
45
-
46
- $zip->close();
47
-
48
- }
49
-
50
- return $this->verify_backup();
51
-
52
- }
53
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Perform a file backup using the native PHP ZipArchive extension
7
+ */
8
+ class Zip_Archive_File_Backup_Engine extends File_Backup_Engine {
9
+
10
+ public function __construct() {
11
+ parent::__construct();
12
+ }
13
+
14
+ public function backup() {
15
+
16
+ if ( ! class_exists( 'ZipArchive' ) ) {
17
+ return false;
18
+ }
19
+
20
+ $zip = new \ZipArchive();
21
+
22
+ // Attempt to create the zip file.
23
+ if ( $zip->open( $this->get_backup_filepath(), \ZIPARCHIVE::CREATE ) ) {
24
+
25
+ foreach ( $this->get_files() as $file ) {
26
+
27
+ // Create an empty directory for each directory in the filesystem
28
+ if ( $file->isDir() ) {
29
+ $zip->addEmptyDir( $file->getRelativePathname() );
30
+ } elseif ( $file->isFile() ) { // Archive the file with a relative path
31
+ $zip->addFile( $file->getPathname(), $file->getRelativePathname() );
32
+ }
33
+ }
34
+
35
+ // Track any internal warnings
36
+ if ( $zip->status ) {
37
+ $this->warning( __CLASS__, $zip->status );
38
+ }
39
+
40
+ // @codingStandardsIgnoreStart
41
+ if ( $zip->statusSys ) {
42
+ $this->warning( __CLASS__, $zip->statusSys );
43
+ }
44
+ // @codingStandardsIgnoreEnd
45
+
46
+ $zip->close();
47
+
48
+ }
49
+
50
+ return $this->verify_backup();
51
+
52
+ }
53
+ }
classes/backup/class-backup-engine-file-zip.php CHANGED
@@ -1,172 +1,172 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- use Symfony\Component\Process\Process as Process;
6
-
7
- /**
8
- * Perform a file backup using the zip cli command
9
- */
10
- class Zip_File_Backup_Engine extends File_Backup_Engine {
11
-
12
- /**
13
- * The path to the zip executable
14
- *
15
- * @var string|false
16
- */
17
- private $zip_executable_path = '';
18
-
19
- public function __construct() {
20
- parent::__construct();
21
- }
22
-
23
- /**
24
- * Calculate the path to the zip executable.
25
- *
26
- * The executable path can be overridden using either the `HMBKP_ZIP_PATH`
27
- * Constant or the `hmbkp_zip_executable_path` filter.
28
- *
29
- * If neither of those are set then we fallback to checking a number of
30
- * common locations.
31
- *
32
- * @return string|false The path to the executable or false.
33
- */
34
- public function get_zip_executable_path() {
35
-
36
- if ( defined( 'HMBKP_ZIP_PATH' ) ) {
37
- return HMBKP_ZIP_PATH;
38
- }
39
-
40
- /**
41
- * Allow the executable path to be set via a filter
42
- *
43
- * @param string The path to the zip executable
44
- */
45
- $this->zip_executable_path = apply_filters( 'hmbkp_zip_executable_path', '' );
46
-
47
- if ( ! $this->zip_executable_path ) {
48
-
49
- // List of possible zip locations
50
- $paths = array(
51
- 'zip',
52
- '/usr/bin/zip',
53
- '/usr/local/bin/zip',
54
- '/opt/local/bin/zip',
55
- );
56
-
57
- $this->zip_executable_path = Backup_Utilities::get_executable_path( $paths );
58
-
59
- }
60
-
61
- return $this->zip_executable_path;
62
-
63
- }
64
-
65
- /**
66
- * Perform the file backup.
67
- *
68
- * @return bool Whether the backup completed successfully or not.
69
- */
70
- public function backup() {
71
-
72
- if ( ! $this->get_zip_executable_path() ) {
73
- return false;
74
- }
75
-
76
- $command = array();
77
-
78
- // cd to the site root
79
- $command[] = 'cd ' . escapeshellarg( Path::get_root() );
80
-
81
- // Run the zip command with the recursive and quiet flags
82
- $command[] = '&& ' . escapeshellcmd( $this->get_zip_executable_path() ) . ' -rq';
83
-
84
- // Save the zip file to the correct path
85
- $command[] = escapeshellarg( $this->get_backup_filepath() ) . ' ./';
86
-
87
- // Pass exclude rules in if we have them
88
- if ( $this->get_exclude_string() ) {
89
- $command[] = '-x ' . $this->get_exclude_string();
90
- }
91
-
92
- $command = implode( ' ', $command );
93
-
94
- $process = new Process( $command );
95
- $process->setTimeout( HOUR_IN_SECONDS );
96
-
97
- try {
98
- $process->run();
99
- } catch ( \Exception $e ) {
100
- $this->error( __CLASS__, $e->getMessage() );
101
- }
102
-
103
- if ( ! $process->isSuccessful() ) {
104
-
105
- /**
106
- * Exit Code 18 is returned when an unreadable file is encountered during the zip process.
107
- *
108
- * Given the zip process still completes correctly and the unreadable file is simple skipped
109
- * we don't want to treat 18 as an actual error.
110
- */
111
- if ( $process->getExitCode() !== 18 ) {
112
- $this->error( __CLASS__, $process->getErrorOutput() );
113
- }
114
- }
115
-
116
- return $this->verify_backup();
117
-
118
- }
119
-
120
- /**
121
- * Convert the exclude rules to a format zip accepts
122
- *
123
- * @return string The exclude string ready to pass to `zip -x`
124
- */
125
- public function get_exclude_string() {
126
-
127
- if ( empty( $this->excludes ) ) {
128
- return '';
129
- }
130
-
131
- $excludes = $this->excludes->get_excludes();
132
-
133
- foreach ( $excludes as $key => &$rule ) {
134
-
135
- $file = $absolute = $fragment = false;
136
-
137
- // Files don't end with /
138
- if ( ! in_array( substr( $rule, - 1 ), array( '\\', '/' ) ) ) {
139
- $file = true;
140
- } // If rule starts with a / then treat as absolute path
141
- elseif ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) {
142
- $absolute = true;
143
- } // Otherwise treat as dir fragment
144
- else {
145
- $fragment = true;
146
- }
147
-
148
- $rule = str_ireplace( Path::get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) );
149
-
150
- // Strip the preceeding slash
151
- if ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) {
152
- $rule = substr( $rule, 1 );
153
- }
154
-
155
- // Wrap directory fragments and files in wildcards for zip
156
- if ( $fragment || $file ) {
157
- $rule = '*' . $rule . '*';
158
- }
159
-
160
- // Add a wildcard to the end of absolute url for zips
161
- if ( $absolute ) {
162
- $rule .= '*';
163
- }
164
- }
165
-
166
- // Escape shell args for zip command
167
- $excludes = array_map( 'escapeshellarg', array_unique( $excludes ) );
168
-
169
- return implode( ' -x ', $excludes );
170
-
171
- }
172
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ use Symfony\Component\Process\Process as Process;
6
+
7
+ /**
8
+ * Perform a file backup using the zip cli command
9
+ */
10
+ class Zip_File_Backup_Engine extends File_Backup_Engine {
11
+
12
+ /**
13
+ * The path to the zip executable
14
+ *
15
+ * @var string|false
16
+ */
17
+ private $zip_executable_path = '';
18
+
19
+ public function __construct() {
20
+ parent::__construct();
21
+ }
22
+
23
+ /**
24
+ * Calculate the path to the zip executable.
25
+ *
26
+ * The executable path can be overridden using either the `HMBKP_ZIP_PATH`
27
+ * Constant or the `hmbkp_zip_executable_path` filter.
28
+ *
29
+ * If neither of those are set then we fallback to checking a number of
30
+ * common locations.
31
+ *
32
+ * @return string|false The path to the executable or false.
33
+ */
34
+ public function get_zip_executable_path() {
35
+
36
+ if ( defined( 'HMBKP_ZIP_PATH' ) ) {
37
+ return HMBKP_ZIP_PATH;
38
+ }
39
+
40
+ /**
41
+ * Allow the executable path to be set via a filter
42
+ *
43
+ * @param string The path to the zip executable
44
+ */
45
+ $this->zip_executable_path = apply_filters( 'hmbkp_zip_executable_path', '' );
46
+
47
+ if ( ! $this->zip_executable_path ) {
48
+
49
+ // List of possible zip locations
50
+ $paths = array(
51
+ 'zip',
52
+ '/usr/bin/zip',
53
+ '/usr/local/bin/zip',
54
+ '/opt/local/bin/zip',
55
+ );
56
+
57
+ $this->zip_executable_path = Backup_Utilities::get_executable_path( $paths );
58
+
59
+ }
60
+
61
+ return $this->zip_executable_path;
62
+
63
+ }
64
+
65
+ /**
66
+ * Perform the file backup.
67
+ *
68
+ * @return bool Whether the backup completed successfully or not.
69
+ */
70
+ public function backup() {
71
+
72
+ if ( ! $this->get_zip_executable_path() ) {
73
+ return false;
74
+ }
75
+
76
+ $command = array();
77
+
78
+ // cd to the site root
79
+ $command[] = 'cd ' . escapeshellarg( Path::get_root() );
80
+
81
+ // Run the zip command with the recursive and quiet flags
82
+ $command[] = '&& ' . escapeshellcmd( $this->get_zip_executable_path() ) . ' -rq';
83
+
84
+ // Save the zip file to the correct path
85
+ $command[] = escapeshellarg( $this->get_backup_filepath() ) . ' ./';
86
+
87
+ // Pass exclude rules in if we have them
88
+ if ( $this->get_exclude_string() ) {
89
+ $command[] = '-x ' . $this->get_exclude_string();
90
+ }
91
+
92
+ $command = implode( ' ', $command );
93
+
94
+ $process = new Process( $command );
95
+ $process->setTimeout( HOUR_IN_SECONDS );
96
+
97
+ try {
98
+ $process->run();
99
+ } catch ( \Exception $e ) {
100
+ $this->error( __CLASS__, $e->getMessage() );
101
+ }
102
+
103
+ if ( ! $process->isSuccessful() ) {
104
+
105
+ /**
106
+ * Exit Code 18 is returned when an unreadable file is encountered during the zip process.
107
+ *
108
+ * Given the zip process still completes correctly and the unreadable file is simple skipped
109
+ * we don't want to treat 18 as an actual error.
110
+ */
111
+ if ( $process->getExitCode() !== 18 ) {
112
+ $this->error( __CLASS__, $process->getErrorOutput() );
113
+ }
114
+ }
115
+
116
+ return $this->verify_backup();
117
+
118
+ }
119
+
120
+ /**
121
+ * Convert the exclude rules to a format zip accepts
122
+ *
123
+ * @return string The exclude string ready to pass to `zip -x`
124
+ */
125
+ public function get_exclude_string() {
126
+
127
+ if ( empty( $this->excludes ) ) {
128
+ return '';
129
+ }
130
+
131
+ $excludes = $this->excludes->get_excludes();
132
+
133
+ foreach ( $excludes as $key => &$rule ) {
134
+
135
+ $file = $absolute = $fragment = false;
136
+
137
+ // Files don't end with /
138
+ if ( ! in_array( substr( $rule, - 1 ), array( '\\', '/' ) ) ) {
139
+ $file = true;
140
+ } // If rule starts with a / then treat as absolute path
141
+ elseif ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) {
142
+ $absolute = true;
143
+ } // Otherwise treat as dir fragment
144
+ else {
145
+ $fragment = true;
146
+ }
147
+
148
+ $rule = str_ireplace( Path::get_root(), '', untrailingslashit( wp_normalize_path( $rule ) ) );
149
+
150
+ // Strip the preceeding slash
151
+ if ( in_array( substr( $rule, 0, 1 ), array( '\\', '/' ) ) ) {
152
+ $rule = substr( $rule, 1 );
153
+ }
154
+
155
+ // Wrap directory fragments and files in wildcards for zip
156
+ if ( $fragment || $file ) {
157
+ $rule = '*' . $rule . '*';
158
+ }
159
+
160
+ // Add a wildcard to the end of absolute url for zips
161
+ if ( $absolute ) {
162
+ $rule .= '*';
163
+ }
164
+ }
165
+
166
+ // Escape shell args for zip command
167
+ $excludes = array_map( 'escapeshellarg', array_unique( $excludes ) );
168
+
169
+ return implode( ' -x ', $excludes );
170
+
171
+ }
172
+ }
classes/backup/class-backup-engine-file.php CHANGED
@@ -1,111 +1,111 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- use Symfony\Component\Finder\Finder as Finder;
6
-
7
- /**
8
- * The File Backup Engine type
9
- *
10
- * All File Backup Engine implementations should extend this class
11
- */
12
- abstract class File_Backup_Engine extends Backup_Engine {
13
-
14
- /**
15
- * The array of excludes rules
16
- *
17
- * @var Excludes
18
- */
19
- protected $excludes;
20
-
21
- /**
22
- * Set the default backup filename.
23
- */
24
- public function __construct() {
25
-
26
- parent::__construct();
27
-
28
- $this->set_backup_filename( implode( '-', array(
29
- str_ireplace( array( 'http://', 'https://', 'www' ), '', home_url() ),
30
- 'backup',
31
- current_time( 'Y-m-d-H-i-s' ),
32
- ) ) . '.zip' );
33
-
34
- $this->excludes = new Excludes;
35
-
36
- }
37
-
38
- /**
39
- * Set the excludes rules for the backup.
40
- *
41
- * @param Excludes $excludes The exclude rules.
42
- */
43
- public function set_excludes( Excludes $excludes ) {
44
- $this->excludes = $excludes;
45
- }
46
-
47
- /**
48
- * Returns a Finder instance for the files that will be included in the
49
- * backup.
50
- *
51
- * By default we ignore unreadable files and directories as well as, common
52
- * version control folders / files, "Dot" files and anything matching the
53
- * exclude rules.
54
- *
55
- * @uses Finder
56
- * @return SplFileInfo[] The array of all files to be included
57
- */
58
- public function get_files() {
59
-
60
- $finder = new Finder();
61
-
62
- $finder->followLinks(); // defaults to true
63
- $finder->ignoreDotFiles( false );
64
- $finder->ignoreVCS( true );
65
- $finder->ignoreUnreadableDirs( true );
66
-
67
- // Skip unreadable files too
68
- $finder->filter(
69
- function ( \SplFileInfo $file ) {
70
- if ( ! $file->isReadable() ) {
71
- return false;
72
- }
73
- }
74
- );
75
-
76
- // Finder expects exclude rules to be in a regex format
77
- $exclude_rules = $this->excludes->get_excludes_for_regex();
78
-
79
- // Skips folders/files that match default exclude patterns
80
- foreach ( $exclude_rules as $exclude ) {
81
- $finder->notPath( $exclude );
82
- }
83
-
84
- return $finder->in( Path::get_root() );
85
-
86
- }
87
-
88
- /**
89
- * Verify that the file backup completed successfully.
90
- *
91
- * This should be called from backup method of any final file backup engine
92
- * implementations.
93
- *
94
- * @return bool Whether the backup completed successfully.
95
- */
96
- public function verify_backup() {
97
-
98
- // If there are errors delete the backup file.
99
- if ( $this->get_errors( get_called_class() ) && file_exists( $this->get_backup_filepath() ) ) {
100
- unlink( $this->get_backup_filepath() );
101
- }
102
-
103
- // If the backup doesn't exist then we must have failed.
104
- if ( ! file_exists( $this->get_backup_filepath() ) ) {
105
- return false;
106
- }
107
-
108
- return true;
109
-
110
- }
111
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ use Symfony\Component\Finder\Finder as Finder;
6
+
7
+ /**
8
+ * The File Backup Engine type
9
+ *
10
+ * All File Backup Engine implementations should extend this class
11
+ */
12
+ abstract class File_Backup_Engine extends Backup_Engine {
13
+
14
+ /**
15
+ * The array of excludes rules
16
+ *
17
+ * @var Excludes
18
+ */
19
+ protected $excludes;
20
+
21
+ /**
22
+ * Set the default backup filename.
23
+ */
24
+ public function __construct() {
25
+
26
+ parent::__construct();
27
+
28
+ $this->set_backup_filename( implode( '-', array(
29
+ str_ireplace( array( 'http://', 'https://', 'www' ), '', home_url() ),
30
+ 'backup',
31
+ current_time( 'Y-m-d-H-i-s' ),
32
+ ) ) . '.zip' );
33
+
34
+ $this->excludes = new Excludes;
35
+
36
+ }
37
+
38
+ /**
39
+ * Set the excludes rules for the backup.
40
+ *
41
+ * @param Excludes $excludes The exclude rules.
42
+ */
43
+ public function set_excludes( Excludes $excludes ) {
44
+ $this->excludes = $excludes;
45
+ }
46
+
47
+ /**
48
+ * Returns a Finder instance for the files that will be included in the
49
+ * backup.
50
+ *
51
+ * By default we ignore unreadable files and directories as well as, common
52
+ * version control folders / files, "Dot" files and anything matching the
53
+ * exclude rules.
54
+ *
55
+ * @uses Finder
56
+ * @return SplFileInfo[] The array of all files to be included
57
+ */
58
+ public function get_files() {
59
+
60
+ $finder = new Finder();
61
+
62
+ $finder->followLinks(); // defaults to true
63
+ $finder->ignoreDotFiles( false );
64
+ $finder->ignoreVCS( true );
65
+ $finder->ignoreUnreadableDirs( true );
66
+
67
+ // Skip unreadable files too
68
+ $finder->filter(
69
+ function ( \SplFileInfo $file ) {
70
+ if ( ! $file->isReadable() ) {
71
+ return false;
72
+ }
73
+ }
74
+ );
75
+
76
+ // Finder expects exclude rules to be in a regex format
77
+ $exclude_rules = $this->excludes->get_excludes_for_regex();
78
+
79
+ // Skips folders/files that match default exclude patterns
80
+ foreach ( $exclude_rules as $exclude ) {
81
+ $finder->notPath( $exclude );
82
+ }
83
+
84
+ return $finder->in( Path::get_root() );
85
+
86
+ }
87
+
88
+ /**
89
+ * Verify that the file backup completed successfully.
90
+ *
91
+ * This should be called from backup method of any final file backup engine
92
+ * implementations.
93
+ *
94
+ * @return bool Whether the backup completed successfully.
95
+ */
96
+ public function verify_backup() {
97
+
98
+ // If there are errors delete the backup file.
99
+ if ( $this->get_errors( get_called_class() ) && file_exists( $this->get_backup_filepath() ) ) {
100
+ unlink( $this->get_backup_filepath() );
101
+ }
102
+
103
+ // If the backup doesn't exist then we must have failed.
104
+ if ( ! file_exists( $this->get_backup_filepath() ) ) {
105
+ return false;
106
+ }
107
+
108
+ return true;
109
+
110
+ }
111
+ }
classes/backup/class-backup-engine.php CHANGED
@@ -1,203 +1,203 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * The base Backup Engine
7
- *
8
- * Base Backup Engine types should extend this class and call parent::__construct in
9
- * there constructor.
10
- *
11
- * Defines base functionality shared across all types of backups
12
- */
13
- abstract class Backup_Engine {
14
-
15
- /**
16
- * The filename of the backup
17
- *
18
- * @var string
19
- */
20
- private $backup_filename = '';
21
-
22
- /**
23
- * An array of backup errors.
24
- *
25
- * @var array
26
- */
27
- private $errors = array();
28
-
29
- /**
30
- * An array of backup warnings.
31
- *
32
- * @var array
33
- */
34
- private $warnings = array();
35
-
36
- public function __construct() {
37
-
38
- /**
39
- * Raise the `memory_limit` and `max_execution time`
40
- *
41
- * Respects the WP_MAX_MEMORY_LIMIT Constant and the `admin_memory_limit`
42
- * filter.
43
- */
44
- @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
45
- @set_time_limit( 0 );
46
-
47
- // Set a custom error handler so we can track errors
48
- set_error_handler( array( $this, 'error_handler' ) );
49
-
50
- }
51
-
52
- /**
53
- * Backup Engine Types should always implement the `verify_backup` method.
54
- *
55
- * @return bool Whether the backup completed successfully or not.
56
- */
57
- abstract public function verify_backup();
58
-
59
- /**
60
- * Get the full filepath to the backup file.
61
- *
62
- * @return string The backup filepath.
63
- */
64
- public function get_backup_filepath() {
65
- return trailingslashit( Path::get_path() ) . $this->get_backup_filename();
66
- }
67
-
68
- /**
69
- * Get the filename of the backup.
70
- *
71
- * @return string The backup filename.
72
- */
73
- public function get_backup_filename() {
74
- return $this->backup_filename;
75
- }
76
-
77
- /**
78
- * Set the filename of the backup.
79
- *
80
- * @param string $filename The backup filename.
81
- */
82
- public function set_backup_filename( $filename ) {
83
- $this->backup_filename = strtolower( sanitize_file_name( remove_accents( $filename ) ) );
84
- }
85
-
86
- /**
87
- * Get the array of errors encountered during the backup process.
88
- *
89
- * @param string|null $context The context for the error, usually the Backup
90
- * Engine that encountered the error.
91
- *
92
- * @return array The array of errors.
93
- */
94
- public function get_errors( $context = null ) {
95
-
96
- // Only return a specific contexts errors.
97
- if ( ! empty( $context ) ) {
98
- return isset( $this->errors[ $context ] ) ? $this->errors[ $context ] : array();
99
- }
100
-
101
- return $this->errors;
102
-
103
- }
104
-
105
- /**
106
- * Add an error to the errors array.
107
- *
108
- * An error is always treat as fatal and should only be used for unrecoverable
109
- * issues with the backup process.
110
- *
111
- * @param string $context The context for the error.
112
- * @param string $error The error that was encountered.
113
- */
114
- public function error( $context, $error ) {
115
-
116
- if ( empty( $context ) || empty( $error ) ) {
117
- return;
118
- }
119
-
120
- // Ensure we don't store duplicate errors by md5'ing the error as the key
121
- $this->errors[ $context ][ md5( implode( ':', (array) $error ) ) ] = $error;
122
-
123
- }
124
-
125
- /**
126
- * Get the array of warnings encountered during the backup process.
127
- *
128
- * @param string|null $context The context for the warning, usually the Backup
129
- * Engine that encountered the warning.
130
- *
131
- * @return array The array of warnings.
132
- */
133
- public function get_warnings( $context = null ) {
134
-
135
- // Only return a specific contexts errors.
136
- if ( ! empty( $context ) ) {
137
- return isset( $this->warnings[ $context ] ) ? $this->warnings[ $context ] : array();
138
- }
139
-
140
- return $this->warnings;
141
-
142
- }
143
-
144
- /**
145
- * Add an warning to the errors warnings.
146
- *
147
- * A warning is always treat as non-fatal and should only be used for recoverable
148
- * issues with the backup process.
149
- *
150
- * @param string $context The context for the warning.
151
- * @param string $warning The warning that was encountered.
152
- */
153
- public function warning( $context, $warning ) {
154
-
155
- if ( empty( $context ) || empty( $warning ) ) {
156
- return;
157
- }
158
-
159
- // Ensure we don't store duplicate warnings by md5'ing the error as the key
160
- $this->warnings[ $context ][ md5( implode( ':', (array) $warning ) ) ] = $warning;
161
-
162
- }
163
-
164
- /**
165
- * Hooked into `set_error_handler` to catch any PHP errors that happen during
166
- * the backup process.
167
- *
168
- * PHP errors are always treat as warnings rather than errors.
169
- *
170
- * @param int $type The level of error raised.
171
- *
172
- * @return boolean Return false to pass the error back to PHP so it can
173
- * be handled natively.
174
- */
175
- public function error_handler( $type ) {
176
-
177
- // Skip strict & deprecated warnings.
178
- if ( ( defined( 'E_DEPRECATED' ) && E_DEPRECATED === $type ) || ( defined( 'E_STRICT' ) && E_STRICT === $type ) || 0 === error_reporting() ) {
179
- return false;
180
- }
181
-
182
- /**
183
- * Get the details of the error.
184
- *
185
- * These are:
186
- *
187
- * @param int $errorno The error level expressed as an integer.
188
- * @param string $errstr The error message.
189
- * @param string $errfile The file that the error raised in.
190
- * @param string $errorline The line number the error was raised on.
191
- */
192
- $args = func_get_args();
193
-
194
- // Strip the error level
195
- array_shift( $args );
196
-
197
- // Fire a warning for the PHP error passing the message, file and line number.
198
- $this->warning( 'php', implode( ', ', array_splice( $args, 0, 3 ) ) );
199
-
200
- return false;
201
-
202
- }
203
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * The base Backup Engine
7
+ *
8
+ * Base Backup Engine types should extend this class and call parent::__construct in
9
+ * there constructor.
10
+ *
11
+ * Defines base functionality shared across all types of backups
12
+ */
13
+ abstract class Backup_Engine {
14
+
15
+ /**
16
+ * The filename of the backup
17
+ *
18
+ * @var string
19
+ */
20
+ private $backup_filename = '';
21
+
22
+ /**
23
+ * An array of backup errors.
24
+ *
25
+ * @var array
26
+ */
27
+ private $errors = array();
28
+
29
+ /**
30
+ * An array of backup warnings.
31
+ *
32
+ * @var array
33
+ */
34
+ private $warnings = array();
35
+
36
+ public function __construct() {
37
+
38
+ /**
39
+ * Raise the `memory_limit` and `max_execution time`
40
+ *
41
+ * Respects the WP_MAX_MEMORY_LIMIT Constant and the `admin_memory_limit`
42
+ * filter.
43
+ */
44
+ @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
45
+ @set_time_limit( 0 );
46
+
47
+ // Set a custom error handler so we can track errors
48
+ set_error_handler( array( $this, 'error_handler' ) );
49
+
50
+ }
51
+
52
+ /**
53
+ * Backup Engine Types should always implement the `verify_backup` method.
54
+ *
55
+ * @return bool Whether the backup completed successfully or not.
56
+ */
57
+ abstract public function verify_backup();
58
+
59
+ /**
60
+ * Get the full filepath to the backup file.
61
+ *
62
+ * @return string The backup filepath.
63
+ */
64
+ public function get_backup_filepath() {
65
+ return trailingslashit( Path::get_path() ) . $this->get_backup_filename();
66
+ }
67
+
68
+ /**
69
+ * Get the filename of the backup.
70
+ *
71
+ * @return string The backup filename.
72
+ */
73
+ public function get_backup_filename() {
74
+ return $this->backup_filename;
75
+ }
76
+
77
+ /**
78
+ * Set the filename of the backup.
79
+ *
80
+ * @param string $filename The backup filename.
81
+ */
82
+ public function set_backup_filename( $filename ) {
83
+ $this->backup_filename = strtolower( sanitize_file_name( remove_accents( $filename ) ) );
84
+ }
85
+
86
+ /**
87
+ * Get the array of errors encountered during the backup process.
88
+ *
89
+ * @param string|null $context The context for the error, usually the Backup
90
+ * Engine that encountered the error.
91
+ *
92
+ * @return array The array of errors.
93
+ */
94
+ public function get_errors( $context = null ) {
95
+
96
+ // Only return a specific contexts errors.
97
+ if ( ! empty( $context ) ) {
98
+ return isset( $this->errors[ $context ] ) ? $this->errors[ $context ] : array();
99
+ }
100
+
101
+ return $this->errors;
102
+
103
+ }
104
+
105
+ /**
106
+ * Add an error to the errors array.
107
+ *
108
+ * An error is always treat as fatal and should only be used for unrecoverable
109
+ * issues with the backup process.
110
+ *
111
+ * @param string $context The context for the error.
112
+ * @param string $error The error that was encountered.
113
+ */
114
+ public function error( $context, $error ) {
115
+
116
+ if ( empty( $context ) || empty( $error ) ) {
117
+ return;
118
+ }
119
+
120
+ // Ensure we don't store duplicate errors by md5'ing the error as the key
121
+ $this->errors[ $context ][ md5( implode( ':', (array) $error ) ) ] = $error;
122
+
123
+ }
124
+
125
+ /**
126
+ * Get the array of warnings encountered during the backup process.
127
+ *
128
+ * @param string|null $context The context for the warning, usually the Backup
129
+ * Engine that encountered the warning.
130
+ *
131
+ * @return array The array of warnings.
132
+ */
133
+ public function get_warnings( $context = null ) {
134
+
135
+ // Only return a specific contexts errors.
136
+ if ( ! empty( $context ) ) {
137
+ return isset( $this->warnings[ $context ] ) ? $this->warnings[ $context ] : array();
138
+ }
139
+
140
+ return $this->warnings;
141
+
142
+ }
143
+
144
+ /**
145
+ * Add an warning to the errors warnings.
146
+ *
147
+ * A warning is always treat as non-fatal and should only be used for recoverable
148
+ * issues with the backup process.
149
+ *
150
+ * @param string $context The context for the warning.
151
+ * @param string $warning The warning that was encountered.
152
+ */
153
+ public function warning( $context, $warning ) {
154
+
155
+ if ( empty( $context ) || empty( $warning ) ) {
156
+ return;
157
+ }
158
+
159
+ // Ensure we don't store duplicate warnings by md5'ing the error as the key
160
+ $this->warnings[ $context ][ md5( implode( ':', (array) $warning ) ) ] = $warning;
161
+
162
+ }
163
+
164
+ /**
165
+ * Hooked into `set_error_handler` to catch any PHP errors that happen during
166
+ * the backup process.
167
+ *
168
+ * PHP errors are always treat as warnings rather than errors.
169
+ *
170
+ * @param int $type The level of error raised.
171
+ *
172
+ * @return boolean Return false to pass the error back to PHP so it can
173
+ * be handled natively.
174
+ */
175
+ public function error_handler( $type ) {
176
+
177
+ // Skip strict & deprecated warnings.
178
+ if ( ( defined( 'E_DEPRECATED' ) && E_DEPRECATED === $type ) || ( defined( 'E_STRICT' ) && E_STRICT === $type ) || 0 === error_reporting() ) {
179
+ return false;
180
+ }
181
+
182
+ /**
183
+ * Get the details of the error.
184
+ *
185
+ * These are:
186
+ *
187
+ * @param int $errorno The error level expressed as an integer.
188
+ * @param string $errstr The error message.
189
+ * @param string $errfile The file that the error raised in.
190
+ * @param string $errorline The line number the error was raised on.
191
+ */
192
+ $args = func_get_args();
193
+
194
+ // Strip the error level
195
+ array_shift( $args );
196
+
197
+ // Fire a warning for the PHP error passing the message, file and line number.
198
+ $this->warning( 'php', implode( ', ', array_splice( $args, 0, 3 ) ) );
199
+
200
+ return false;
201
+
202
+ }
203
+ }
classes/backup/class-backup-status.php CHANGED
@@ -1,125 +1,125 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Manages status and progress of a backup
7
- */
8
- class Backup_Status {
9
-
10
- private $filename = '';
11
- private $id;
12
-
13
- public function __construct( $id ) {
14
- $this->id = $id;
15
- }
16
-
17
- public function start( $backup_filename, $status_message ) {
18
- $this->filename = $backup_filename;
19
- $this->set_status( $status_message );
20
- }
21
-
22
- /**
23
- * Get the filename of the backup.
24
- *
25
- * @return string|null The backup filename.
26
- */
27
- public function get_backup_filename() {
28
-
29
- if ( $this->is_started() ) {
30
- $status = json_decode( file_get_contents( $this->get_status_filepath() ) );
31
-
32
- if ( ! empty( $status->filename ) ) {
33
- $this->filename = $status->filename;
34
- }
35
- }
36
-
37
- return $this->filename;
38
- }
39
-
40
- public function is_started() {
41
- return (bool) file_exists( $this->get_status_filepath() );
42
- }
43
-
44
- public function finish() {
45
- // Delete the backup running file
46
- if ( file_exists( $this->get_status_filepath() ) ) {
47
- unlink( $this->get_status_filepath() );
48
- }
49
- }
50
-
51
- /**
52
- * Get the status of the running backup.
53
- *
54
- * @return string
55
- */
56
- public function get_status() {
57
-
58
- if ( ! file_exists( $this->get_status_filepath() ) ) {
59
- return '';
60
- }
61
-
62
- $status = json_decode( file_get_contents( $this->get_status_filepath() ) );
63
-
64
- if ( ! empty( $status->status ) ) {
65
- return $status->status;
66
- }
67
-
68
- return '';
69
-
70
- }
71
-
72
- /**
73
- * Set the status of the running backup
74
- *
75
- * @param string $message
76
- *
77
- * @return null
78
- */
79
- public function set_status( $message ) {
80
-
81
- // If start hasn't been called yet then we wont' have a backup filename
82
- if ( ! $this->filename ) {
83
- return;
84
- }
85
-
86
- $status = json_encode( (object) array(
87
- 'filename' => $this->filename,
88
- 'started' => $this->get_start_time(),
89
- 'status' => $message,
90
- ) );
91
-
92
- file_put_contents( $this->get_status_filepath(), $status );
93
-
94
- }
95
-
96
- /**
97
- * Get the time that the current running backup was started
98
- *
99
- * @return int $timestamp
100
- */
101
- public function get_start_time() {
102
-
103
- if ( ! file_exists( $this->get_status_filepath() ) ) {
104
- return 0;
105
- }
106
-
107
- $status = json_decode( file_get_contents( $this->get_status_filepath() ) );
108
-
109
- if ( ! empty( $status->started ) && (int) (string) $status->started === $status->started ) {
110
- return $status->started;
111
- }
112
-
113
- return time();
114
-
115
- }
116
-
117
- /**
118
- * Get the path to the backup running file that stores the running backup status
119
- *
120
- * @return string
121
- */
122
- public function get_status_filepath() {
123
- return Path::get_path() . '/.backup-' . $this->id . '-running';
124
- }
125
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Manages status and progress of a backup
7
+ */
8
+ class Backup_Status {
9
+
10
+ private $filename = '';
11
+ private $id;
12
+
13
+ public function __construct( $id ) {
14
+ $this->id = $id;
15
+ }
16
+
17
+ public function start( $backup_filename, $status_message ) {
18
+ $this->filename = $backup_filename;
19
+ $this->set_status( $status_message );
20
+ }
21
+
22
+ /**
23
+ * Get the filename of the backup.
24
+ *
25
+ * @return string|null The backup filename.
26
+ */
27
+ public function get_backup_filename() {
28
+
29
+ if ( $this->is_started() ) {
30
+ $status = json_decode( file_get_contents( $this->get_status_filepath() ) );
31
+
32
+ if ( ! empty( $status->filename ) ) {
33
+ $this->filename = $status->filename;
34
+ }
35
+ }
36
+
37
+ return $this->filename;
38
+ }
39
+
40
+ public function is_started() {
41
+ return (bool) file_exists( $this->get_status_filepath() );
42
+ }
43
+
44
+ public function finish() {
45
+ // Delete the backup running file
46
+ if ( file_exists( $this->get_status_filepath() ) ) {
47
+ unlink( $this->get_status_filepath() );
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Get the status of the running backup.
53
+ *
54
+ * @return string
55
+ */
56
+ public function get_status() {
57
+
58
+ if ( ! file_exists( $this->get_status_filepath() ) ) {
59
+ return '';
60
+ }
61
+
62
+ $status = json_decode( file_get_contents( $this->get_status_filepath() ) );
63
+
64
+ if ( ! empty( $status->status ) ) {
65
+ return $status->status;
66
+ }
67
+
68
+ return '';
69
+
70
+ }
71
+
72
+ /**
73
+ * Set the status of the running backup
74
+ *
75
+ * @param string $message
76
+ *
77
+ * @return null
78
+ */
79
+ public function set_status( $message ) {
80
+
81
+ // If start hasn't been called yet then we wont' have a backup filename
82
+ if ( ! $this->filename ) {
83
+ return;
84
+ }
85
+
86
+ $status = json_encode( (object) array(
87
+ 'filename' => $this->filename,
88
+ 'started' => $this->get_start_time(),
89
+ 'status' => $message,
90
+ ) );
91
+
92
+ file_put_contents( $this->get_status_filepath(), $status );
93
+
94
+ }
95
+
96
+ /**
97
+ * Get the time that the current running backup was started
98
+ *
99
+ * @return int $timestamp
100
+ */
101
+ public function get_start_time() {
102
+
103
+ if ( ! file_exists( $this->get_status_filepath() ) ) {
104
+ return 0;
105
+ }
106
+
107
+ $status = json_decode( file_get_contents( $this->get_status_filepath() ) );
108
+
109
+ if ( ! empty( $status->started ) && (int) (string) $status->started === $status->started ) {
110
+ return $status->started;
111
+ }
112
+
113
+ return time();
114
+
115
+ }
116
+
117
+ /**
118
+ * Get the path to the backup running file that stores the running backup status
119
+ *
120
+ * @return string
121
+ */
122
+ public function get_status_filepath() {
123
+ return Path::get_path() . '/.backup-' . $this->id . '-running';
124
+ }
125
+ }
classes/backup/class-backup-utilities.php CHANGED
@@ -1,70 +1,70 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- use Symfony\Component\Process\Process as Process;
6
-
7
- /**
8
- * A set of Backup Utility functions
9
- */
10
- class Backup_Utilities {
11
-
12
- /**
13
- * Checks whether Safe Mode is currently on
14
- *
15
- * @param string $ini_get_callback By default we use `ini_get` to check for
16
- * the Safe Mode setting but this can be
17
- * overridden for testing purposes.
18
- *
19
- * @return boolean Whether Safe Mode is on or off.
20
- */
21
- public static function is_safe_mode_on( $ini_get_callback = 'ini_get' ) {
22
-
23
- $safe_mode = @call_user_func( $ini_get_callback, 'safe_mode' );
24
-
25
- if ( $safe_mode && strtolower( $safe_mode ) !== 'off' ) {
26
- return true;
27
- }
28
-
29
- return false;
30
-
31
- }
32
-
33
- /**
34
- * Attempt to work out path to a cli executable.
35
- *
36
- * @param array $paths An array of paths to check against.
37
- *
38
- * @return string|false The path to the executable.
39
- */
40
- public static function get_executable_path( $paths ) {
41
-
42
- if ( ! function_exists( 'proc_open' ) || ! function_exists( 'proc_close' ) ) {
43
- return false;
44
- }
45
-
46
- $paths = array_map( 'wp_normalize_path', $paths );
47
-
48
- foreach ( $paths as $path ) {
49
-
50
- /**
51
- * Attempt to call `--version` on each path, the one which works
52
- * must be the correct path.
53
- */
54
- $process = new Process( $path . ' --version' );
55
-
56
- try {
57
- $process->run();
58
- } catch ( \Exception $e ) {
59
- return false;
60
- }
61
-
62
- if ( $process->isSuccessful() ) {
63
- return $path;
64
- }
65
- }
66
-
67
- return false;
68
-
69
- }
70
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ use Symfony\Component\Process\Process as Process;
6
+
7
+ /**
8
+ * A set of Backup Utility functions
9
+ */
10
+ class Backup_Utilities {
11
+
12
+ /**
13
+ * Checks whether Safe Mode is currently on
14
+ *
15
+ * @param string $ini_get_callback By default we use `ini_get` to check for
16
+ * the Safe Mode setting but this can be
17
+ * overridden for testing purposes.
18
+ *
19
+ * @return boolean Whether Safe Mode is on or off.
20
+ */
21
+ public static function is_safe_mode_on( $ini_get_callback = 'ini_get' ) {
22
+
23
+ $safe_mode = @call_user_func( $ini_get_callback, 'safe_mode' );
24
+
25
+ if ( $safe_mode && strtolower( $safe_mode ) !== 'off' ) {
26
+ return true;
27
+ }
28
+
29
+ return false;
30
+
31
+ }
32
+
33
+ /**
34
+ * Attempt to work out path to a cli executable.
35
+ *
36
+ * @param array $paths An array of paths to check against.
37
+ *
38
+ * @return string|false The path to the executable.
39
+ */
40
+ public static function get_executable_path( $paths ) {
41
+
42
+ if ( ! function_exists( 'proc_open' ) || ! function_exists( 'proc_close' ) ) {
43
+ return false;
44
+ }
45
+
46
+ $paths = array_map( 'wp_normalize_path', $paths );
47
+
48
+ foreach ( $paths as $path ) {
49
+
50
+ /**
51
+ * Attempt to call `--version` on each path, the one which works
52
+ * must be the correct path.
53
+ */
54
+ $process = new Process( $path . ' --version' );
55
+
56
+ try {
57
+ $process->run();
58
+ } catch ( \Exception $e ) {
59
+ return false;
60
+ }
61
+
62
+ if ( $process->isSuccessful() ) {
63
+ return $path;
64
+ }
65
+ }
66
+
67
+ return false;
68
+
69
+ }
70
+ }
classes/backup/class-backup.php CHANGED
@@ -1,226 +1,226 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- class Backup {
6
-
7
- private $excludes;
8
- public $warnings = array();
9
- public $errors = array();
10
- private $backup_filename;
11
- private $database_dump_filename;
12
- private $backup_filepath = '';
13
- private $database_dump_filepath = '';
14
- private $status = null;
15
- private $type = 'complete';
16
-
17
- public function __construct( $backup_filename, $database_dump_filename = null ) {
18
- $this->backup_filename = $backup_filename;
19
- $this->database_dump_filename = $database_dump_filename;
20
- }
21
-
22
- public function set_type( $type ) {
23
- $this->type = $type;
24
- }
25
-
26
- public function set_backup_filename( $filename ) {
27
- $this->backup_filename = $filename;
28
- }
29
-
30
- public function set_status( Backup_Status $status ) {
31
- $this->status = $status;
32
- }
33
-
34
- public function set_excludes( Excludes $excludes ) {
35
- $this->excludes = $excludes;
36
- }
37
-
38
- public function run() {
39
-
40
- Path::get_instance()->cleanup();
41
-
42
- if ( 'file' !== $this->type ) {
43
- $this->backup_database();
44
- }
45
-
46
- if ( 'database' !== $this->type ) {
47
- $this->backup_files();
48
- }
49
-
50
- Path::get_instance()->cleanup();
51
-
52
- }
53
-
54
- public function backup_database() {
55
-
56
- if ( $this->status ) {
57
- $this->status->set_status( __( 'Backing up database...', 'backupwordpress' ) );
58
- }
59
-
60
- $database_backup_engines = apply_filters( 'hmbkp_database_backup_engines', array(
61
- new Mysqldump_Database_Backup_Engine,
62
- new IMysqldump_Database_Backup_Engine,
63
- ) );
64
-
65
- // Set the file backup engine settings
66
- if ( $this->database_dump_filename ) {
67
- foreach ( $database_backup_engines as &$backup_engine ) {
68
- $backup_engine->set_backup_filename( $this->database_dump_filename );
69
- }
70
- }
71
-
72
- // Dump the database
73
- $database_dump = $this->perform_backup( $database_backup_engines );
74
-
75
- if ( is_a( $database_dump, __NAMESPACE__ . '\\Backup_Engine' ) ) {
76
- $this->database_dump_filepath = $database_dump->get_backup_filepath();
77
- }
78
-
79
- // Fire up the file backup engines
80
- $file_backup_engines = apply_filters( 'hmbkp_file_backup_engines', array(
81
- new Zip_File_Backup_Engine,
82
- new Zip_Archive_File_Backup_Engine,
83
- ) );
84
-
85
- // Set the file backup engine settings
86
- foreach ( $file_backup_engines as &$backup_engine ) {
87
- $backup_engine->set_backup_filename( $this->backup_filename );
88
- $backup_engine->set_excludes( new Excludes( array( '*.zip', 'index.html', '.htaccess', '.*-running', '.files' ) ) );
89
- }
90
-
91
- // Zip up the database dump
92
- $root = Path::get_root();
93
- Path::get_instance()->set_root( Path::get_path() );
94
- $file_backup = $this->perform_backup( $file_backup_engines );
95
- Path::get_instance()->set_root( $root );
96
-
97
- if ( is_a( $file_backup, __NAMESPACE__ . '\\Backup_Engine' ) ) {
98
- $this->backup_filepath = $file_backup->get_backup_filepath();
99
- }
100
-
101
- // Delete the Database Backup now that we've zipped it up
102
- if ( file_exists( $this->database_dump_filepath ) ) {
103
- unlink( $this->database_dump_filepath );
104
- }
105
-
106
- }
107
-
108
- public function backup_files() {
109
-
110
- if ( $this->status ) {
111
- $this->status->set_status( __( 'Backing up files...', 'backupwordpress' ) );
112
- }
113
-
114
- // Fire up the file backup engines
115
- $backup_engines = apply_filters( 'hmbkp_file_backup_engines', array(
116
- new Zip_File_Backup_Engine,
117
- new Zip_Archive_File_Backup_Engine,
118
- ) );
119
-
120
- // Set the file backup engine settings
121
- foreach ( $backup_engines as &$backup_engine ) {
122
- $backup_engine->set_backup_filename( $this->backup_filename );
123
- if ( $this->excludes ) {
124
- $backup_engine->set_excludes( $this->excludes );
125
- }
126
- }
127
-
128
- $file_backup = $this->perform_backup( $backup_engines );
129
-
130
- if ( is_a( $file_backup, __NAMESPACE__ . '\\Backup_Engine' ) ) {
131
- $this->backup_filepath = $file_backup->get_backup_filepath();
132
- }
133
-
134
- }
135
-
136
- /**
137
- * Perform the backup by iterating through each Backup_Engine in turn until
138
- * we find one which works. If a backup filename or any excludes have been
139
- * set then those are passed to each Backup_Engine.
140
- *
141
- * @return Backup_Engine|false The successful backup engine or false on failure.
142
- */
143
- public function perform_backup( array $backup_engines ) {
144
-
145
- foreach ( $backup_engines as $backup_engine ) {
146
-
147
- /**
148
- * If the backup_engine completes the backup then we
149
- * clear any errors or warnings from previously failed backup_engines
150
- * and return the successful one.
151
- */
152
- if ( $backup_engine->backup() ) {
153
- $this->errors = array();
154
- $this->warnings = $backup_engine->get_warnings();
155
- return $backup_engine;
156
- }
157
-
158
- // Store all the errors and warnings as they are shown if all engines fail
159
- $this->warnings = array_merge( $this->warnings, $backup_engine->get_warnings() );
160
- $this->errors = array_merge( $this->errors, $backup_engine->get_errors() );
161
-
162
- }
163
-
164
- return false;
165
-
166
- }
167
-
168
- public function get_warnings() {
169
- return $this->warnings;
170
- }
171
-
172
- public function get_errors() {
173
- return $this->errors;
174
- }
175
-
176
- /**
177
- * Add an warning to the errors warnings.
178
- *
179
- * A warning is always treat as non-fatal and should only be used for recoverable
180
- * issues with the backup process.
181
- *
182
- * @param string $context The context for the warning.
183
- * @param string $warning The warning that was encountered.
184
- */
185
- public function warning( $context, $warning ) {
186
-
187
- if ( empty( $context ) || empty( $warning ) ) {
188
- return;
189
- }
190
-
191
- // Ensure we don't store duplicate warnings by md5'ing the error as the key
192
- $this->warnings[ $context ][ md5( implode( ':', (array) $warning ) ) ] = $warning;
193
-
194
- }
195
-
196
- /**
197
- * Back compat with old error method
198
- *
199
- * Only the backup engines themselves can fire fatal errors
200
- *
201
- * @deprecated 3.4 Backup->warning( $context, $warning )
202
- */
203
- public function error( $context, $message ) {
204
- _deprecated_function( __FUNCTION__, '3.4', 'Backup->warning( $context, $warning )' );
205
- $this->warning( $context, $message );
206
- }
207
-
208
- public function get_database_backup_filepath() {
209
- return $this->database_dump_filepath;
210
- }
211
-
212
- public function get_backup_filepath() {
213
- return $this->backup_filepath;
214
- }
215
-
216
- /**
217
- * Back compat with old method name
218
- *
219
- * @see Backup::get_backup_filepath()
220
- * @deprecated 3.4 Use Backup::get_backup_filepath()
221
- */
222
- public function get_archive_filepath() {
223
- _deprecated_function( __FUNCTION__, '3.4', 'get_backup_filepath()' );
224
- return $this->get_backup_filepath();
225
- }
226
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ class Backup {
6
+
7
+ private $excludes;
8
+ public $warnings = array();
9
+ public $errors = array();
10
+ private $backup_filename;
11
+ private $database_dump_filename;
12
+ private $backup_filepath = '';
13
+ private $database_dump_filepath = '';
14
+ private $status = null;
15
+ private $type = 'complete';
16
+
17
+ public function __construct( $backup_filename, $database_dump_filename = null ) {
18
+ $this->backup_filename = $backup_filename;
19
+ $this->database_dump_filename = $database_dump_filename;
20
+ }
21
+
22
+ public function set_type( $type ) {
23
+ $this->type = $type;
24
+ }
25
+
26
+ public function set_backup_filename( $filename ) {
27
+ $this->backup_filename = $filename;
28
+ }
29
+
30
+ public function set_status( Backup_Status $status ) {
31
+ $this->status = $status;
32
+ }
33
+
34
+ public function set_excludes( Excludes $excludes ) {
35
+ $this->excludes = $excludes;
36
+ }
37
+
38
+ public function run() {
39
+
40
+ Path::get_instance()->cleanup();
41
+
42
+ if ( 'file' !== $this->type ) {
43
+ $this->backup_database();
44
+ }
45
+
46
+ if ( 'database' !== $this->type ) {
47
+ $this->backup_files();
48
+ }
49
+
50
+ Path::get_instance()->cleanup();
51
+
52
+ }
53
+
54
+ public function backup_database() {
55
+
56
+ if ( $this->status ) {
57
+ $this->status->set_status( __( 'Backing up database...', 'backupwordpress' ) );
58
+ }
59
+
60
+ $database_backup_engines = apply_filters( 'hmbkp_database_backup_engines', array(
61
+ new Mysqldump_Database_Backup_Engine,
62
+ new IMysqldump_Database_Backup_Engine,
63
+ ) );
64
+
65
+ // Set the file backup engine settings
66
+ if ( $this->database_dump_filename ) {
67
+ foreach ( $database_backup_engines as &$backup_engine ) {
68
+ $backup_engine->set_backup_filename( $this->database_dump_filename );
69
+ }
70
+ }
71
+
72
+ // Dump the database
73
+ $database_dump = $this->perform_backup( $database_backup_engines );
74
+
75
+ if ( is_a( $database_dump, __NAMESPACE__ . '\\Backup_Engine' ) ) {
76
+ $this->database_dump_filepath = $database_dump->get_backup_filepath();
77
+ }
78
+
79
+ // Fire up the file backup engines
80
+ $file_backup_engines = apply_filters( 'hmbkp_file_backup_engines', array(
81
+ new Zip_File_Backup_Engine,
82
+ new Zip_Archive_File_Backup_Engine,
83
+ ) );
84
+
85
+ // Set the file backup engine settings
86
+ foreach ( $file_backup_engines as &$backup_engine ) {
87
+ $backup_engine->set_backup_filename( $this->backup_filename );
88
+ $backup_engine->set_excludes( new Excludes( array( '*.zip', 'index.html', '.htaccess', '.*-running', '.files' ) ) );
89
+ }
90
+
91
+ // Zip up the database dump
92
+ $root = Path::get_root();
93
+ Path::get_instance()->set_root( Path::get_path() );
94
+ $file_backup = $this->perform_backup( $file_backup_engines );
95
+ Path::get_instance()->set_root( $root );
96
+
97
+ if ( is_a( $file_backup, __NAMESPACE__ . '\\Backup_Engine' ) ) {
98
+ $this->backup_filepath = $file_backup->get_backup_filepath();
99
+ }
100
+
101
+ // Delete the Database Backup now that we've zipped it up
102
+ if ( file_exists( $this->database_dump_filepath ) ) {
103
+ unlink( $this->database_dump_filepath );
104
+ }
105
+
106
+ }
107
+
108
+ public function backup_files() {
109
+
110
+ if ( $this->status ) {
111
+ $this->status->set_status( __( 'Backing up files...', 'backupwordpress' ) );
112
+ }
113
+
114
+ // Fire up the file backup engines
115
+ $backup_engines = apply_filters( 'hmbkp_file_backup_engines', array(
116
+ new Zip_File_Backup_Engine,
117
+ new Zip_Archive_File_Backup_Engine,
118
+ ) );
119
+
120
+ // Set the file backup engine settings
121
+ foreach ( $backup_engines as &$backup_engine ) {
122
+ $backup_engine->set_backup_filename( $this->backup_filename );
123
+ if ( $this->excludes ) {
124
+ $backup_engine->set_excludes( $this->excludes );
125
+ }
126
+ }
127
+
128
+ $file_backup = $this->perform_backup( $backup_engines );
129
+
130
+ if ( is_a( $file_backup, __NAMESPACE__ . '\\Backup_Engine' ) ) {
131
+ $this->backup_filepath = $file_backup->get_backup_filepath();
132
+ }
133
+
134
+ }
135
+
136
+ /**
137
+ * Perform the backup by iterating through each Backup_Engine in turn until
138
+ * we find one which works. If a backup filename or any excludes have been
139
+ * set then those are passed to each Backup_Engine.
140
+ *
141
+ * @return Backup_Engine|false The successful backup engine or false on failure.
142
+ */
143
+ public function perform_backup( array $backup_engines ) {
144
+
145
+ foreach ( $backup_engines as $backup_engine ) {
146
+
147
+ /**
148
+ * If the backup_engine completes the backup then we
149
+ * clear any errors or warnings from previously failed backup_engines
150
+ * and return the successful one.
151
+ */
152
+ if ( $backup_engine->backup() ) {
153
+ $this->errors = array();
154
+ $this->warnings = $backup_engine->get_warnings();
155
+ return $backup_engine;
156
+ }
157
+
158
+ // Store all the errors and warnings as they are shown if all engines fail
159
+ $this->warnings = array_merge( $this->warnings, $backup_engine->get_warnings() );
160
+ $this->errors = array_merge( $this->errors, $backup_engine->get_errors() );
161
+
162
+ }
163
+
164
+ return false;
165
+
166
+ }
167
+
168
+ public function get_warnings() {
169
+ return $this->warnings;
170
+ }
171
+
172
+ public function get_errors() {
173
+ return $this->errors;
174
+ }
175
+
176
+ /**
177
+ * Add an warning to the errors warnings.
178
+ *
179
+ * A warning is always treat as non-fatal and should only be used for recoverable
180
+ * issues with the backup process.
181
+ *
182
+ * @param string $context The context for the warning.
183
+ * @param string $warning The warning that was encountered.
184
+ */
185
+ public function warning( $context, $warning ) {
186
+
187
+ if ( empty( $context ) || empty( $warning ) ) {
188
+ return;
189
+ }
190
+
191
+ // Ensure we don't store duplicate warnings by md5'ing the error as the key
192
+ $this->warnings[ $context ][ md5( implode( ':', (array) $warning ) ) ] = $warning;
193
+
194
+ }
195
+
196
+ /**
197
+ * Back compat with old error method
198
+ *
199
+ * Only the backup engines themselves can fire fatal errors
200
+ *
201
+ * @deprecated 3.4 Backup->warning( $context, $warning )
202
+ */
203
+ public function error( $context, $message ) {
204
+ _deprecated_function( __FUNCTION__, '3.4', 'Backup->warning( $context, $warning )' );
205
+ $this->warning( $context, $message );
206
+ }
207
+
208
+ public function get_database_backup_filepath() {
209
+ return $this->database_dump_filepath;
210
+ }
211
+
212
+ public function get_backup_filepath() {
213
+ return $this->backup_filepath;
214
+ }
215
+
216
+ /**
217
+ * Back compat with old method name
218
+ *
219
+ * @see Backup::get_backup_filepath()
220
+ * @deprecated 3.4 Use Backup::get_backup_filepath()
221
+ */
222
+ public function get_archive_filepath() {
223
+ _deprecated_function( __FUNCTION__, '3.4', 'get_backup_filepath()' );
224
+ return $this->get_backup_filepath();
225
+ }
226
+ }
classes/class-backupwordpress-wp-cli-command.php CHANGED
@@ -1,104 +1,104 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Implement backup command
7
- *
8
- * @todo fix
9
- * @package wp-cli
10
- * @subpackage commands/third-party
11
- */
12
- class CLI extends \WP_CLI_Command {
13
-
14
- /**
15
- * Perform a Backup.
16
- *
17
- * ## OPTIONS
18
- *
19
- * [--files_only]
20
- * : Backup files only, default to off
21
- *
22
- * [--database_only]
23
- * : Backup database only, defaults to off
24
- *
25
- * [--destination]
26
- * : dir that the backup should be save in, defaults to your existing backups directory
27
- *
28
- * [--root]
29
- * : dir that should be backed up, defaults to site root.
30
- *
31
- * [--archive_filename]
32
- * : filename for the resulting zip file
33
- *
34
- * [--excludes]
35
- * : list of paths you'd like to exclude
36
- *
37
- * ## Usage
38
- *
39
- * wp backupwordpress backup [--files_only] [--database_only] [--path<dir>] [--root<dir>] [--zip_command_path=<path>] [--mysqldump_command_path=<path>]
40
- *
41
- * @todo errors should be bubbled from Backup, Scheduled_Backup and the like instead of being repeated.
42
- */
43
- public function backup( $args, $assoc_args ) {
44
-
45
- add_action( 'hmbkp_mysqldump_started', function () {
46
- \WP_CLI::line( __( 'Backup: Dumping database...', 'backupwordpress' ) );
47
- } );
48
-
49
- add_action( 'hmbkp_archive_started', function () {
50
- \WP_CLI::line( __( 'Backup: Zipping everything up...', 'backupwordpress' ) );
51
- } );
52
-
53
- if ( ! empty( $assoc_args['destination'] ) ) {
54
- Path::get_instance()->set_path( $assoc_args['destination'] );
55
- }
56
-
57
- Path::get_instance()->cleanup();
58
-
59
- if ( ! empty( $assoc_args['root'] ) ) {
60
- Path::get_instance()->set_root( $assoc_args['root'] );
61
- }
62
-
63
- if ( ( ! is_dir( Path::get_path() ) ) ) {
64
- \WP_CLI::error( __( 'Invalid backup path', 'backupwordpress' ) );
65
- return false;
66
- }
67
-
68
- if ( ! is_dir( Path::get_root() ) || ! is_readable( Path::get_root() ) ) {
69
- \WP_CLI::error( __( 'Invalid root path', 'backupwordpress' ) );
70
- return false;
71
- }
72
-
73
- $filename = 'backup.zip';
74
-
75
- if ( isset( $assoc_args['archive_filename'] ) ) {
76
- $filename = $assoc_args['archive_filename'];
77
- }
78
-
79
- $hm_backup = new Backup( $filename );
80
-
81
- if ( ! empty( $assoc_args['files_only'] ) ) {
82
- $hm_backup->set_type( 'file' );
83
- }
84
-
85
- if ( ! empty( $assoc_args['database_only'] ) ) {
86
- $hm_backup->set_type( 'database' );
87
- }
88
-
89
- if ( ! empty( $assoc_args['excludes'] ) ) {
90
- $hm_backup->set_excludes( new Excludes( $assoc_args['excludes'] ) );
91
- }
92
-
93
- $hm_backup->run();
94
-
95
- if ( file_exists( $hm_backup->get_backup_filepath() ) ) {
96
- \WP_CLI::success( __( 'Backup Complete: ', 'backupwordpress' ) . $hm_backup->get_backup_filepath() );
97
- } else {
98
- \WP_CLI::error( __( 'Backup Failed', 'backupwordpress' ) );
99
- }
100
-
101
- }
102
- }
103
-
104
- \WP_CLI::add_command( 'backupwordpress', 'HM\BackUpWordPress\CLI' );
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Implement backup command
7
+ *
8
+ * @todo fix
9
+ * @package wp-cli
10
+ * @subpackage commands/third-party
11
+ */
12
+ class CLI extends \WP_CLI_Command {
13
+
14
+ /**
15
+ * Perform a Backup.
16
+ *
17
+ * ## OPTIONS
18
+ *
19
+ * [--files_only]
20
+ * : Backup files only, default to off
21
+ *
22
+ * [--database_only]
23
+ * : Backup database only, defaults to off
24
+ *
25
+ * [--destination]
26
+ * : dir that the backup should be save in, defaults to your existing backups directory
27
+ *
28
+ * [--root]
29
+ * : dir that should be backed up, defaults to site root.
30
+ *
31
+ * [--archive_filename]
32
+ * : filename for the resulting zip file
33
+ *
34
+ * [--excludes]
35
+ * : list of paths you'd like to exclude
36
+ *
37
+ * ## Usage
38
+ *
39
+ * wp backupwordpress backup [--files_only] [--database_only] [--path<dir>] [--root<dir>] [--zip_command_path=<path>] [--mysqldump_command_path=<path>]
40
+ *
41
+ * @todo errors should be bubbled from Backup, Scheduled_Backup and the like instead of being repeated.
42
+ */
43
+ public function backup( $args, $assoc_args ) {
44
+
45
+ add_action( 'hmbkp_mysqldump_started', function () {
46
+ \WP_CLI::line( __( 'Backup: Dumping database...', 'backupwordpress' ) );
47
+ } );
48
+
49
+ add_action( 'hmbkp_archive_started', function () {
50
+ \WP_CLI::line( __( 'Backup: Zipping everything up...', 'backupwordpress' ) );
51
+ } );
52
+
53
+ if ( ! empty( $assoc_args['destination'] ) ) {
54
+ Path::get_instance()->set_path( $assoc_args['destination'] );
55
+ }
56
+
57
+ Path::get_instance()->cleanup();
58
+
59
+ if ( ! empty( $assoc_args['root'] ) ) {
60
+ Path::get_instance()->set_root( $assoc_args['root'] );
61
+ }
62
+
63
+ if ( ( ! is_dir( Path::get_path() ) ) ) {
64
+ \WP_CLI::error( __( 'Invalid backup path', 'backupwordpress' ) );
65
+ return false;
66
+ }
67
+
68
+ if ( ! is_dir( Path::get_root() ) || ! is_readable( Path::get_root() ) ) {
69
+ \WP_CLI::error( __( 'Invalid root path', 'backupwordpress' ) );
70
+ return false;
71
+ }
72
+
73
+ $filename = 'backup.zip';
74
+
75
+ if ( isset( $assoc_args['archive_filename'] ) ) {
76
+ $filename = $assoc_args['archive_filename'];
77
+ }
78
+
79
+ $hm_backup = new Backup( $filename );
80
+
81
+ if ( ! empty( $assoc_args['files_only'] ) ) {
82
+ $hm_backup->set_type( 'file' );
83
+ }
84
+
85
+ if ( ! empty( $assoc_args['database_only'] ) ) {
86
+ $hm_backup->set_type( 'database' );
87
+ }
88
+
89
+ if ( ! empty( $assoc_args['excludes'] ) ) {
90
+ $hm_backup->set_excludes( new Excludes( $assoc_args['excludes'] ) );
91
+ }
92
+
93
+ $hm_backup->run();
94
+
95
+ if ( file_exists( $hm_backup->get_backup_filepath() ) ) {
96
+ \WP_CLI::success( __( 'Backup Complete: ', 'backupwordpress' ) . $hm_backup->get_backup_filepath() );
97
+ } else {
98
+ \WP_CLI::error( __( 'Backup Failed', 'backupwordpress' ) );
99
+ }
100
+
101
+ }
102
+ }
103
+
104
+ \WP_CLI::add_command( 'backupwordpress', 'HM\BackUpWordPress\CLI' );
classes/class-email-service.php CHANGED
@@ -1,216 +1,216 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Email notifications for backups
7
- *
8
- * @extends Service
9
- */
10
- class Email_Service extends Service {
11
-
12
- /**
13
- * Human readable name for this service
14
- * @var string
15
- */
16
- public $name = 'Email';
17
-
18
- /**
19
- * Output the email form field
20
- *
21
- * @access public
22
- */
23
- public function field() {
24
-
25
- ?>
26
-
27
- <tr>
28
-
29
- <th scope="row">
30
- <label for="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>"><?php _e( 'Email notification', 'backupwordpress' ); ?></label>
31
- </th>
32
-
33
- <td>
34
- <input type="text" id="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" value="<?php echo esc_attr( $this->get_field_value( 'email' ) ); ?>" placeholder="name@youremail.com" />
35
-
36
- <p class="description"><?php printf( __( 'Receive a notification email when a backup completes. If the backup is small enough (&lt; %s), then it will be attached to the email. Separate multiple email addresses with a comma.', 'backupwordpress' ), '<code>' . size_format( get_max_attachment_size() ) . '</code>' ); ?></p>
37
- </td>
38
-
39
- </tr>
40
-
41
- <?php }
42
-
43
- /**
44
- * Not used as we only need a field
45
- *
46
- * @see field
47
- * @return string Empty string
48
- */
49
- public function form() {
50
- return '';
51
- }
52
-
53
- public static function constant() {
54
-
55
- ?>
56
-
57
- <tr<?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?> class="hmbkp_active"<?php } ?>>
58
-
59
- <td><code>HMBKP_ATTACHMENT_MAX_FILESIZE</code></td>
60
-
61
- <td>
62
-
63
- <?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?>
64
- <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . HMBKP_ATTACHMENT_MAX_FILESIZE . '</code>' ); ?></p>
65
- <?php } ?>
66
-
67
- <p><?php printf( __( 'The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s.', 'backupwordpress' ), '<code>10MB</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ATTACHMENT_MAX_FILESIZE', '25MB' );</code></p>
68
-
69
- </td>
70
-
71
- </tr>
72
-
73
- <?php }
74
-
75
- /**
76
- * The sentence fragment that is output as part of the schedule sentence
77
- *
78
- * @return string
79
- */
80
- public function display() {
81
-
82
- if ( $emails = $this->get_email_address_array() ) {
83
-
84
- $email = '<code>' . implode( '</code>, <code>', array_map( 'esc_html', $emails ) ) . '</code>';
85
-
86
- return sprintf( __( 'Send an email notification to %s', 'backupwordpress' ), $email );
87
-
88
- }
89
-
90
- return '';
91
-
92
- }
93
-
94
- /**
95
- * Used to determine if the service is in use or not
96
- */
97
- public function is_service_active() {
98
- return (bool) $this->get_email_address_array();
99
- }
100
-
101
- /**
102
- * Validate the email and return an error if validation fails
103
- *
104
- * @param array &$new_data Array of new data, passed by reference.
105
- * @param array $old_data The data we are replacing.
106
- *
107
- * @return array|null Null on success, array of errors if validation failed.
108
- */
109
- public function update( &$new_data, $old_data ) {
110
-
111
- $errors = array();
112
-
113
- if ( isset( $new_data['email'] ) ) {
114
-
115
- if ( ! empty( $new_data['email'] ) ) {
116
-
117
- foreach ( explode( ',', $new_data['email'] ) as $email ) {
118
-
119
- $email = trim( $email );
120
-
121
- if ( ! is_email( $email ) ) {
122
- $errors['email'] = sprintf( __( '%s isn\'t a valid email', 'backupwordpress' ), $email );
123
- }
124
- }
125
- }
126
-
127
- if ( ! empty( $errors['email'] ) ) {
128
- $new_data['email'] = '';
129
- }
130
-
131
- return $errors;
132
-
133
- }
134
- }
135
-
136
- /**
137
- * Get an array or validated email address's
138
- * @return array An array of validated email address's
139
- */
140
- private function get_email_address_array() {
141
- $emails = array_map( 'trim', explode( ',', $this->get_field_value( 'email' ) ) );
142
- return array_filter( array_unique( $emails ), 'is_email' );
143
- }
144
-
145
- /**
146
- * Fire the email notification on the hmbkp_backup_complete
147
- *
148
- * @see Backup::do_action
149
- * @param string $action The action received from the backup
150
- */
151
- public function action( $action, Backup $backup ) {
152
-
153
- if ( 'hmbkp_backup_complete' === $action && $this->get_email_address_array() ) {
154
-
155
- $file = $backup->get_backup_filepath();
156
-
157
- $sent = false;
158
-
159
- $download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
160
- $domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
161
-
162
- $headers = 'From: BackUpWordPress <' . apply_filters( 'hmbkp_from_email', get_bloginfo( 'admin_email' ) ) . '>' . "\r\n";
163
-
164
- // The backup failed, send a message saying as much
165
- if ( ! file_exists( $file ) && ( $errors = array_merge( $backup->get_errors(), $backup->get_warnings() ) ) ) {
166
-
167
- $error_message = '';
168
-
169
- foreach ( $errors as $error_set ) {
170
- $error_message .= implode( "\n - ", $error_set );
171
- }
172
-
173
- if ( $error_message ) {
174
- $error_message = ' - ' . $error_message;
175
- }
176
-
177
- $subject = sprintf( __( 'Backup of %s Failed', 'backupwordpress' ), $domain );
178
-
179
- $message = sprintf( __( 'BackUpWordPress was unable to backup your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Here are the errors that we\'ve encountered:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( 'If the errors above look like Martian, forward this email to %3$s and we\'ll take a look', 'backupwordpress' ) . "\n\n" . __( "Kind Regards,\nThe Apologetic BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $error_message, 'backupwordpress@hmn.md' );
180
-
181
- wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
182
-
183
- return;
184
-
185
- }
186
-
187
- $subject = sprintf( __( 'Backup of %s', 'backupwordpress' ), $domain );
188
-
189
- // If it's larger than the max attachment size limit assume it's not going to be able to send the backup
190
- if ( @filesize( $file ) < get_max_attachment_size() ) {
191
-
192
- $message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'The backup file should be attached to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
193
-
194
- $sent = wp_mail( $this->get_email_address_array(), $subject, $message, $headers, $file );
195
-
196
- }
197
-
198
- // If we didn't send the email above then send just the notification
199
- if ( ! $sent ) {
200
-
201
- $message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Unfortunately, the backup file was too large to attach to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
202
- wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
203
-
204
- }
205
- }
206
- }
207
-
208
- public static function intercom_data() {
209
- return array();
210
- }
211
-
212
- public static function intercom_data_html() {}
213
- }
214
-
215
- // Register the service
216
- Services::register( __FILE__, 'HM\BackUpWordPress\Email_Service' );
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Email notifications for backups
7
+ *
8
+ * @extends Service
9
+ */
10
+ class Email_Service extends Service {
11
+
12
+ /**
13
+ * Human readable name for this service
14
+ * @var string
15
+ */
16
+ public $name = 'Email';
17
+
18
+ /**
19
+ * Output the email form field
20
+ *
21
+ * @access public
22
+ */
23
+ public function field() {
24
+
25
+ ?>
26
+
27
+ <tr>
28
+
29
+ <th scope="row">
30
+ <label for="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>"><?php _e( 'Email notification', 'backupwordpress' ); ?></label>
31
+ </th>
32
+
33
+ <td>
34
+ <input type="text" id="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" value="<?php echo esc_attr( $this->get_field_value( 'email' ) ); ?>" placeholder="name@youremail.com" />
35
+
36
+ <p class="description"><?php printf( __( 'Receive a notification email when a backup completes. If the backup is small enough (&lt; %s), then it will be attached to the email. Separate multiple email addresses with a comma.', 'backupwordpress' ), '<code>' . size_format( get_max_attachment_size() ) . '</code>' ); ?></p>
37
+ </td>
38
+
39
+ </tr>
40
+
41
+ <?php }
42
+
43
+ /**
44
+ * Not used as we only need a field
45
+ *
46
+ * @see field
47
+ * @return string Empty string
48
+ */
49
+ public function form() {
50
+ return '';
51
+ }
52
+
53
+ public static function constant() {
54
+
55
+ ?>
56
+
57
+ <tr<?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?> class="hmbkp_active"<?php } ?>>
58
+
59
+ <td><code>HMBKP_ATTACHMENT_MAX_FILESIZE</code></td>
60
+
61
+ <td>
62
+
63
+ <?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?>
64
+ <p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . HMBKP_ATTACHMENT_MAX_FILESIZE . '</code>' ); ?></p>
65
+ <?php } ?>
66
+
67
+ <p><?php printf( __( 'The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s.', 'backupwordpress' ), '<code>10MB</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ATTACHMENT_MAX_FILESIZE', '25MB' );</code></p>
68
+
69
+ </td>
70
+
71
+ </tr>
72
+
73
+ <?php }
74
+
75
+ /**
76
+ * The sentence fragment that is output as part of the schedule sentence
77
+ *
78
+ * @return string
79
+ */
80
+ public function display() {
81
+
82
+ if ( $emails = $this->get_email_address_array() ) {
83
+
84
+ $email = '<code>' . implode( '</code>, <code>', array_map( 'esc_html', $emails ) ) . '</code>';
85
+
86
+ return sprintf( __( 'Send an email notification to %s', 'backupwordpress' ), $email );
87
+
88
+ }
89
+
90
+ return '';
91
+
92
+ }
93
+
94
+ /**
95
+ * Used to determine if the service is in use or not
96
+ */
97
+ public function is_service_active() {
98
+ return (bool) $this->get_email_address_array();
99
+ }
100
+
101
+ /**
102
+ * Validate the email and return an error if validation fails
103
+ *
104
+ * @param array &$new_data Array of new data, passed by reference.
105
+ * @param array $old_data The data we are replacing.
106
+ *
107
+ * @return array|null Null on success, array of errors if validation failed.
108
+ */
109
+ public function update( &$new_data, $old_data ) {
110
+
111
+ $errors = array();
112
+
113
+ if ( isset( $new_data['email'] ) ) {
114
+
115
+ if ( ! empty( $new_data['email'] ) ) {
116
+
117
+ foreach ( explode( ',', $new_data['email'] ) as $email ) {
118
+
119
+ $email = trim( $email );
120
+
121
+ if ( ! is_email( $email ) ) {
122
+ $errors['email'] = sprintf( __( '%s isn\'t a valid email', 'backupwordpress' ), $email );
123
+ }
124
+ }
125
+ }
126
+
127
+ if ( ! empty( $errors['email'] ) ) {
128
+ $new_data['email'] = '';
129
+ }
130
+
131
+ return $errors;
132
+
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Get an array or validated email address's
138
+ * @return array An array of validated email address's
139
+ */
140
+ private function get_email_address_array() {
141
+ $emails = array_map( 'trim', explode( ',', $this->get_field_value( 'email' ) ) );
142
+ return array_filter( array_unique( $emails ), 'is_email' );
143
+ }
144
+
145
+ /**
146
+ * Fire the email notification on the hmbkp_backup_complete
147
+ *
148
+ * @see Backup::do_action
149
+ * @param string $action The action received from the backup
150
+ */
151
+ public function action( $action, Backup $backup ) {
152
+
153
+ if ( 'hmbkp_backup_complete' === $action && $this->get_email_address_array() ) {
154
+
155
+ $file = $backup->get_backup_filepath();
156
+
157
+ $sent = false;
158
+
159
+ $download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
160
+ $domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
161
+
162
+ $headers = 'From: BackUpWordPress <' . apply_filters( 'hmbkp_from_email', get_bloginfo( 'admin_email' ) ) . '>' . "\r\n";
163
+
164
+ // The backup failed, send a message saying as much
165
+ if ( ! file_exists( $file ) && ( $errors = array_merge( $backup->get_errors(), $backup->get_warnings() ) ) ) {
166
+
167
+ $error_message = '';
168
+
169
+ foreach ( $errors as $error_set ) {
170
+ $error_message .= implode( "\n - ", $error_set );
171
+ }
172
+
173
+ if ( $error_message ) {
174
+ $error_message = ' - ' . $error_message;
175
+ }
176
+
177
+ $subject = sprintf( __( 'Backup of %s Failed', 'backupwordpress' ), $domain );
178
+
179
+ $message = sprintf( __( 'BackUpWordPress was unable to backup your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Here are the errors that we\'ve encountered:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( 'If the errors above look like Martian, forward this email to %3$s and we\'ll take a look', 'backupwordpress' ) . "\n\n" . __( "Kind Regards,\nThe Apologetic BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $error_message, 'support@xibomarketing.com' );
180
+
181
+ wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
182
+
183
+ return;
184
+
185
+ }
186
+
187
+ $subject = sprintf( __( 'Backup of %s', 'backupwordpress' ), $domain );
188
+
189
+ // If it's larger than the max attachment size limit assume it's not going to be able to send the backup
190
+ if ( @filesize( $file ) < get_max_attachment_size() ) {
191
+
192
+ $message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'The backup file should be attached to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
193
+
194
+ $sent = wp_mail( $this->get_email_address_array(), $subject, $message, $headers, $file );
195
+
196
+ }
197
+
198
+ // If we didn't send the email above then send just the notification
199
+ if ( ! $sent ) {
200
+
201
+ $message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Unfortunately, the backup file was too large to attach to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
202
+ wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
203
+
204
+ }
205
+ }
206
+ }
207
+
208
+ public static function intercom_data() {
209
+ return array();
210
+ }
211
+
212
+ public static function intercom_data_html() {}
213
+ }
214
+
215
+ // Register the service
216
+ Services::register( __FILE__, 'HM\BackUpWordPress\Email_Service' );
classes/class-excludes.php CHANGED
@@ -1,209 +1,208 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Manages exclude rules
7
- */
8
- class Excludes {
9
-
10
- /**
11
- * The array of exclude rules.
12
- *
13
- * @var array
14
- */
15
- private $excludes;
16
-
17
- /**
18
- * The array of default exclude rules.
19
- *
20
- * @var array
21
- */
22
- private $default_excludes = array(
23
- '.svn',
24
- '_svn',
25
- 'CVS',
26
- '_darcs',
27
- '.arch-params',
28
- '.monotone',
29
- '.bzr',
30
- '.git',
31
- '.hg',
32
- '.log',
33
- 'backupwp',
34
- 'backwpup-*',
35
- 'updraft',
36
- 'wp-snapshots',
37
- 'backupbuddy_backups',
38
- 'pb_backupbuddy',
39
- 'backup-db',
40
- 'Envato-backups',
41
- 'managewp',
42
- 'backupwordpress-*-backups',
43
- );
44
-
45
- public function __construct( $excludes = array() ) {
46
- $this->set_excludes( $excludes );
47
- }
48
-
49
- /**
50
- * Set the exclude rules.
51
- *
52
- * Excludes rules should be a complete or partial directory or file path.
53
- * Wildcards can be specified with the * character.
54
- *
55
- * @param string|array $excludes The list of exclude rules, accepts either
56
- * a comma separated list or an array.
57
- */
58
- public function set_excludes( $excludes ) {
59
-
60
- if ( is_string( $excludes ) ) {
61
- $excludes = explode( ',', $excludes );
62
- }
63
-
64
- $this->excludes = $excludes;
65
- }
66
-
67
- /**
68
- * Get the excludes.
69
- *
70
- * Returns any user set excludes as well as the default list.
71
- *
72
- * @return array The array of exclude rules.
73
- */
74
- public function get_excludes() {
75
- return array_merge( $this->get_default_excludes(), $this->get_user_excludes() );
76
- }
77
-
78
- /**
79
- * Get the excludes prepared for use with regex.
80
- *
81
- * The primary difference being that any wildcard (*) rules are converted to the regex
82
- * fragment `[\s\S]*?`.
83
- *
84
- * @return array The array of exclude rules.
85
- */
86
- public function get_excludes_for_regex() {
87
-
88
- $excludes = $this->get_excludes();
89
-
90
- // Prepare the exclude rules.
91
- foreach ( $excludes as &$exclude ) {
92
-
93
- if ( strpos( $exclude, '*' ) !== false ) {
94
-
95
- // Escape slashes.
96
- $exclude = str_replace( '/', '\/', $exclude );
97
-
98
- // Convert WildCards to regex.
99
- $exclude = str_replace( '*', '[\s\S]*?', $exclude );
100
-
101
- // Wrap in slashes.
102
- $exclude = '/' . $exclude . '/';
103
-
104
- }
105
- }
106
-
107
- return $excludes;
108
- }
109
-
110
- /**
111
- * Get the user defined excludes.
112
- *
113
- * @return array The array of excludes.
114
- */
115
- public function get_user_excludes() {
116
-
117
- $excludes = $this->excludes;
118
-
119
- // If path() is inside root(), exclude it.
120
- if ( strpos( Path::get_path(), Path::get_root() ) !== false && Path::get_root() !== Path::get_path() ) {
121
- array_unshift( $excludes, trailingslashit( Path::get_path() ) );
122
- }
123
-
124
- return $this->normalize( $excludes );
125
- }
126
-
127
- /**
128
- * Get the array of default excludes.
129
- *
130
- * @return array The array of excludes.
131
- */
132
- public function get_default_excludes() {
133
-
134
- $excludes = array();
135
-
136
- // Back compat with the old constant.
137
- if ( defined( 'HMBKP_EXCLUDE' ) && HMBKP_EXCLUDE ) {
138
- $excludes = explode( ',', implode( ',', (array) HMBKP_EXCLUDE ) );
139
- }
140
-
141
- $excludes = array_merge( $this->default_excludes, $excludes );
142
-
143
- /**
144
- * Allow the default excludes list to be modified.
145
- *
146
- * @param $excludes The array of exclude rules.
147
- */
148
- $excludes = apply_filters( 'hmbkp_default_excludes', $excludes );
149
-
150
- return $this->normalize( $excludes );
151
- }
152
-
153
- /**
154
- * Normalise the exclude rules so they are ready to work with.
155
- *
156
- * @param array $excludes The array of exclude rules to normalise.
157
- *
158
- * @return array The array of normalised rules.
159
- */
160
- public function normalize( $excludes ) {
161
-
162
- $excludes = array_map(
163
- function( $exclude ) {
164
-
165
- // Convert absolute paths to relative.
166
- $exclude = str_replace( PATH::get_root(), '', wp_normalize_path( $exclude ) );
167
-
168
- // Trim the slashes.
169
- $exclude = trim( $exclude );
170
- $exclude = ltrim( $exclude, '/' );
171
- $exclude = untrailingslashit( $exclude );
172
-
173
- return $exclude;
174
- },
175
- $excludes
176
- );
177
-
178
- // Remove duplicate or empty rules.
179
- $excludes = array_unique( $excludes );
180
- $excludes = array_filter( $excludes );
181
-
182
- return $excludes;
183
- }
184
-
185
- /**
186
- * Check if a file is excluded,
187
- * i.e. excluded directly or is in an excluded folder.
188
- *
189
- * @param \SplFileInfo $file File to check if it's excluded.
190
- *
191
- * @return bool|null True if file is excluded, false otherwise.
192
- * Null - if it's not a file.
193
- */
194
- public function is_file_excluded( \SplFileInfo $file ) {
195
-
196
- $exclude_string = implode( '|', $this->get_excludes_for_regex() );
197
- $file_path_no_root = str_ireplace(
198
- trailingslashit( Path::get_root() ),
199
- '',
200
- wp_normalize_path( $file->getPathname() )
201
- );
202
-
203
- if ( $exclude_string && preg_match( '(' . $exclude_string . ')', $file_path_no_root ) ) {
204
- return true;
205
- }
206
-
207
- return false;
208
- }
209
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Manages exclude rules
7
+ */
8
+ class Excludes {
9
+
10
+ /**
11
+ * The array of exclude rules.
12
+ *
13
+ * @var array
14
+ */
15
+ private $excludes;
16
+
17
+ /**
18
+ * The array of default exclude rules.
19
+ *
20
+ * @var array
21
+ */
22
+ private $default_excludes = array(
23
+ '.svn',
24
+ '_svn',
25
+ 'CVS',
26
+ '_darcs',
27
+ '.arch-params',
28
+ '.monotone',
29
+ '.bzr',
30
+ '.git',
31
+ '.hg',
32
+ 'backupwp',
33
+ 'backwpup-*',
34
+ 'updraft',
35
+ 'wp-snapshots',
36
+ 'backupbuddy_backups',
37
+ 'pb_backupbuddy',
38
+ 'backup-db',
39
+ 'Envato-backups',
40
+ 'managewp',
41
+ 'backupwordpress-*-backups',
42
+ );
43
+
44
+ public function __construct( $excludes = array() ) {
45
+ $this->set_excludes( $excludes );
46
+ }
47
+
48
+ /**
49
+ * Set the exclude rules.
50
+ *
51
+ * Excludes rules should be a complete or partial directory or file path.
52
+ * Wildcards can be specified with the * character.
53
+ *
54
+ * @param string|array $excludes The list of exclude rules, accepts either
55
+ * a comma separated list or an array.
56
+ */
57
+ public function set_excludes( $excludes ) {
58
+
59
+ if ( is_string( $excludes ) ) {
60
+ $excludes = explode( ',', $excludes );
61
+ }
62
+
63
+ $this->excludes = $excludes;
64
+ }
65
+
66
+ /**
67
+ * Get the excludes.
68
+ *
69
+ * Returns any user set excludes as well as the default list.
70
+ *
71
+ * @return array The array of exclude rules.
72
+ */
73
+ public function get_excludes() {
74
+ return array_merge( $this->get_default_excludes(), $this->get_user_excludes() );
75
+ }
76
+
77
+ /**
78
+ * Get the excludes prepared for use with regex.
79
+ *
80
+ * The primary difference being that any wildcard (*) rules are converted to the regex
81
+ * fragment `[\s\S]*?`.
82
+ *
83
+ * @return array The array of exclude rules.
84
+ */
85
+ public function get_excludes_for_regex() {
86
+
87
+ $excludes = $this->get_excludes();
88
+
89
+ // Prepare the exclude rules.
90
+ foreach ( $excludes as &$exclude ) {
91
+
92
+ if ( strpos( $exclude, '*' ) !== false ) {
93
+
94
+ // Escape slashes.
95
+ $exclude = str_replace( '/', '\/', $exclude );
96
+
97
+ // Convert WildCards to regex.
98
+ $exclude = str_replace( '*', '[\s\S]*?', $exclude );
99
+
100
+ // Wrap in slashes.
101
+ $exclude = '/' . $exclude . '/';
102
+
103
+ }
104
+ }
105
+
106
+ return $excludes;
107
+ }
108
+
109
+ /**
110
+ * Get the user defined excludes.
111
+ *
112
+ * @return array The array of excludes.
113
+ */
114
+ public function get_user_excludes() {
115
+
116
+ $excludes = $this->excludes;
117
+
118
+ // If path() is inside root(), exclude it.
119
+ if ( strpos( Path::get_path(), Path::get_root() ) !== false && Path::get_root() !== Path::get_path() ) {
120
+ array_unshift( $excludes, trailingslashit( Path::get_path() ) );
121
+ }
122
+
123
+ return $this->normalize( $excludes );
124
+ }
125
+
126
+ /**
127
+ * Get the array of default excludes.
128
+ *
129
+ * @return array The array of excludes.
130
+ */
131
+ public function get_default_excludes() {
132
+
133
+ $excludes = array();
134
+
135
+ // Back compat with the old constant.
136
+ if ( defined( 'HMBKP_EXCLUDE' ) && HMBKP_EXCLUDE ) {
137
+ $excludes = explode( ',', implode( ',', (array) HMBKP_EXCLUDE ) );
138
+ }
139
+
140
+ $excludes = array_merge( $this->default_excludes, $excludes );
141
+
142
+ /**
143
+ * Allow the default excludes list to be modified.
144
+ *
145
+ * @param $excludes The array of exclude rules.
146
+ */
147
+ $excludes = apply_filters( 'hmbkp_default_excludes', $excludes );
148
+
149
+ return $this->normalize( $excludes );
150
+ }
151
+
152
+ /**
153
+ * Normalise the exclude rules so they are ready to work with.
154
+ *
155
+ * @param array $excludes The array of exclude rules to normalise.
156
+ *
157
+ * @return array The array of normalised rules.
158
+ */
159
+ public function normalize( $excludes ) {
160
+
161
+ $excludes = array_map(
162
+ function( $exclude ) {
163
+
164
+ // Convert absolute paths to relative.
165
+ $exclude = str_replace( PATH::get_root(), '', wp_normalize_path( $exclude ) );
166
+
167
+ // Trim the slashes.
168
+ $exclude = trim( $exclude );
169
+ $exclude = ltrim( $exclude, '/' );
170
+ $exclude = untrailingslashit( $exclude );
171
+
172
+ return $exclude;
173
+ },
174
+ $excludes
175
+ );
176
+
177
+ // Remove duplicate or empty rules.
178
+ $excludes = array_unique( $excludes );
179
+ $excludes = array_filter( $excludes );
180
+
181
+ return $excludes;
182
+ }
183
+
184
+ /**
185
+ * Check if a file is excluded,
186
+ * i.e. excluded directly or is in an excluded folder.
187
+ *
188
+ * @param \SplFileInfo $file File to check if it's excluded.
189
+ *
190
+ * @return bool|null True if file is excluded, false otherwise.
191
+ * Null - if it's not a file.
192
+ */
193
+ public function is_file_excluded( \SplFileInfo $file ) {
194
+
195
+ $exclude_string = implode( '|', $this->get_excludes_for_regex() );
196
+ $file_path_no_root = str_ireplace(
197
+ trailingslashit( Path::get_root() ),
198
+ '',
199
+ wp_normalize_path( $file->getPathname() )
200
+ );
201
+
202
+ if ( $exclude_string && preg_match( '(' . $exclude_string . ')', $file_path_no_root ) ) {
203
+ return true;
204
+ }
205
+
206
+ return false;
207
+ }
208
+ }
 
classes/class-extensions.php CHANGED
@@ -1,107 +1,107 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Class Extensions
7
- * @package HM\BackUpWordPress
8
- */
9
- final class Extensions {
10
-
11
- /**
12
- * Contains the instantiated Extensions instance.
13
- *
14
- * @var Extensions $this->instance
15
- */
16
- private static $instance;
17
-
18
- /**
19
- * Holds the root URL of the API.
20
- *
21
- * @var string
22
- */
23
- protected $root_url = '';
24
-
25
- /**
26
- * Extensions constructor.
27
- *
28
- */
29
- private function __construct() {
30
-
31
- $this->root_url = 'https://bwp.hmn.md/wp-json/wp/v2/';
32
-
33
- }
34
-
35
- private function __wakeup() {}
36
-
37
- private function __clone() {}
38
-
39
- /**
40
- * Returns the *Singleton* instance of this class.
41
- *
42
- * @staticvar Extensions $instance The *Singleton* instances of this class.
43
- *
44
- * @return Extensions The *Singleton* instance.
45
- */
46
- public static function get_instance() {
47
-
48
- if ( ! ( self::$instance instanceof Extensions ) ) {
49
-
50
- self::$instance = new Extensions();
51
-
52
- }
53
-
54
- return self::$instance;
55
-
56
- }
57
-
58
- /**
59
- * Parses the body of the API response and returns it.
60
- *
61
- * @return array|bool|mixed|object
62
- */
63
- public function get_edd_data() {
64
-
65
- $response = $this->fetch( 'edd-downloads' );
66
-
67
- if ( is_wp_error( $response ) || empty( $response['body'] ) ) {
68
- return false;
69
- }
70
-
71
- return json_decode( $response['body'] );
72
-
73
- }
74
-
75
- /**
76
- * Makes a request to the JSON API or retrieves the cached response. Caches the response for one day.
77
- *
78
- * @param $endpoint
79
- * @param int $ttl
80
- *
81
- * @return array|mixed|\WP_Error
82
- */
83
- protected function fetch( $endpoint, $ttl = DAY_IN_SECONDS ) {
84
-
85
- $request_url = $this->root_url . $endpoint;
86
-
87
- $cache_key = md5( $request_url );
88
-
89
- $cached = get_transient( 'bwp_' . $cache_key );
90
-
91
- if ( $cached ) {
92
- return $cached;
93
- }
94
-
95
- $response = wp_remote_get( $request_url );
96
-
97
- if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
98
- return new \WP_Error( 'hmbkp-error', 'Unable to fetch API response' );
99
- }
100
-
101
- set_transient( 'bwp_' . $cache_key, $response, $ttl );
102
-
103
- return $response;
104
-
105
- }
106
-
107
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Class Extensions
7
+ * @package HM\BackUpWordPress
8
+ */
9
+ final class Extensions {
10
+
11
+ /**
12
+ * Contains the instantiated Extensions instance.
13
+ *
14
+ * @var Extensions $this->instance
15
+ */
16
+ private static $instance;
17
+
18
+ /**
19
+ * Holds the root URL of the API.
20
+ *
21
+ * @var string
22
+ */
23
+ protected $root_url = '';
24
+
25
+ /**
26
+ * Extensions constructor.
27
+ *
28
+ */
29
+ private function __construct() {
30
+
31
+ $this->root_url = 'https://bwp.hmn.md/wp-json/wp/v2/';
32
+
33
+ }
34
+
35
+ private function __wakeup() {}
36
+
37
+ private function __clone() {}
38
+
39
+ /**
40
+ * Returns the *Singleton* instance of this class.
41
+ *
42
+ * @staticvar Extensions $instance The *Singleton* instances of this class.
43
+ *
44
+ * @return Extensions The *Singleton* instance.
45
+ */
46
+ public static function get_instance() {
47
+
48
+ if ( ! ( self::$instance instanceof Extensions ) ) {
49
+
50
+ self::$instance = new Extensions();
51
+
52
+ }
53
+
54
+ return self::$instance;
55
+
56
+ }
57
+
58
+ /**
59
+ * Parses the body of the API response and returns it.
60
+ *
61
+ * @return array|bool|mixed|object
62
+ */
63
+ public function get_edd_data() {
64
+
65
+ $response = $this->fetch( 'edd-downloads' );
66
+
67
+ if ( is_wp_error( $response ) || empty( $response['body'] ) ) {
68
+ return false;
69
+ }
70
+
71
+ return json_decode( $response['body'] );
72
+
73
+ }
74
+
75
+ /**
76
+ * Makes a request to the JSON API or retrieves the cached response. Caches the response for one day.
77
+ *
78
+ * @param $endpoint
79
+ * @param int $ttl
80
+ *
81
+ * @return array|mixed|\WP_Error
82
+ */
83
+ protected function fetch( $endpoint, $ttl = DAY_IN_SECONDS ) {
84
+
85
+ $request_url = $this->root_url . $endpoint;
86
+
87
+ $cache_key = md5( $request_url );
88
+
89
+ $cached = get_transient( 'bwp_' . $cache_key );
90
+
91
+ if ( $cached ) {
92
+ return $cached;
93
+ }
94
+
95
+ $response = wp_remote_get( $request_url );
96
+
97
+ if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
98
+ return new \WP_Error( 'hmbkp-error', 'Unable to fetch API response' );
99
+ }
100
+
101
+ set_transient( 'bwp_' . $cache_key, $response, $ttl );
102
+
103
+ return $response;
104
+
105
+ }
106
+
107
+ }
classes/class-notices.php CHANGED
@@ -1,157 +1,157 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Class for managing notices
7
- *
8
- * Notices are messages along with an associated context, by default
9
- * they are stored in the db and thus persist between page loads.
10
- */
11
- class Notices {
12
-
13
- /**
14
- * The array of notice messages
15
- *
16
- * This is a multidimensional array of
17
- * `array( context => array( 'message' ) );``
18
- *
19
- * @var array
20
- */
21
- private $notices = array();
22
-
23
- /**
24
- * Contains the instantiated Notices instance
25
- *
26
- * @var Notices $this->get_instance
27
- */
28
- private static $instance;
29
-
30
- /**
31
- * Protected constructor to prevent creating a new instance of the
32
- * *Singleton* via the `new` operator from outside of this class.
33
- */
34
- protected function __construct() {}
35
-
36
- /**
37
- * Private clone method to prevent cloning of the instance of the
38
- * *Singleton* instance.
39
- */
40
- private function __clone() {}
41
-
42
- /**
43
- * Private unserialize method to prevent unserializing of the *Singleton*
44
- * instance.
45
- */
46
- private function __wakeup() {}
47
-
48
- /**
49
- * Returns the *Singleton* instance of this class.
50
- *
51
- * @staticvar Notices $instance The *Singleton* instances of this class.
52
- *
53
- * @return Notices The *Singleton* instance.
54
- */
55
- public static function get_instance() {
56
-
57
- if ( ! ( self::$instance instanceof Notices ) ) {
58
- self::$instance = new Notices();
59
- }
60
-
61
- return self::$instance;
62
-
63
- }
64
-
65
- /**
66
- * Set an array of notice messages for a specific context
67
- *
68
- * @param string $context The context of the notice message
69
- * @param array $messages The array of messages
70
- * @param boolean $persistent Whether the notice should persist via the database. Defaults to true.
71
- */
72
- public function set_notices( $context, array $messages, $persistent = true ) {
73
-
74
- // Clear any empty messages and avoid duplicates
75
- $messages = array_unique( array_filter( $messages ) );
76
-
77
- if ( empty( $context ) || empty( $messages ) ) {
78
- return false;
79
- }
80
-
81
- $this->notices[ $context ] = array_merge( $this->get_notices( $context ), $messages );
82
-
83
- if ( $persistent ) {
84
-
85
- $new_notices = $notices = $this->get_persistent_notices();
86
-
87
- // Make sure we merge new notices into to any existing notices
88
- if ( ! empty( $notices[ $context ] ) ) {
89
- $new_notices[ $context ] = array_unique( array_merge( $new_notices[ $context ], $messages ) );
90
- } else {
91
- $new_notices[ $context ] = $messages;
92
- }
93
-
94
- // Only update the database if the notice array has changed
95
- if ( $new_notices !== $notices ) {
96
- update_option( 'hmbkp_notices', $new_notices );
97
- }
98
- }
99
-
100
- return true;
101
-
102
- }
103
-
104
- /**
105
- * Fetch an array of notices messages
106
- *
107
- * If you specify a context then you'll just get messages for that context otherwise
108
- * you get multidimensional array of all contexts and their messages.
109
- *
110
- * @param string $context The context that you'd like the messages for
111
- *
112
- * @return array The array of notice messages
113
- */
114
- public function get_notices( $context = '' ) {
115
-
116
- $notices = $this->get_all_notices();
117
-
118
- if ( ! empty( $notices ) ) {
119
-
120
- if ( ! empty( $context ) ) {
121
- return isset( $notices[ $context ] ) ? $notices[ $context ] : array();
122
- }
123
-
124
- return $notices;
125
- }
126
-
127
- return array();
128
-
129
- }
130
-
131
- /**
132
- * Get both standard and persistent notices
133
- *
134
- * @return array The array of contexts and notices
135
- */
136
- private function get_all_notices() {
137
- return array_map( 'array_unique', array_merge_recursive( $this->notices, $this->get_persistent_notices() ) );
138
- }
139
-
140
- /**
141
- * Load the persistent notices from the database
142
- *
143
- * @return array The array of notices
144
- */
145
- private function get_persistent_notices() {
146
- $notices = get_option( 'hmbkp_notices' );
147
- return ! empty( $notices ) ? $notices : array();
148
- }
149
-
150
- /**
151
- * Clear all notices including persistent ones
152
- */
153
- public function clear_all_notices() {
154
- $this->notices = array();
155
- delete_option( 'hmbkp_notices' );
156
- }
157
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Class for managing notices
7
+ *
8
+ * Notices are messages along with an associated context, by default
9
+ * they are stored in the db and thus persist between page loads.
10
+ */
11
+ class Notices {
12
+
13
+ /**
14
+ * The array of notice messages
15
+ *
16
+ * This is a multidimensional array of
17
+ * `array( context => array( 'message' ) );``
18
+ *
19
+ * @var array
20
+ */
21
+ private $notices = array();
22
+
23
+ /**
24
+ * Contains the instantiated Notices instance
25
+ *
26
+ * @var Notices $this->get_instance
27
+ */
28
+ private static $instance;
29
+
30
+ /**
31
+ * Protected constructor to prevent creating a new instance of the
32
+ * *Singleton* via the `new` operator from outside of this class.
33
+ */
34
+ protected function __construct() {}
35
+
36
+ /**
37
+ * Private clone method to prevent cloning of the instance of the
38
+ * *Singleton* instance.
39
+ */
40
+ private function __clone() {}
41
+
42
+ /**
43
+ * Private unserialize method to prevent unserializing of the *Singleton*
44
+ * instance.
45
+ */
46
+ private function __wakeup() {}
47
+
48
+ /**
49
+ * Returns the *Singleton* instance of this class.
50
+ *
51
+ * @staticvar Notices $instance The *Singleton* instances of this class.
52
+ *
53
+ * @return Notices The *Singleton* instance.
54
+ */
55
+ public static function get_instance() {
56
+
57
+ if ( ! ( self::$instance instanceof Notices ) ) {
58
+ self::$instance = new Notices();
59
+ }
60
+
61
+ return self::$instance;
62
+
63
+ }
64
+
65
+ /**
66
+ * Set an array of notice messages for a specific context
67
+ *
68
+ * @param string $context The context of the notice message
69
+ * @param array $messages The array of messages
70
+ * @param boolean $persistent Whether the notice should persist via the database. Defaults to true.
71
+ */
72
+ public function set_notices( $context, array $messages, $persistent = true ) {
73
+
74
+ // Clear any empty messages and avoid duplicates
75
+ $messages = array_unique( array_filter( $messages ) );
76
+
77
+ if ( empty( $context ) || empty( $messages ) ) {
78
+ return false;
79
+ }
80
+
81
+ $this->notices[ $context ] = array_merge( $this->get_notices( $context ), $messages );
82
+
83
+ if ( $persistent ) {
84
+
85
+ $new_notices = $notices = $this->get_persistent_notices();
86
+
87
+ // Make sure we merge new notices into to any existing notices
88
+ if ( ! empty( $notices[ $context ] ) ) {
89
+ $new_notices[ $context ] = array_unique( array_merge( $new_notices[ $context ], $messages ) );
90
+ } else {
91
+ $new_notices[ $context ] = $messages;
92
+ }
93
+
94
+ // Only update the database if the notice array has changed
95
+ if ( $new_notices !== $notices ) {
96
+ update_option( 'hmbkp_notices', $new_notices );
97
+ }
98
+ }
99
+
100
+ return true;
101
+
102
+ }
103
+
104
+ /**
105
+ * Fetch an array of notices messages
106
+ *
107
+ * If you specify a context then you'll just get messages for that context otherwise
108
+ * you get multidimensional array of all contexts and their messages.
109
+ *
110
+ * @param string $context The context that you'd like the messages for
111
+ *
112
+ * @return array The array of notice messages
113
+ */
114
+ public function get_notices( $context = '' ) {
115
+
116
+ $notices = $this->get_all_notices();
117
+
118
+ if ( ! empty( $notices ) ) {
119
+
120
+ if ( ! empty( $context ) ) {
121
+ return isset( $notices[ $context ] ) ? $notices[ $context ] : array();
122
+ }
123
+
124
+ return $notices;
125
+ }
126
+
127
+ return array();
128
+
129
+ }
130
+
131
+ /**
132
+ * Get both standard and persistent notices
133
+ *
134
+ * @return array The array of contexts and notices
135
+ */
136
+ private function get_all_notices() {
137
+ return array_map( 'array_unique', array_merge_recursive( $this->notices, $this->get_persistent_notices() ) );
138
+ }
139
+
140
+ /**
141
+ * Load the persistent notices from the database
142
+ *
143
+ * @return array The array of notices
144
+ */
145
+ private function get_persistent_notices() {
146
+ $notices = get_option( 'hmbkp_notices' );
147
+ return ! empty( $notices ) ? $notices : array();
148
+ }
149
+
150
+ /**
151
+ * Clear all notices including persistent ones
152
+ */
153
+ public function clear_all_notices() {
154
+ $this->notices = array();
155
+ delete_option( 'hmbkp_notices' );
156
+ }
157
+ }
classes/class-path.php CHANGED
@@ -1,478 +1,478 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Manages both the backup path and site root
7
- *
8
- * Handles calculating & protecting the directory that backups will be stored in
9
- * as well as the directory that is being backed up
10
- */
11
- class Path {
12
-
13
- /**
14
- * The path to the directory that backup files are stored in
15
- *
16
- * @var string $this->path
17
- */
18
- private $path;
19
-
20
- /**
21
- * The path to the directory that will be backed up
22
- *
23
- * @var string $this->root
24
- */
25
- private $root;
26
-
27
- /**
28
- * The path to the directory that backup files are stored in
29
- *
30
- * @var string $this->path
31
- */
32
- private $custom_path;
33
-
34
- /**
35
- * Contains the instantiated Path instance
36
- *
37
- * @var Path $this->instance
38
- */
39
- private static $instance;
40
-
41
- /**
42
- * Protected constructor to prevent creating a new instance of the
43
- * *Singleton* via the `new` operator from outside of this class.
44
- */
45
- protected function __construct() {}
46
-
47
- /**
48
- * Private clone method to prevent cloning of the instance of the
49
- * *Singleton* instance.
50
- */
51
- private function __clone() {}
52
-
53
- /**
54
- * Private unserialize method to prevent unserializing of the *Singleton*
55
- * instance.
56
- */
57
- private function __wakeup() {}
58
-
59
- /**
60
- * Returns the *Singleton* instance of this class.
61
- *
62
- * @staticvar Path $instance The *Singleton* instances of this class.
63
- *
64
- * @return Path The *Singleton* instance.
65
- */
66
- public static function get_instance() {
67
-
68
- if ( ! ( self::$instance instanceof Path ) ) {
69
- self::$instance = new Path();
70
- }
71
-
72
- return self::$instance;
73
- }
74
-
75
- /**
76
- * Convenience method for quickly grabbing the path
77
- */
78
- public static function get_path() {
79
- return self::get_instance()->get_calculated_path();
80
- }
81
-
82
- /**
83
- * Convenience method for quickly grabbing the root
84
- */
85
- public static function get_root() {
86
- return self::get_instance()->get_calculated_root();
87
- }
88
-
89
- /**
90
- * Calculate the path to the site "home" directory.
91
- *
92
- * The home directory is the path equivalent to the home_url. That is,
93
- * the path to the true root of the website. In situations where WordPress is
94
- * installed in a subdirectory the home path is different to ABSPATH
95
- *
96
- * @param string $site_path The site_path to use when calculating the home path, defaults to ABSPATH
97
- */
98
- public static function get_home_path( $site_path = ABSPATH ) {
99
-
100
- if ( defined( 'HMBKP_ROOT' ) && HMBKP_ROOT ) {
101
- return wp_normalize_path( HMBKP_ROOT );
102
- }
103
-
104
- $home_path = wp_normalize_path( $site_path );
105
-
106
- if ( path_in_php_open_basedir( dirname( $site_path ) ) ) {
107
-
108
- $home = set_url_scheme( get_option( 'home' ), 'http' );
109
- $siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' );
110
- if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) {
111
- $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
112
- $pos = strripos( wp_normalize_path( $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) );
113
- $home_path = substr( wp_normalize_path( $_SERVER['SCRIPT_FILENAME'] ), 0, $pos );
114
- $home_path = trailingslashit( $home_path );
115
- }
116
-
117
- if ( is_multisite() ) {
118
- $slashed_home = trailingslashit( get_option( 'home' ) );
119
- $base = parse_url( $slashed_home, PHP_URL_PATH );
120
- $document_root_fix = wp_normalize_path( realpath( $_SERVER['DOCUMENT_ROOT'] ) );
121
- $abspath_fix = wp_normalize_path( ABSPATH );
122
- $home_path = strpos( $abspath_fix, $document_root_fix ) === 0 ? $document_root_fix . $base : $home_path;
123
- }
124
- }
125
-
126
- return wp_normalize_path( untrailingslashit( $home_path ) );
127
-
128
- }
129
-
130
- /**
131
- * get the calculated path to the directory where backups will be stored
132
- */
133
- private function get_calculated_path() {
134
-
135
- // Calculate the path if needed
136
- if ( empty( $this->path ) || ! wp_is_writable( $this->path ) ) {
137
- $this->calculate_path();
138
- }
139
-
140
- // Ensure the backup directory is protected
141
- $this->protect_path();
142
-
143
- return wp_normalize_path( $this->path );
144
-
145
- }
146
-
147
- /**
148
- * Set the path directly, overriding the default
149
- *
150
- * @param $path
151
- */
152
- public function set_path( $path ) {
153
-
154
- $this->custom_path = $path;
155
-
156
- // Re-calculate the backup path
157
- $this->calculate_path();
158
-
159
- }
160
-
161
- /**
162
- * get the calculated path to the directory that will be backed up
163
- */
164
- private function get_calculated_root() {
165
-
166
- $root = self::get_home_path();
167
-
168
- if ( defined( 'HMBKP_ROOT' ) && HMBKP_ROOT ) {
169
- $root = HMBKP_ROOT;
170
- }
171
-
172
- if ( $this->root ) {
173
- $root = $this->root;
174
- }
175
-
176
- return wp_normalize_path( $root );
177
-
178
- }
179
-
180
- /**
181
- * Set the root path directly, overriding the default
182
- *
183
- * @param $root
184
- */
185
- public function set_root( $root ) {
186
- $this->root = $root;
187
- }
188
-
189
- public function reset_path() {
190
- $this->path = $this->custom_path = '';
191
- }
192
-
193
- /**
194
- * Get the path to the default backup location in wp-content
195
- */
196
- public function get_default_path() {
197
- return trailingslashit( wp_normalize_path( WP_CONTENT_DIR ) ) . 'backupwordpress-' . substr( HMBKP_SECURE_KEY, 0, 10 ) . '-backups';
198
- }
199
-
200
- /**
201
- * Get the path to the fallback backup location in uploads
202
- */
203
- public function get_fallback_path() {
204
-
205
- $upload_dir = wp_upload_dir();
206
-
207
- return trailingslashit( wp_normalize_path( $upload_dir['basedir'] ) ) . 'backupwordpress-' . substr( HMBKP_SECURE_KEY, 0, 10 ) . '-backups';
208
-
209
- }
210
-
211
- /**
212
- * Get the path to the custom backup location if it's been set
213
- */
214
- public function get_custom_path() {
215
-
216
- if ( $this->custom_path ) {
217
- return $this->custom_path;
218
- }
219
-
220
- if ( defined( 'HMBKP_PATH' ) && wp_is_writable( HMBKP_PATH ) ) {
221
- return HMBKP_PATH;
222
- }
223
-
224
- return '';
225
-
226
- }
227
-
228
- /**
229
- * Builds an array containing existing backups folders.
230
- *
231
- * @return array
232
- */
233
- public function get_existing_paths() {
234
-
235
- if ( false === $default = glob( WP_CONTENT_DIR . '/backupwordpress-*-backups', GLOB_ONLYDIR ) ) {
236
- $default = array();
237
- }
238
-
239
- $upload_dir = wp_upload_dir();
240
-
241
- if ( false === $fallback = glob( $upload_dir['basedir'] . '/backupwordpress-*-backups', GLOB_ONLYDIR ) ) {
242
- $fallback = array();
243
- }
244
-
245
- $paths = array_merge( $default, $fallback );
246
- $paths = array_map( 'wp_normalize_path', $paths );
247
-
248
- return $paths;
249
-
250
- }
251
-
252
- /**
253
- * Returns the first existing path if there is one
254
- *
255
- * @return string Backup path if found empty string if not
256
- */
257
- public function get_existing_path() {
258
-
259
- $paths = $this->get_existing_paths();
260
-
261
- if ( ! empty( $paths[0] ) ) {
262
- return $paths[0];
263
- }
264
-
265
- return '';
266
-
267
- }
268
-
269
- /**
270
- * Calculate the backup path and create the directory if it doesn't exist.
271
- *
272
- * Tries all possible locations and uses the first one possible.
273
- *
274
- * @return
275
- */
276
- public function calculate_path() {
277
-
278
- $paths = $this->get_possible_paths();
279
-
280
- // Loop through possible paths, use the first one that exists/can be created and is writable.
281
- foreach ( $paths as $path ) {
282
- // Also handles fixing perms / directory already exists.
283
- if ( wp_mkdir_p( $path ) && wp_is_writable( $path ) ) {
284
- break;
285
- }
286
- }
287
-
288
- /**
289
- * If we managed to create a writable path then use that,
290
- * otherwise just return the unwritable path.
291
- */
292
- if ( file_exists( $path ) && wp_is_writable( $path ) ) {
293
- $this->path = $path;
294
- } else {
295
- $this->path = reset( $paths );
296
- }
297
- }
298
-
299
- public function get_possible_paths() {
300
-
301
- $paths = array();
302
-
303
- // If we have a custom path then try to use it.
304
- if ( $this->get_custom_path() ) {
305
- $paths[] = $this->get_custom_path();
306
- }
307
-
308
- // If there is already a backups directory then try to use that.
309
- if ( $this->get_existing_path() ) {
310
- $paths[] = $this->get_existing_path();
311
- }
312
-
313
- // If not then default to a new directory in wp-content.
314
- $paths[] = $this->get_default_path();
315
-
316
- // If that didn't work then fallback to a new directory in uploads.
317
- $paths[] = $this->get_fallback_path();
318
-
319
- return $paths;
320
- }
321
-
322
- /**
323
- * Protect the directory that backups are stored in
324
- *
325
- * - Adds an index.html file in an attempt to disable directory browsing
326
- * - Adds a .httaccess file to deny direct access if on Apache
327
- *
328
- * @param string $reset
329
- */
330
- public function protect_path( $reset = 'no' ) {
331
-
332
- global $is_apache;
333
-
334
- // Protect against directory browsing by including an index.html file
335
- $index = $this->path . '/index.html';
336
-
337
- if ( 'reset' === $reset && file_exists( $index ) ) {
338
- @unlink( $index );
339
- }
340
-
341
- if ( ! file_exists( $index ) && wp_is_writable( $this->path ) ) {
342
- file_put_contents( $index, '' );
343
- }
344
-
345
- $htaccess = $this->path . '/.htaccess';
346
-
347
- if ( ( 'reset' === $reset ) && file_exists( $htaccess ) ) {
348
- @unlink( $htaccess );
349
- }
350
-
351
- // Protect the directory with a .htaccess file on Apache servers
352
- if ( $is_apache && function_exists( 'insert_with_markers' ) && ! file_exists( $htaccess ) && wp_is_writable( $this->path ) ) {
353
-
354
- $contents = array();
355
- $contents[] = '# ' . sprintf( __( 'This %s file ensures that other people cannot download your backup files.', 'backupwordpress' ), '.htaccess' );
356
- $contents[] = '';
357
- $contents[] = '<IfModule mod_rewrite.c>';
358
- $contents[] = 'RewriteEngine On';
359
- $contents[] = 'RewriteCond %{QUERY_STRING} !key=' . HMBKP_SECURE_KEY;
360
- $contents[] = 'RewriteRule (.*) - [F]';
361
- $contents[] = '</IfModule>';
362
- $contents[] = '';
363
-
364
- file_put_contents( $htaccess, '' );
365
-
366
- insert_with_markers( $htaccess, 'BackUpWordPress', $contents );
367
-
368
- }
369
-
370
- }
371
-
372
- /**
373
- * If we have more than one path then move any existing backups to the current path and remove them
374
- */
375
- public function merge_existing_paths() {
376
-
377
- $paths = $this->get_existing_paths();
378
-
379
- if ( ( ! empty( $paths ) && $this->get_custom_path() ) || count( $paths ) > 1 ) {
380
- foreach ( $paths as $old_path ) {
381
- $this->move_old_backups( $old_path );
382
- }
383
- }
384
-
385
- }
386
-
387
- /**
388
- * Move backup files from an existing directory and the new
389
- * location.
390
- *
391
- * @param string $from The path to move the backups from.
392
- */
393
- public function move_old_backups( $from ) {
394
-
395
- if ( ! is_readable( $from ) ) {
396
- return;
397
- }
398
-
399
- if ( ! wp_is_writable( Path::get_path() ) ) {
400
- return;
401
- }
402
-
403
- // Move any existing backups
404
- if ( $handle = opendir( $from ) ) {
405
-
406
- // Loop through the backup directory
407
- while ( false !== ( $file = readdir( $handle ) ) ) {
408
-
409
- // Find all zips
410
- if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) ) {
411
-
412
- // Try to move them
413
- if ( ! @rename( trailingslashit( $from ) . $file, trailingslashit( Path::get_path() ) . $file ) ) {
414
-
415
- // If we can't move them then try to copy them
416
- copy( trailingslashit( $from ) . $file, trailingslashit( Path::get_path() ) . $file );
417
-
418
- }
419
- }
420
- }
421
-
422
- closedir( $handle );
423
-
424
- }
425
-
426
- // Delete the old directory if it's inside WP_CONTENT_DIR
427
- if ( false !== strpos( $from, WP_CONTENT_DIR ) && Path::get_path() !== $from ) {
428
- rmdirtree( $from );
429
- }
430
- }
431
-
432
- /**
433
- * Clean any temporary / incomplete backups from the backups directory
434
- */
435
- public function cleanup() {
436
-
437
- // Don't cleanup a custom path, who knows what other stuff is there
438
- if ( Path::get_path() === $this->get_custom_path() ) {
439
- return;
440
- }
441
-
442
- foreach ( new CleanUpIterator( new \DirectoryIterator( Path::get_path() ) ) as $file ) {
443
-
444
- if ( $file->isDot() || ! $file->isReadable() || ! $file->isFile() ) {
445
- continue;
446
- }
447
-
448
- @unlink( $file->getPathname() );
449
-
450
- }
451
- }
452
- }
453
-
454
- class CleanUpIterator extends \FilterIterator {
455
-
456
- // Don't match index.html, files with zip extension or status logfiles.
457
- public function accept() {
458
-
459
- // Don't remove existing backups
460
- if ( 'zip' === pathinfo( $this->current()->getFilename(), PATHINFO_EXTENSION ) ) {
461
- return false;
462
- }
463
-
464
- // Don't remove the index.html file
465
- if ( 'index.html' === $this->current()->getBasename() ) {
466
- return false;
467
- }
468
-
469
- // Don't remove the file manifest
470
- if ( '.files' === $this->current()->getBasename() ) {
471
- return false;
472
- }
473
-
474
- // Don't cleanup the backup running file
475
- return ! preg_match( '/(.*-running)/', $this->current() );
476
-
477
- }
478
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Manages both the backup path and site root
7
+ *
8
+ * Handles calculating & protecting the directory that backups will be stored in
9
+ * as well as the directory that is being backed up
10
+ */
11
+ class Path {
12
+
13
+ /**
14
+ * The path to the directory that backup files are stored in
15
+ *
16
+ * @var string $this->path
17
+ */
18
+ private $path;
19
+
20
+ /**
21
+ * The path to the directory that will be backed up
22
+ *
23
+ * @var string $this->root
24
+ */
25
+ private $root;
26
+
27
+ /**
28
+ * The path to the directory that backup files are stored in
29
+ *
30
+ * @var string $this->path
31
+ */
32
+ private $custom_path;
33
+
34
+ /**
35
+ * Contains the instantiated Path instance
36
+ *
37
+ * @var Path $this->instance
38
+ */
39
+ private static $instance;
40
+
41
+ /**
42
+ * Protected constructor to prevent creating a new instance of the
43
+ * *Singleton* via the `new` operator from outside of this class.
44
+ */
45
+ protected function __construct() {}
46
+
47
+ /**
48
+ * Private clone method to prevent cloning of the instance of the
49
+ * *Singleton* instance.
50
+ */
51
+ private function __clone() {}
52
+
53
+ /**
54
+ * Private unserialize method to prevent unserializing of the *Singleton*
55
+ * instance.
56
+ */
57
+ private function __wakeup() {}
58
+
59
+ /**
60
+ * Returns the *Singleton* instance of this class.
61
+ *
62
+ * @staticvar Path $instance The *Singleton* instances of this class.
63
+ *
64
+ * @return Path The *Singleton* instance.
65
+ */
66
+ public static function get_instance() {
67
+
68
+ if ( ! ( self::$instance instanceof Path ) ) {
69
+ self::$instance = new Path();
70
+ }
71
+
72
+ return self::$instance;
73
+ }
74
+
75
+ /**
76
+ * Convenience method for quickly grabbing the path
77
+ */
78
+ public static function get_path() {
79
+ return self::get_instance()->get_calculated_path();
80
+ }
81
+
82
+ /**
83
+ * Convenience method for quickly grabbing the root
84
+ */
85
+ public static function get_root() {
86
+ return self::get_instance()->get_calculated_root();
87
+ }
88
+
89
+ /**
90
+ * Calculate the path to the site "home" directory.
91
+ *
92
+ * The home directory is the path equivalent to the home_url. That is,
93
+ * the path to the true root of the website. In situations where WordPress is
94
+ * installed in a subdirectory the home path is different to ABSPATH
95
+ *
96
+ * @param string $site_path The site_path to use when calculating the home path, defaults to ABSPATH
97
+ */
98
+ public static function get_home_path( $site_path = ABSPATH ) {
99
+
100
+ if ( defined( 'HMBKP_ROOT' ) && HMBKP_ROOT ) {
101
+ return wp_normalize_path( HMBKP_ROOT );
102
+ }
103
+
104
+ $home_path = wp_normalize_path( $site_path );
105
+
106
+ if ( path_in_php_open_basedir( dirname( $site_path ) ) ) {
107
+
108
+ $home = set_url_scheme( get_option( 'home' ), 'http' );
109
+ $siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' );
110
+ if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) {
111
+ $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
112
+ $pos = strripos( wp_normalize_path( $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) );
113
+ $home_path = substr( wp_normalize_path( $_SERVER['SCRIPT_FILENAME'] ), 0, $pos );
114
+ $home_path = trailingslashit( $home_path );
115
+ }
116
+
117
+ if ( is_multisite() ) {
118
+ $slashed_home = trailingslashit( get_option( 'home' ) );
119
+ $base = parse_url( $slashed_home, PHP_URL_PATH );
120
+ $document_root_fix = wp_normalize_path( realpath( $_SERVER['DOCUMENT_ROOT'] ) );
121
+ $abspath_fix = wp_normalize_path( ABSPATH );
122
+ $home_path = strpos( $abspath_fix, $document_root_fix ) === 0 ? $document_root_fix . $base : $home_path;
123
+ }
124
+ }
125
+
126
+ return wp_normalize_path( untrailingslashit( $home_path ) );
127
+
128
+ }
129
+
130
+ /**
131
+ * get the calculated path to the directory where backups will be stored
132
+ */
133
+ private function get_calculated_path() {
134
+
135
+ // Calculate the path if needed
136
+ if ( empty( $this->path ) || ! wp_is_writable( $this->path ) ) {
137
+ $this->calculate_path();
138
+ }
139
+
140
+ // Ensure the backup directory is protected
141
+ $this->protect_path();
142
+
143
+ return wp_normalize_path( $this->path );
144
+
145
+ }
146
+
147
+ /**
148
+ * Set the path directly, overriding the default
149
+ *
150
+ * @param $path
151
+ */
152
+ public function set_path( $path ) {
153
+
154
+ $this->custom_path = $path;
155
+
156
+ // Re-calculate the backup path
157
+ $this->calculate_path();
158
+
159
+ }
160
+
161
+ /**
162
+ * get the calculated path to the directory that will be backed up
163
+ */
164
+ private function get_calculated_root() {
165
+
166
+ $root = self::get_home_path();
167
+
168
+ if ( defined( 'HMBKP_ROOT' ) && HMBKP_ROOT ) {
169
+ $root = HMBKP_ROOT;
170
+ }
171
+
172
+ if ( $this->root ) {
173
+ $root = $this->root;
174
+ }
175
+
176
+ return wp_normalize_path( $root );
177
+
178
+ }
179
+
180
+ /**
181
+ * Set the root path directly, overriding the default
182
+ *
183
+ * @param $root
184
+ */
185
+ public function set_root( $root ) {
186
+ $this->root = $root;
187
+ }
188
+
189
+ public function reset_path() {
190
+ $this->path = $this->custom_path = '';
191
+ }
192
+
193
+ /**
194
+ * Get the path to the default backup location in wp-content
195
+ */
196
+ public function get_default_path() {
197
+ return trailingslashit( wp_normalize_path( WP_CONTENT_DIR ) ) . 'backupwordpress-' . substr( HMBKP_SECURE_KEY, 0, 10 ) . '-backups';
198
+ }
199
+
200
+ /**
201
+ * Get the path to the fallback backup location in uploads
202
+ */
203
+ public function get_fallback_path() {
204
+
205
+ $upload_dir = wp_upload_dir();
206
+
207
+ return trailingslashit( wp_normalize_path( $upload_dir['basedir'] ) ) . 'backupwordpress-' . substr( HMBKP_SECURE_KEY, 0, 10 ) . '-backups';
208
+
209
+ }
210
+
211
+ /**
212
+ * Get the path to the custom backup location if it's been set
213
+ */
214
+ public function get_custom_path() {
215
+
216
+ if ( $this->custom_path ) {
217
+ return $this->custom_path;
218
+ }
219
+
220
+ if ( defined( 'HMBKP_PATH' ) && wp_is_writable( HMBKP_PATH ) ) {
221
+ return HMBKP_PATH;
222
+ }
223
+
224
+ return '';
225
+
226
+ }
227
+
228
+ /**
229
+ * Builds an array containing existing backups folders.
230
+ *
231
+ * @return array
232
+ */
233
+ public function get_existing_paths() {
234
+
235
+ if ( false === $default = glob( WP_CONTENT_DIR . '/backupwordpress-*-backups', GLOB_ONLYDIR ) ) {
236
+ $default = array();
237
+ }
238
+
239
+ $upload_dir = wp_upload_dir();
240
+
241
+ if ( false === $fallback = glob( $upload_dir['basedir'] . '/backupwordpress-*-backups', GLOB_ONLYDIR ) ) {
242
+ $fallback = array();
243
+ }
244
+
245
+ $paths = array_merge( $default, $fallback );
246
+ $paths = array_map( 'wp_normalize_path', $paths );
247
+
248
+ return $paths;
249
+
250
+ }
251
+
252
+ /**
253
+ * Returns the first existing path if there is one
254
+ *
255
+ * @return string Backup path if found empty string if not
256
+ */
257
+ public function get_existing_path() {
258
+
259
+ $paths = $this->get_existing_paths();
260
+
261
+ if ( ! empty( $paths[0] ) ) {
262
+ return $paths[0];
263
+ }
264
+
265
+ return '';
266
+
267
+ }
268
+
269
+ /**
270
+ * Calculate the backup path and create the directory if it doesn't exist.
271
+ *
272
+ * Tries all possible locations and uses the first one possible.
273
+ *
274
+ * @return
275
+ */
276
+ public function calculate_path() {
277
+
278
+ $paths = $this->get_possible_paths();
279
+
280
+ // Loop through possible paths, use the first one that exists/can be created and is writable.
281
+ foreach ( $paths as $path ) {
282
+ // Also handles fixing perms / directory already exists.
283
+ if ( wp_mkdir_p( $path ) && wp_is_writable( $path ) ) {
284
+ break;
285
+ }
286
+ }
287
+
288
+ /**
289
+ * If we managed to create a writable path then use that,
290
+ * otherwise just return the unwritable path.
291
+ */
292
+ if ( file_exists( $path ) && wp_is_writable( $path ) ) {
293
+ $this->path = $path;
294
+ } else {
295
+ $this->path = reset( $paths );
296
+ }
297
+ }
298
+
299
+ public function get_possible_paths() {
300
+
301
+ $paths = array();
302
+
303
+ // If we have a custom path then try to use it.
304
+ if ( $this->get_custom_path() ) {
305
+ $paths[] = $this->get_custom_path();
306
+ }
307
+
308
+ // If there is already a backups directory then try to use that.
309
+ if ( $this->get_existing_path() ) {
310
+ $paths[] = $this->get_existing_path();
311
+ }
312
+
313
+ // If not then default to a new directory in wp-content.
314
+ $paths[] = $this->get_default_path();
315
+
316
+ // If that didn't work then fallback to a new directory in uploads.
317
+ $paths[] = $this->get_fallback_path();
318
+
319
+ return $paths;
320
+ }
321
+
322
+ /**
323
+ * Protect the directory that backups are stored in
324
+ *
325
+ * - Adds an index.html file in an attempt to disable directory browsing
326
+ * - Adds a .httaccess file to deny direct access if on Apache
327
+ *
328
+ * @param string $reset
329
+ */
330
+ public function protect_path( $reset = 'no' ) {
331
+
332
+ global $is_apache;
333
+
334
+ // Protect against directory browsing by including an index.html file
335
+ $index = $this->path . '/index.html';
336
+
337
+ if ( 'reset' === $reset && file_exists( $index ) ) {
338
+ @unlink( $index );
339
+ }
340
+
341
+ if ( ! file_exists( $index ) && wp_is_writable( $this->path ) ) {
342
+ file_put_contents( $index, '' );
343
+ }
344
+
345
+ $htaccess = $this->path . '/.htaccess';
346
+
347
+ if ( ( 'reset' === $reset ) && file_exists( $htaccess ) ) {
348
+ @unlink( $htaccess );
349
+ }
350
+
351
+ // Protect the directory with a .htaccess file on Apache servers
352
+ if ( $is_apache && function_exists( 'insert_with_markers' ) && ! file_exists( $htaccess ) && wp_is_writable( $this->path ) ) {
353
+
354
+ $contents = array();
355
+ $contents[] = '# ' . sprintf( __( 'This %s file ensures that other people cannot download your backup files.', 'backupwordpress' ), '.htaccess' );
356
+ $contents[] = '';
357
+ $contents[] = '<IfModule mod_rewrite.c>';
358
+ $contents[] = 'RewriteEngine On';
359
+ $contents[] = 'RewriteCond %{QUERY_STRING} !key=' . HMBKP_SECURE_KEY;
360
+ $contents[] = 'RewriteRule (.*) - [F]';
361
+ $contents[] = '</IfModule>';
362
+ $contents[] = '';
363
+
364
+ file_put_contents( $htaccess, '' );
365
+
366
+ insert_with_markers( $htaccess, 'BackUpWordPress', $contents );
367
+
368
+ }
369
+
370
+ }
371
+
372
+ /**
373
+ * If we have more than one path then move any existing backups to the current path and remove them
374
+ */
375
+ public function merge_existing_paths() {
376
+
377
+ $paths = $this->get_existing_paths();
378
+
379
+ if ( ( ! empty( $paths ) && $this->get_custom_path() ) || count( $paths ) > 1 ) {
380
+ foreach ( $paths as $old_path ) {
381
+ $this->move_old_backups( $old_path );
382
+ }
383
+ }
384
+
385
+ }
386
+
387
+ /**
388
+ * Move backup files from an existing directory and the new
389
+ * location.
390
+ *
391
+ * @param string $from The path to move the backups from.
392
+ */
393
+ public function move_old_backups( $from ) {
394
+
395
+ if ( ! is_readable( $from ) ) {
396
+ return;
397
+ }
398
+
399
+ if ( ! wp_is_writable( Path::get_path() ) ) {
400
+ return;
401
+ }
402
+
403
+ // Move any existing backups
404
+ if ( $handle = opendir( $from ) ) {
405
+
406
+ // Loop through the backup directory
407
+ while ( false !== ( $file = readdir( $handle ) ) ) {
408
+
409
+ // Find all zips
410
+ if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) ) {
411
+
412
+ // Try to move them
413
+ if ( ! @rename( trailingslashit( $from ) . $file, trailingslashit( Path::get_path() ) . $file ) ) {
414
+
415
+ // If we can't move them then try to copy them
416
+ copy( trailingslashit( $from ) . $file, trailingslashit( Path::get_path() ) . $file );
417
+
418
+ }
419
+ }
420
+ }
421
+
422
+ closedir( $handle );
423
+
424
+ }
425
+
426
+ // Delete the old directory if it's inside WP_CONTENT_DIR
427
+ if ( false !== strpos( $from, WP_CONTENT_DIR ) && Path::get_path() !== $from ) {
428
+ rmdirtree( $from );
429
+ }
430
+ }
431
+
432
+ /**
433
+ * Clean any temporary / incomplete backups from the backups directory
434
+ */
435
+ public function cleanup() {
436
+
437
+ // Don't cleanup a custom path, who knows what other stuff is there
438
+ if ( Path::get_path() === $this->get_custom_path() ) {
439
+ return;
440
+ }
441
+
442
+ foreach ( new CleanUpIterator( new \DirectoryIterator( Path::get_path() ) ) as $file ) {
443
+
444
+ if ( $file->isDot() || ! $file->isReadable() || ! $file->isFile() ) {
445
+ continue;
446
+ }
447
+
448
+ @unlink( $file->getPathname() );
449
+
450
+ }
451
+ }
452
+ }
453
+
454
+ class CleanUpIterator extends \FilterIterator {
455
+
456
+ // Don't match index.html, files with zip extension or status logfiles.
457
+ public function accept() {
458
+
459
+ // Don't remove existing backups
460
+ if ( 'zip' === pathinfo( $this->current()->getFilename(), PATHINFO_EXTENSION ) ) {
461
+ return false;
462
+ }
463
+
464
+ // Don't remove the index.html file
465
+ if ( 'index.html' === $this->current()->getBasename() ) {
466
+ return false;
467
+ }
468
+
469
+ // Don't remove the file manifest
470
+ if ( '.files' === $this->current()->getBasename() ) {
471
+ return false;
472
+ }
473
+
474
+ // Don't cleanup the backup running file
475
+ return ! preg_match( '/(.*-running)/', $this->current() );
476
+
477
+ }
478
+ }
classes/class-plugin.php CHANGED
@@ -1,467 +1,467 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Class Plugin
7
- */
8
- final class Plugin {
9
- const PLUGIN_VERSION = '3.6.4';
10
-
11
- /**
12
- * @var Plugin The singleton instance.
13
- */
14
- private static $instance;
15
-
16
- /**
17
- * Instantiates a new Plugin object.
18
- */
19
- private function __construct() {
20
- add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
21
-
22
- $hide_notice = get_site_option( 'hmbkp_hide_info_notice', false );
23
-
24
- if ( ! $hide_notice ) {
25
- add_action( 'admin_notices', array( $this, 'display_feature_message' ) );
26
- add_action( 'network_admin_notices', array( $this, 'display_feature_message' ) );
27
- }
28
-
29
- }
30
-
31
- /**
32
- * Insures we always return the same object.
33
- *
34
- * @return Plugin
35
- */
36
- public static function get_instance() {
37
-
38
- if ( ! ( self::$instance instanceof Plugin ) ) {
39
- self::$instance = new Plugin();
40
- }
41
-
42
- return self::$instance;
43
- }
44
-
45
- /**
46
- * Initialize the plugin.
47
- */
48
- public function plugins_loaded() {
49
-
50
- if ( true !== $this->maybe_self_deactivate() ) {
51
-
52
- $this->constants();
53
-
54
- $this->includes();
55
-
56
- $this->hooks();
57
-
58
- $this->text_domain();
59
-
60
- // If we get here, then BWP is loaded
61
- do_action( 'backupwordpress_loaded' );
62
-
63
- }
64
-
65
- }
66
-
67
- /**
68
- * Check plugin requirements.
69
- *
70
- * @return bool True is fails requirements. False otherwise.
71
- */
72
- public function maybe_self_deactivate() {
73
-
74
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' );
75
-
76
- if ( false === \HMBKP_Setup::meets_requirements() ) {
77
-
78
- add_action( 'admin_init', array( '\HMBKP_Setup', 'self_deactivate' ) );
79
-
80
- add_action( 'all_admin_notices', array( '\HMBKP_Setup', 'display_admin_notices' ) );
81
-
82
- return true;
83
-
84
- }
85
-
86
- return false;
87
-
88
- }
89
-
90
- /**
91
- * Define all the constants.
92
- */
93
- public function constants() {
94
-
95
- if ( ! defined( 'HMBKP_PLUGIN_SLUG' ) ) {
96
- define( 'HMBKP_PLUGIN_SLUG', dirname( HMBKP_BASENAME ) );
97
- }
98
-
99
- if ( ! defined( 'HMBKP_PLUGIN_URL' ) ) {
100
- define( 'HMBKP_PLUGIN_URL', plugin_dir_url( HMBKP_BASENAME ) );
101
- }
102
-
103
- if ( ! defined( 'HMBKP_PLUGIN_LANG_DIR' ) ) {
104
- define( 'HMBKP_PLUGIN_LANG_DIR', apply_filters( 'hmbkp_filter_lang_dir', HMBKP_PLUGIN_SLUG . '/languages/' ) );
105
- }
106
-
107
- if ( ! defined( 'HMBKP_ADMIN_URL' ) ) {
108
- $page = is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'tools.php' );
109
- define( 'HMBKP_ADMIN_URL', add_query_arg( 'page', HMBKP_PLUGIN_SLUG, $page ) );
110
- }
111
-
112
- if ( ! defined( 'HMBKP_ADMIN_PAGE' ) ) {
113
- $prefix = is_multisite() ? 'settings_page_' : 'tools_page_';
114
-
115
- define( 'HMBKP_ADMIN_PAGE', $prefix . HMBKP_PLUGIN_SLUG );
116
- }
117
-
118
- define( 'HMBKP_SECURE_KEY', $this->generate_key() );
119
-
120
- }
121
-
122
- /**
123
- * Load all BackUpWordPress functions.
124
- */
125
- protected function includes() {
126
-
127
- require_once( HMBKP_PLUGIN_PATH . 'vendor/autoload.php' );
128
-
129
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-notices.php' );
130
-
131
- // Load Whitelist HTML submodule and admin required functions.
132
- require_once( HMBKP_PLUGIN_PATH . 'whitelist-html/whitelist-html.php' );
133
- require_once( HMBKP_PLUGIN_PATH . 'admin/menu.php' );
134
- require_once( HMBKP_PLUGIN_PATH . 'admin/actions.php' );
135
-
136
- // Load Backdrop if necessary.
137
- if ( ! class_exists( 'HM_Backdrop_Task' ) ) {
138
- require_once( HMBKP_PLUGIN_PATH . 'backdrop/hm-backdrop.php' );
139
- }
140
-
141
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-requirements.php' );
142
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-requirement.php' );
143
-
144
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-path.php' );
145
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-excludes.php' );
146
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-site-size.php' );
147
-
148
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-utilities.php' );
149
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-status.php' );
150
-
151
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine.php' );
152
-
153
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-database.php' );
154
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-database-mysqldump.php' );
155
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-database-imysqldump.php' );
156
-
157
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-file.php' );
158
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-file-zip.php' );
159
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-file-zip-archive.php' );
160
-
161
- require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup.php' );
162
-
163
- // Load the backup scheduling classes
164
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-scheduled-backup.php' );
165
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-schedules.php' );
166
-
167
- // Load the core functions
168
- require_once( HMBKP_PLUGIN_PATH . 'functions/core.php' );
169
- require_once( HMBKP_PLUGIN_PATH . 'functions/interface.php' );
170
-
171
- // Load the services
172
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-services.php' );
173
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-service.php' );
174
-
175
- // Load the email service
176
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-email-service.php' );
177
-
178
- // Load the webhook services
179
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-webhook-service.php' );
180
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-wpremote-webhook-service.php' );
181
-
182
- require_once( HMBKP_PLUGIN_PATH . 'classes/deprecated.php' );
183
-
184
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-extensions.php' );
185
-
186
- // Load the wp cli command
187
- if ( defined( 'WP_CLI' ) && WP_CLI ) {
188
- include( HMBKP_PLUGIN_PATH . 'classes/class-backupwordpress-wp-cli-command.php' );
189
- }
190
-
191
- }
192
-
193
- /**
194
- * Hook into WordPress page lifecycle and execute BackUpWordPress functions.
195
- */
196
- public function hooks() {
197
-
198
- add_action( 'activated_plugin', array( $this, 'load_first' ) );
199
-
200
- add_action( 'admin_init', array( $this, 'upgrade' ) );
201
-
202
- add_action( 'admin_init', array( $this, 'init' ) );
203
-
204
- add_action( 'hmbkp_schedule_hook', array( $this, 'schedule_hook_run' ) );
205
-
206
- add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
207
-
208
- add_action( 'admin_footer-' . HMBKP_ADMIN_PAGE, array( $this, 'load_intercom_script' ) );
209
-
210
- add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
211
-
212
- }
213
-
214
- /**
215
- * Load the Javascript in the admin.
216
- *
217
- * @param $hook The name of the admin page hook.
218
- */
219
- public function scripts( $hook ) {
220
-
221
- if ( HMBKP_ADMIN_PAGE !== $hook ) {
222
- return;
223
- }
224
-
225
- $js_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.min.js';
226
-
227
- // TODO shuold this also support WP_SCRIPT_DEBUG
228
- if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
229
- $js_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.js';
230
- }
231
-
232
- wp_enqueue_script( 'hmbkp', $js_file, array( 'heartbeat' ), sanitize_key( self::PLUGIN_VERSION ) );
233
-
234
- wp_localize_script(
235
- 'hmbkp',
236
- 'hmbkp',
237
- array(
238
- 'page_slug' => HMBKP_PLUGIN_SLUG,
239
- 'nonce' => wp_create_nonce( 'hmbkp_nonce' ),
240
- 'hmbkp_run_schedule_nonce' => wp_create_nonce( 'hmbkp_run_schedule' ),
241
- 'update' => __( 'Update', 'backupwordpress' ),
242
- 'cancel' => __( 'Cancel', 'backupwordpress' ),
243
- 'delete_schedule' => __( 'Are you sure you want to delete this schedule? All of its backups will also be deleted.', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
244
- 'delete_backup' => __( 'Are you sure you want to delete this backup?', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
245
- 'remove_exclude_rule' => __( 'Are you sure you want to remove this exclude rule?', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
246
- 'remove_old_backups' => __( 'Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted. Are you sure that\'s what you want?', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
247
- )
248
- );
249
-
250
- }
251
-
252
- /**
253
- * Loads the plugin text domain for translation.
254
- * This setup allows a user to just drop his custom translation files into the WordPress language directory
255
- * Files will need to be in a subdirectory with the name of the textdomain 'backupwordpress'
256
- */
257
- public function text_domain() {
258
-
259
- // Set unique textdomain string
260
- $textdomain = 'backupwordpress';
261
-
262
- // The 'plugin_locale' filter is also used by default in load_plugin_textdomain()
263
- $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );
264
-
265
- // Set filter for WordPress languages directory
266
- $hmbkp_wp_lang_dir = apply_filters( 'hmbkp_do_filter_wp_lang_dir', trailingslashit( WP_LANG_DIR ) . trailingslashit( $textdomain ) . $textdomain . '-' . $locale . '.mo' );
267
-
268
- // Translations: First, look in WordPress' "languages" folder = custom & update-secure!
269
- load_textdomain( $textdomain, $hmbkp_wp_lang_dir );
270
-
271
- // Translations: Secondly, look in plugin's "languages" folder = default
272
- load_plugin_textdomain( $textdomain, false, HMBKP_PLUGIN_LANG_DIR );
273
-
274
- }
275
-
276
- /**
277
- * Determine if we need to run an upgrade routine.
278
- */
279
- public function upgrade() {
280
-
281
- // Fire the update action
282
- if ( self::PLUGIN_VERSION != get_option( 'hmbkp_plugin_version' ) ) {
283
- update();
284
- }
285
-
286
- }
287
-
288
- /**
289
- * Runs on every admin page load
290
- */
291
- public function init() {
292
-
293
- // If we have multiple paths for some reason then clean them up
294
- Path::get_instance()->merge_existing_paths();
295
- }
296
-
297
- /**
298
- * Generate a unique key.
299
- *
300
- * @return string
301
- */
302
- protected function generate_key() {
303
-
304
- $check = apply_filters( 'hmbkp_generate_key', null );
305
-
306
- if ( null !== $check ) {
307
- return $check;
308
- }
309
-
310
- $key = array( ABSPATH, time() );
311
- $constants = array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT', 'SECRET_KEY' );
312
-
313
- foreach ( $constants as $constant ) {
314
- if ( defined( $constant ) ) {
315
- $key[] = constant( $constant );
316
- }
317
- }
318
-
319
- shuffle( $key );
320
-
321
- return md5( serialize( $key ) );
322
-
323
- }
324
-
325
- /**
326
- * Ensure BackUpWordPress is loaded before add-ons, changes the order of the serialized values in the DB field.
327
- */
328
- public function load_first() {
329
-
330
- $active_plugins = get_option( 'active_plugins' );
331
-
332
- $plugin_path = plugin_basename( __FILE__ );
333
-
334
- $key = array_search( $plugin_path, $active_plugins );
335
-
336
- if ( $key > 0 ) {
337
-
338
- array_splice( $active_plugins, $key, 1 );
339
-
340
- array_unshift( $active_plugins, $plugin_path );
341
-
342
- update_option( 'active_plugins', $active_plugins );
343
-
344
- }
345
-
346
- }
347
-
348
- /**
349
- * Function to run when the schedule cron fires.
350
- *
351
- * @param $schedule_id
352
- */
353
- public function schedule_hook_run( $schedule_id ) {
354
-
355
- if ( ! is_backup_possible() ) {
356
- return;
357
- }
358
-
359
- $schedules = Schedules::get_instance();
360
- $schedule = $schedules->get_schedule( $schedule_id );
361
-
362
- if ( ! $schedule ) {
363
- return;
364
- }
365
-
366
- $schedule->run();
367
-
368
- }
369
-
370
- /**
371
- * Enqueue the plugin styles.
372
- *
373
- * @param $hook
374
- */
375
- public function styles( $hook ) {
376
-
377
- if ( 'tools_page_backupwordpress_extensions' !== $hook && HMBKP_ADMIN_PAGE !== $hook ) {
378
- return;
379
- }
380
-
381
- $css_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.min.css';
382
-
383
- if ( WP_DEBUG ) {
384
- $css_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.css';
385
- }
386
-
387
- wp_enqueue_style( 'backupwordpress', $css_file, false, sanitize_key( self::PLUGIN_VERSION ) );
388
-
389
- }
390
-
391
- /**
392
- * Load Intercom and send across user information and server info. Only loaded if the user has opted in.
393
- *
394
- * @param $hook
395
- */
396
- public function load_intercom_script() {
397
-
398
- if ( ! get_option( 'hmbkp_enable_support' ) ) {
399
- return;
400
- }
401
-
402
- $info = array();
403
-
404
- foreach ( Requirements::get_requirement_groups() as $group ) {
405
- foreach ( Requirements::get_requirements( $group ) as $requirement ) {
406
- $info[ $requirement->name() ] = $requirement->result();
407
- }
408
- }
409
-
410
- foreach ( Services::get_services() as $file => $service ) {
411
- array_merge( $info, call_user_func( array( $service, 'intercom_data' ) ) );
412
- }
413
-
414
- $current_user = wp_get_current_user();
415
-
416
- $info['user_hash'] = hash_hmac( 'sha256', $current_user->user_email, 'fcUEt7Vi4ym5PXdcr2UNpGdgZTEvxX9NJl8YBTxK' );
417
- $info['email'] = $current_user->user_email;
418
- $info['created_at'] = strtotime( $current_user->user_registered );
419
- $info['app_id'] = '7f1l4qyq';
420
- $info['name'] = $current_user->display_name;
421
- $info['widget'] = array( 'activator' => '#intercom' ); ?>
422
-
423
- <script id="IntercomSettingsScriptTag">
424
- window.intercomSettings = <?php echo json_encode( $info ); ?>;
425
- </script>
426
- <script>!function(){function e(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://static.intercomcdn.com/intercom.v1.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}var a=window,b=a.Intercom;if("function"==typeof b)b("reattach_activator"),b("update",intercomSettings);else{var c=document,d=function(){d.c(arguments)};d.q=[],d.c=function(a){d.q.push(a)},a.Intercom=d,a.attachEvent?a.attachEvent("onload",e):a.addEventListener("load",e,!1)}}();</script>
427
-
428
- <?php }
429
-
430
- public function display_feature_message() {
431
-
432
- $current_screen = get_current_screen();
433
-
434
- if ( ! isset( $current_screen ) ) {
435
- return;
436
- }
437
-
438
- $page = is_multisite() ? HMBKP_ADMIN_PAGE . '-network' : HMBKP_ADMIN_PAGE;
439
- if ( $current_screen->id !== $page ) {
440
- return;
441
- }
442
-
443
- /* translators: %1$s and %2$s expand to anchor tags linking to the new extensions page. */
444
- $info_message = sprintf(
445
- __( 'Thanks for updating BackUpWordPress, why not check out %1$sour extensions?%2$s', 'backupwordpress' ),
446
- '<a href="https://bwp.hmn.md/" target="_blank">',
447
- '</a>'
448
- );
449
- ?>
450
-
451
- <div id="hmbkp-info-message" class="updated notice is-dismissible">
452
-
453
- <p><?php echo wp_kses_post( $info_message ); ?></p>
454
-
455
- <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'backupwordpress' ); ?></span></button>
456
-
457
- </div>
458
-
459
- <?php }
460
-
461
- }
462
-
463
- if ( is_multisite() && ! is_main_site() ) {
464
- return;
465
- }
466
-
467
- Plugin::get_instance();
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Class Plugin
7
+ */
8
+ final class Plugin {
9
+ const PLUGIN_VERSION = '3.6.4';
10
+
11
+ /**
12
+ * @var Plugin The singleton instance.
13
+ */
14
+ private static $instance;
15
+
16
+ /**
17
+ * Instantiates a new Plugin object.
18
+ */
19
+ private function __construct() {
20
+ add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
21
+
22
+ $hide_notice = get_site_option( 'hmbkp_hide_info_notice', false );
23
+
24
+ // Display message about XIBO
25
+ add_action( 'admin_notices', array( $this, 'display_xibo_message' ) );
26
+ add_action( 'network_admin_notices', array( $this, 'display_xibo_message' ) );
27
+
28
+ }
29
+
30
+ /**
31
+ * Insures we always return the same object.
32
+ *
33
+ * @return Plugin
34
+ */
35
+ public static function get_instance() {
36
+
37
+ if ( ! ( self::$instance instanceof Plugin ) ) {
38
+ self::$instance = new Plugin();
39
+ }
40
+
41
+ return self::$instance;
42
+ }
43
+
44
+ /**
45
+ * Initialize the plugin.
46
+ */
47
+ public function plugins_loaded() {
48
+
49
+ if ( true !== $this->maybe_self_deactivate() ) {
50
+
51
+ $this->constants();
52
+
53
+ $this->includes();
54
+
55
+ $this->hooks();
56
+
57
+ $this->text_domain();
58
+
59
+ // If we get here, then BWP is loaded
60
+ do_action( 'backupwordpress_loaded' );
61
+
62
+ }
63
+
64
+ }
65
+
66
+ /**
67
+ * Check plugin requirements.
68
+ *
69
+ * @return bool True is fails requirements. False otherwise.
70
+ */
71
+ public function maybe_self_deactivate() {
72
+
73
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' );
74
+
75
+ if ( false === \HMBKP_Setup::meets_requirements() ) {
76
+
77
+ add_action( 'admin_init', array( '\HMBKP_Setup', 'self_deactivate' ) );
78
+
79
+ add_action( 'all_admin_notices', array( '\HMBKP_Setup', 'display_admin_notices' ) );
80
+
81
+ return true;
82
+
83
+ }
84
+
85
+ return false;
86
+
87
+ }
88
+
89
+ /**
90
+ * Define all the constants.
91
+ */
92
+ public function constants() {
93
+
94
+ if ( ! defined( 'HMBKP_PLUGIN_SLUG' ) ) {
95
+ define( 'HMBKP_PLUGIN_SLUG', dirname( HMBKP_BASENAME ) );
96
+ }
97
+
98
+ if ( ! defined( 'HMBKP_PLUGIN_URL' ) ) {
99
+ define( 'HMBKP_PLUGIN_URL', plugin_dir_url( HMBKP_BASENAME ) );
100
+ }
101
+
102
+ if ( ! defined( 'HMBKP_PLUGIN_LANG_DIR' ) ) {
103
+ define( 'HMBKP_PLUGIN_LANG_DIR', apply_filters( 'hmbkp_filter_lang_dir', HMBKP_PLUGIN_SLUG . '/languages/' ) );
104
+ }
105
+
106
+ if ( ! defined( 'HMBKP_ADMIN_URL' ) ) {
107
+ $page = is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'tools.php' );
108
+ define( 'HMBKP_ADMIN_URL', add_query_arg( 'page', HMBKP_PLUGIN_SLUG, $page ) );
109
+ }
110
+
111
+ if ( ! defined( 'HMBKP_ADMIN_PAGE' ) ) {
112
+ $prefix = is_multisite() ? 'settings_page_' : 'tools_page_';
113
+
114
+ define( 'HMBKP_ADMIN_PAGE', $prefix . HMBKP_PLUGIN_SLUG );
115
+ }
116
+
117
+ define( 'HMBKP_SECURE_KEY', $this->generate_key() );
118
+
119
+ }
120
+
121
+ /**
122
+ * Load all BackUpWordPress functions.
123
+ */
124
+ protected function includes() {
125
+
126
+ require_once( HMBKP_PLUGIN_PATH . 'vendor/autoload.php' );
127
+
128
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-notices.php' );
129
+
130
+ // Load Whitelist HTML submodule and admin required functions.
131
+ require_once( HMBKP_PLUGIN_PATH . 'whitelist-html/whitelist-html.php' );
132
+ require_once( HMBKP_PLUGIN_PATH . 'admin/menu.php' );
133
+ require_once( HMBKP_PLUGIN_PATH . 'admin/actions.php' );
134
+
135
+ // Load Backdrop if necessary.
136
+ if ( ! class_exists( 'HM_Backdrop_Task' ) ) {
137
+ require_once( HMBKP_PLUGIN_PATH . 'backdrop/hm-backdrop.php' );
138
+ }
139
+
140
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-requirements.php' );
141
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-requirement.php' );
142
+
143
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-path.php' );
144
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-excludes.php' );
145
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-site-size.php' );
146
+
147
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-utilities.php' );
148
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-status.php' );
149
+
150
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine.php' );
151
+
152
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-database.php' );
153
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-database-mysqldump.php' );
154
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-database-imysqldump.php' );
155
+
156
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-file.php' );
157
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-file-zip.php' );
158
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup-engine-file-zip-archive.php' );
159
+
160
+ require_once( HMBKP_PLUGIN_PATH . 'classes/backup/class-backup.php' );
161
+
162
+ // Load the backup scheduling classes
163
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-scheduled-backup.php' );
164
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-schedules.php' );
165
+
166
+ // Load the core functions
167
+ require_once( HMBKP_PLUGIN_PATH . 'functions/core.php' );
168
+ require_once( HMBKP_PLUGIN_PATH . 'functions/interface.php' );
169
+
170
+ // Load the services
171
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-services.php' );
172
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-service.php' );
173
+
174
+ // Load the email service
175
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-email-service.php' );
176
+
177
+ // Load the webhook services
178
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-webhook-service.php' );
179
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-wpremote-webhook-service.php' );
180
+
181
+ require_once( HMBKP_PLUGIN_PATH . 'classes/deprecated.php' );
182
+
183
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-extensions.php' );
184
+
185
+ // Load the wp cli command
186
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
187
+ include( HMBKP_PLUGIN_PATH . 'classes/class-backupwordpress-wp-cli-command.php' );
188
+ }
189
+
190
+ }
191
+
192
+ /**
193
+ * Hook into WordPress page lifecycle and execute BackUpWordPress functions.
194
+ */
195
+ public function hooks() {
196
+
197
+ add_action( 'activated_plugin', array( $this, 'load_first' ) );
198
+
199
+ add_action( 'admin_init', array( $this, 'upgrade' ) );
200
+
201
+ add_action( 'admin_init', array( $this, 'init' ) );
202
+
203
+ add_action( 'hmbkp_schedule_hook', array( $this, 'schedule_hook_run' ) );
204
+
205
+ add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
206
+
207
+ add_action( 'admin_footer-' . HMBKP_ADMIN_PAGE, array( $this, 'load_intercom_script' ) );
208
+
209
+ add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
210
+
211
+ }
212
+
213
+ /**
214
+ * Load the Javascript in the admin.
215
+ *
216
+ * @param $hook The name of the admin page hook.
217
+ */
218
+ public function scripts( $hook ) {
219
+
220
+ if ( HMBKP_ADMIN_PAGE !== $hook ) {
221
+ return;
222
+ }
223
+
224
+ $js_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.min.js';
225
+
226
+ // TODO shuold this also support WP_SCRIPT_DEBUG
227
+ if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
228
+ $js_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.js';
229
+ }
230
+
231
+ wp_enqueue_script( 'hmbkp', $js_file, array( 'heartbeat' ), sanitize_key( self::PLUGIN_VERSION ) );
232
+
233
+ wp_localize_script(
234
+ 'hmbkp',
235
+ 'hmbkp',
236
+ array(
237
+ 'page_slug' => HMBKP_PLUGIN_SLUG,
238
+ 'nonce' => wp_create_nonce( 'hmbkp_nonce' ),
239
+ 'hmbkp_run_schedule_nonce' => wp_create_nonce( 'hmbkp_run_schedule' ),
240
+ 'update' => __( 'Update', 'backupwordpress' ),
241
+ 'cancel' => __( 'Cancel', 'backupwordpress' ),
242
+ 'delete_schedule' => __( 'Are you sure you want to delete this schedule? All of its backups will also be deleted.', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
243
+ 'delete_backup' => __( 'Are you sure you want to delete this backup?', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
244
+ 'remove_exclude_rule' => __( 'Are you sure you want to remove this exclude rule?', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
245
+ 'remove_old_backups' => __( 'Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted. Are you sure that\'s what you want?', 'backupwordpress' ) . "\n\n" . __( '\'Cancel\' to go back, \'OK\' to delete.', 'backupwordpress' ) . "\n",
246
+ )
247
+ );
248
+
249
+ }
250
+
251
+ /**
252
+ * Loads the plugin text domain for translation.
253
+ * This setup allows a user to just drop his custom translation files into the WordPress language directory
254
+ * Files will need to be in a subdirectory with the name of the textdomain 'backupwordpress'
255
+ */
256
+ public function text_domain() {
257
+
258
+ // Set unique textdomain string
259
+ $textdomain = 'backupwordpress';
260
+
261
+ // The 'plugin_locale' filter is also used by default in load_plugin_textdomain()
262
+ $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );
263
+
264
+ // Set filter for WordPress languages directory
265
+ $hmbkp_wp_lang_dir = apply_filters( 'hmbkp_do_filter_wp_lang_dir', trailingslashit( WP_LANG_DIR ) . trailingslashit( $textdomain ) . $textdomain . '-' . $locale . '.mo' );
266
+
267
+ // Translations: First, look in WordPress' "languages" folder = custom & update-secure!
268
+ load_textdomain( $textdomain, $hmbkp_wp_lang_dir );
269
+
270
+ // Translations: Secondly, look in plugin's "languages" folder = default
271
+ load_plugin_textdomain( $textdomain, false, HMBKP_PLUGIN_LANG_DIR );
272
+
273
+ }
274
+
275
+ /**
276
+ * Determine if we need to run an upgrade routine.
277
+ */
278
+ public function upgrade() {
279
+
280
+ // Fire the update action
281
+ if ( self::PLUGIN_VERSION != get_option( 'hmbkp_plugin_version' ) ) {
282
+ update();
283
+ }
284
+
285
+ }
286
+
287
+ /**
288
+ * Runs on every admin page load
289
+ */
290
+ public function init() {
291
+
292
+ // If we have multiple paths for some reason then clean them up
293
+ Path::get_instance()->merge_existing_paths();
294
+ }
295
+
296
+ /**
297
+ * Generate a unique key.
298
+ *
299
+ * @return string
300
+ */
301
+ protected function generate_key() {
302
+
303
+ $check = apply_filters( 'hmbkp_generate_key', null );
304
+
305
+ if ( null !== $check ) {
306
+ return $check;
307
+ }
308
+
309
+ $key = array( ABSPATH, time() );
310
+ $constants = array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT', 'SECRET_KEY' );
311
+
312
+ foreach ( $constants as $constant ) {
313
+ if ( defined( $constant ) ) {
314
+ $key[] = constant( $constant );
315
+ }
316
+ }
317
+
318
+ shuffle( $key );
319
+
320
+ return md5( serialize( $key ) );
321
+
322
+ }
323
+
324
+ /**
325
+ * Ensure BackUpWordPress is loaded before add-ons, changes the order of the serialized values in the DB field.
326
+ */
327
+ public function load_first() {
328
+
329
+ $active_plugins = get_option( 'active_plugins' );
330
+
331
+ $plugin_path = plugin_basename( __FILE__ );
332
+
333
+ $key = array_search( $plugin_path, $active_plugins );
334
+
335
+ if ( $key > 0 ) {
336
+
337
+ array_splice( $active_plugins, $key, 1 );
338
+
339
+ array_unshift( $active_plugins, $plugin_path );
340
+
341
+ update_option( 'active_plugins', $active_plugins );
342
+
343
+ }
344
+
345
+ }
346
+
347
+ /**
348
+ * Function to run when the schedule cron fires.
349
+ *
350
+ * @param $schedule_id
351
+ */
352
+ public function schedule_hook_run( $schedule_id ) {
353
+
354
+ if ( ! is_backup_possible() ) {
355
+ return;
356
+ }
357
+
358
+ $schedules = Schedules::get_instance();
359
+ $schedule = $schedules->get_schedule( $schedule_id );
360
+
361
+ if ( ! $schedule ) {
362
+ return;
363
+ }
364
+
365
+ $schedule->run();
366
+
367
+ }
368
+
369
+ /**
370
+ * Enqueue the plugin styles.
371
+ *
372
+ * @param $hook
373
+ */
374
+ public function styles( $hook ) {
375
+
376
+ if ( 'tools_page_backupwordpress_extensions' !== $hook && HMBKP_ADMIN_PAGE !== $hook ) {
377
+ return;
378
+ }
379
+
380
+ $css_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.min.css';
381
+
382
+ if ( WP_DEBUG ) {
383
+ $css_file = HMBKP_PLUGIN_URL . 'assets/hmbkp.css';
384
+ }
385
+
386
+ wp_enqueue_style( 'backupwordpress', $css_file, false, sanitize_key( self::PLUGIN_VERSION ) );
387
+
388
+ }
389
+
390
+ /**
391
+ * Load Intercom and send across user information and server info. Only loaded if the user has opted in.
392
+ *
393
+ * @param $hook
394
+ */
395
+ public function load_intercom_script() {
396
+
397
+ if ( ! get_option( 'hmbkp_enable_support' ) ) {
398
+ return;
399
+ }
400
+
401
+ $info = array();
402
+
403
+ foreach ( Requirements::get_requirement_groups() as $group ) {
404
+ foreach ( Requirements::get_requirements( $group ) as $requirement ) {
405
+ $info[ $requirement->name() ] = $requirement->result();
406
+ }
407
+ }
408
+
409
+ foreach ( Services::get_services() as $file => $service ) {
410
+ array_merge( $info, call_user_func( array( $service, 'intercom_data' ) ) );
411
+ }
412
+
413
+ $current_user = wp_get_current_user();
414
+
415
+ $info['user_hash'] = hash_hmac( 'sha256', $current_user->user_email, 'fcUEt7Vi4ym5PXdcr2UNpGdgZTEvxX9NJl8YBTxK' );
416
+ $info['email'] = $current_user->user_email;
417
+ $info['created_at'] = strtotime( $current_user->user_registered );
418
+ $info['app_id'] = '7f1l4qyq';
419
+ $info['name'] = $current_user->display_name;
420
+ $info['widget'] = array( 'activator' => '#intercom' ); ?>
421
+
422
+ <script id="IntercomSettingsScriptTag">
423
+ window.intercomSettings = <?php echo json_encode( $info ); ?>;
424
+ </script>
425
+ <script>!function(){function e(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://static.intercomcdn.com/intercom.v1.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}var a=window,b=a.Intercom;if("function"==typeof b)b("reattach_activator"),b("update",intercomSettings);else{var c=document,d=function(){d.c(arguments)};d.q=[],d.c=function(a){d.q.push(a)},a.Intercom=d,a.attachEvent?a.attachEvent("onload",e):a.addEventListener("load",e,!1)}}();</script>
426
+
427
+ <?php }
428
+
429
+ public function display_xibo_message() {
430
+ $current_screen = get_current_screen();
431
+
432
+ if ( ! isset( $current_screen ) ) {
433
+ return;
434
+ }
435
+
436
+ $page = is_multisite() ? HMBKP_ADMIN_PAGE . '-network' : HMBKP_ADMIN_PAGE;
437
+ if ( $current_screen->id !== $page ) {
438
+ return;
439
+ }
440
+
441
+ $owner_message = sprintf(
442
+ __('BackupWordPress was created by our friends at HumanMade but is now owned by XIBO. We\'re committed to opensource and WordPress and will provide free support for the many BackupWordPress fans. However, we\'ll no longer be selling or supporting the paid add-ons (e.g. for backups to Dropbox and Google Drive).%1$sIt\'s a good idea to backup to cloud storage to protect against server-wide risks. For this we recommend %2$sUpdraftPlus WordPress Backups%3$s. Click here for %4$sfull comparison%3$s', 'backupwordpress'),
443
+ '<p/>',
444
+ '<a href="https://updraftplus.com/?afref=744" target="_blank">',
445
+ '</a>',
446
+ '<a href="https://updraftplus.com/backupwordpress/?afref=744">'
447
+ );
448
+ ?>
449
+
450
+ <div id="hmbkp-info-message" class="notice-info notice is-dismissible">
451
+
452
+ <p><?php echo wp_kses_post( $owner_message ); ?></p>
453
+
454
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'backupwordpress' ); ?></span></button>
455
+
456
+ </div>
457
+
458
+ <?php
459
+ }
460
+
461
+ }
462
+
463
+ if ( is_multisite() && ! is_main_site() ) {
464
+ return;
465
+ }
466
+
467
+ Plugin::get_instance();
classes/class-requirement.php CHANGED
@@ -1,779 +1,779 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * An abstract requirement class, individual requirements should
7
- * extend this class
8
- */
9
- abstract class Requirement {
10
-
11
- /**
12
- * The name of the requirement.
13
- *
14
- * @var string
15
- */
16
- protected $name = '';
17
-
18
- /**
19
- * @return mixed Did the requirement pass or fail.
20
- */
21
- protected static function test() {}
22
-
23
- /**
24
- * @return string
25
- */
26
- public function name() {
27
- return $this->name;
28
- }
29
-
30
- /**
31
- * @return string
32
- */
33
- public function result() {
34
-
35
- $test = $this->test();
36
-
37
- if ( is_string( $test ) && $test ) {
38
- return $test;
39
- }
40
-
41
- if ( is_bool( $test ) || empty( $test ) ) {
42
-
43
- if ( $test ) {
44
- return 'Yes';
45
- }
46
-
47
- return 'No';
48
-
49
- }
50
-
51
- return var_export( $test, true );
52
-
53
- }
54
-
55
- public function raw_result() {
56
- return $this->test();
57
- }
58
- }
59
-
60
- /**
61
- * Class Requirement_Zip_Archive
62
- */
63
- class Requirement_Zip_Archive extends Requirement {
64
-
65
- /**
66
- * @var string
67
- */
68
- protected $name = 'ZipArchive';
69
-
70
- /**
71
- * @return bool
72
- */
73
- public static function test() {
74
-
75
- if ( class_exists( 'ZipArchive' ) ) {
76
- return true;
77
- }
78
-
79
- return false;
80
-
81
- }
82
- }
83
- Requirements::register( 'HM\BackUpWordPress\Requirement_Zip_Archive', 'PHP' );
84
-
85
- /**
86
- * Class Requirement_Zip_Command
87
- *
88
- * Tests whether the zip command is available and if it is what path it's available at
89
- */
90
- class Requirement_Zip_Command_Path extends Requirement {
91
-
92
- /**
93
- * @var string
94
- */
95
- protected $name = 'zip command';
96
-
97
- /**
98
- * @return string|false
99
- */
100
- public static function test() {
101
-
102
- $backup = new Zip_File_Backup_Engine;
103
-
104
- return $backup->get_zip_executable_path();
105
-
106
- }
107
- }
108
- Requirements::register( 'HM\BackUpWordPress\Requirement_Zip_Command_Path', 'Server' );
109
-
110
- /**
111
- * Class Requirement_Mysqldump_Command
112
- *
113
- * Tests whether the zip command is available and if it is what path it's available at
114
- */
115
- class Requirement_Mysqldump_Command_Path extends Requirement {
116
-
117
- /**
118
- * @var string
119
- */
120
- protected $name = 'mysqldump command';
121
-
122
- /**
123
- * @return string|false
124
- */
125
- public static function test() {
126
-
127
- $backup = new Mysqldump_Database_Backup_Engine;
128
-
129
- return $backup->get_mysqldump_executable_path();
130
-
131
- }
132
- }
133
- Requirements::register( 'HM\BackUpWordPress\Requirement_Mysqldump_Command_Path', 'Server' );
134
-
135
- /**
136
- * Class Requirement_PHP_Version
137
- */
138
- class Requirement_PHP_Version extends Requirement {
139
-
140
- /**
141
- * @var string
142
- */
143
- protected $name = 'Version';
144
-
145
- /**
146
- * @return string
147
- */
148
- public static function test() {
149
- return PHP_VERSION;
150
- }
151
- }
152
- Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Version', 'PHP' );
153
-
154
- /**
155
- * Class Requirement_Cron_Array
156
- */
157
- class Requirement_Cron_Array extends Requirement {
158
-
159
- /**
160
- * @var string
161
- */
162
- protected $name = 'Cron Array';
163
-
164
- /**
165
- * @return bool|mixed
166
- */
167
- public static function test() {
168
-
169
- $cron = get_option( 'cron' );
170
-
171
- if ( ! $cron ) {
172
- return false;
173
- }
174
-
175
- return $cron;
176
-
177
- }
178
- }
179
- Requirements::register( 'HM\BackUpWordPress\Requirement_Cron_Array', 'Site' );
180
-
181
- /**
182
- * Class Requirement_Cron_Array
183
- */
184
- class Requirement_Language extends Requirement {
185
-
186
- /**
187
- * @var string
188
- */
189
- protected $name = 'Language';
190
-
191
- /**
192
- * @return bool|mixed
193
- */
194
- public static function test() {
195
-
196
- // Since 4.0
197
- $language = get_option( 'WPLANG' );
198
-
199
- if ( $language ) {
200
- return $language;
201
- }
202
-
203
- if ( defined( 'WPLANG' ) && WPLANG ) {
204
- return WPLANG;
205
- }
206
-
207
- return 'en_US';
208
-
209
- }
210
- }
211
- Requirements::register( 'HM\BackUpWordPress\Requirement_Language', 'Site' );
212
-
213
- /**
214
- * Class Requirement_Safe_Mode
215
- */
216
- class Requirement_Safe_Mode extends Requirement {
217
-
218
- /**
219
- * @var string
220
- */
221
- protected $name = 'Safe Mode';
222
-
223
- /**
224
- * @return bool
225
- */
226
- public static function test() {
227
- return Backup_Utilities::is_safe_mode_on();
228
- }
229
- }
230
- Requirements::register( 'HM\BackUpWordPress\Requirement_Safe_Mode', 'PHP' );
231
-
232
- /**
233
- * Class Requirement_Memory_Limit
234
- */
235
- class Requirement_PHP_Memory_Limit extends Requirement {
236
-
237
- /**
238
- * @var string
239
- */
240
- protected $name = 'Memory Limit';
241
-
242
- /**
243
- * @return string
244
- */
245
- public static function test() {
246
- return @ini_get( 'memory_limit' );
247
- }
248
- }
249
- Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Memory_Limit', 'PHP' );
250
-
251
- /**
252
- * Class Requirement_Backup_Path
253
- */
254
- class Requirement_Backup_Path extends Requirement {
255
-
256
- /**
257
- * @var string
258
- */
259
- protected $name = 'Backup Path';
260
-
261
- /**
262
- * @return string
263
- */
264
- public static function test() {
265
- return Path::get_path();
266
- }
267
- }
268
- Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Path', 'Site' );
269
-
270
- /**
271
- * Class Requirement_Backup_Path_Permissions
272
- */
273
- class Requirement_Backup_Path_Permissions extends Requirement {
274
-
275
- /**
276
- * @var string
277
- */
278
- protected $name = 'Backup Path Permissions';
279
-
280
- /**
281
- * @return string
282
- */
283
- public static function test() {
284
- if ( is_readable( PATH::get_path() ) ) {
285
- return substr( sprintf( '%o', fileperms( Path::get_path() ) ), - 4 );
286
- }
287
- return 'Unreadable';
288
- }
289
- }
290
- Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Path_Permissions', 'Site' );
291
-
292
- /**
293
- * Class Requirement_WP_CONTENT_DIR
294
- */
295
- class Requirement_WP_CONTENT_DIR extends Requirement {
296
-
297
- /**
298
- * @var string
299
- */
300
- protected $name = 'WP_CONTENT_DIR';
301
-
302
- /**
303
- * @return string
304
- */
305
- public static function test() {
306
- return WP_CONTENT_DIR;
307
- }
308
- }
309
- Requirements::register( 'HM\BackUpWordPress\Requirement_WP_CONTENT_DIR', 'Site' );
310
-
311
- /**
312
- * Class Requirement_WP_CONTENT_DIR_Permissions
313
- */
314
- class Requirement_WP_CONTENT_DIR_Permissions extends Requirement {
315
-
316
- /**
317
- * @var string
318
- */
319
- protected $name = 'WP_CONTENT_DIR Permissions';
320
-
321
- /**
322
- * @return string
323
- */
324
- public static function test() {
325
- return substr( sprintf( '%o', fileperms( WP_CONTENT_DIR ) ), - 4 );
326
- }
327
- }
328
- Requirements::register( 'HM\BackUpWordPress\Requirement_WP_CONTENT_DIR_Permissions', 'Site' );
329
-
330
- /**
331
- * Class Requirement_ABSPATH
332
- */
333
- class Requirement_ABSPATH extends Requirement {
334
-
335
- /**
336
- * @var string
337
- */
338
- protected $name = 'ABSPATH';
339
-
340
- /**
341
- * @return string
342
- */
343
- public static function test() {
344
- return ABSPATH;
345
- }
346
- }
347
- Requirements::register( 'HM\BackUpWordPress\Requirement_ABSPATH', 'Site' );
348
-
349
- /**
350
- * Class Requirement_Backup_Root_Path
351
- */
352
- class Requirement_Backup_Root_Path extends Requirement {
353
-
354
- /**
355
- * @var string
356
- */
357
- protected $name = 'Site Root Path';
358
-
359
- /**
360
- * @return string
361
- */
362
- public static function test() {
363
- return Path::get_root();
364
- }
365
- }
366
- Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Root_Path', 'Site' );
367
-
368
- /**
369
- * Class Requirement_Calculated_Size
370
- */
371
- class Requirement_Calculated_Size extends Requirement {
372
-
373
- /**
374
- * @var string
375
- */
376
- protected $name = 'Calculated size of site';
377
-
378
- /**
379
- * @return array
380
- */
381
- public static function test() {
382
-
383
- $backup_sizes = array();
384
-
385
- $schedules = Schedules::get_instance();
386
-
387
- foreach ( $schedules->get_schedules() as $schedule ) {
388
-
389
- $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
390
-
391
- if ( $site_size->is_site_size_cached() ) {
392
- $backup_sizes[ $schedule->get_type() ] = $site_size->get_formatted_site_size();
393
- }
394
- }
395
-
396
- return $backup_sizes;
397
-
398
- }
399
- }
400
- Requirements::register( 'HM\BackUpWordPress\Requirement_Calculated_Size', 'Site' );
401
-
402
- /**
403
- * Class Requirement_WP_Cron_Test_Response
404
- */
405
- class Requirement_WP_Cron_Test extends Requirement {
406
-
407
- /**
408
- * @var string
409
- */
410
- protected $name = 'WP Cron Test Failed';
411
-
412
- /**
413
- * @return boolean
414
- */
415
- public static function test() {
416
- return (bool) get_option( 'hmbkp_wp_cron_test_failed' );
417
- }
418
- }
419
- Requirements::register( 'HM\BackUpWordPress\Requirement_WP_Cron_Test', 'Site' );
420
-
421
- /**
422
- * Class Requirement_PHP_API
423
- */
424
- class Requirement_PHP_API extends Requirement {
425
-
426
- /**
427
- * @var string
428
- */
429
- protected $name = 'Interface';
430
-
431
- /**
432
- * @return string
433
- */
434
- public static function test() {
435
- return php_sapi_name();
436
- }
437
- }
438
- Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_API', 'PHP' );
439
-
440
- /**
441
- * Class Requirement_Server_Software
442
- */
443
- class Requirement_Server_Software extends Requirement {
444
-
445
- /**
446
- * @var string
447
- */
448
- protected $name = 'Server';
449
-
450
- /**
451
- * @return bool
452
- */
453
- public static function test() {
454
-
455
- if ( ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
456
- return $_SERVER['SERVER_SOFTWARE'];
457
- }
458
-
459
- return false;
460
-
461
- }
462
- }
463
- Requirements::register( 'HM\BackUpWordPress\Requirement_Server_Software', 'Server' );
464
-
465
- /**
466
- * Class Requirement_Server_OS
467
- */
468
- class Requirement_Server_OS extends Requirement {
469
-
470
- /**
471
- * @var string
472
- */
473
- protected $name = 'OS';
474
-
475
- /**
476
- * @return string
477
- */
478
- public static function test() {
479
- return PHP_OS;
480
- }
481
- }
482
- Requirements::register( 'HM\BackUpWordPress\Requirement_Server_OS', 'Server' );
483
-
484
- /**
485
- * Class Requirement_PHP_Disable_Functions
486
- */
487
- class Requirement_PHP_Disable_Functions extends Requirement {
488
-
489
- /**
490
- * @var string
491
- */
492
- protected $name = 'Disabled Functions';
493
-
494
- /**
495
- * @return string
496
- */
497
- public static function test() {
498
- return @ini_get( 'disable_functions' );
499
- }
500
- }
501
- Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Disable_Functions', 'PHP' );
502
-
503
- /**
504
- * Class Requirement_PHP_Open_Basedir
505
- */
506
- class Requirement_PHP_Open_Basedir extends Requirement {
507
-
508
- /**
509
- * @var string
510
- */
511
- protected $name = 'open_basedir';
512
-
513
- /**
514
- * @return string
515
- */
516
- public static function test() {
517
- return @ini_get( 'open_basedir' );
518
- }
519
- }
520
- Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Open_Basedir', 'PHP' );
521
-
522
- /* CONSTANTS */
523
-
524
- /**
525
- * Class Requirement_Define_HMBKP_PATH
526
- */
527
- class Requirement_Define_HMBKP_PATH extends Requirement {
528
-
529
- /**
530
- * @var string
531
- */
532
- protected $name = 'HMBKP_PATH';
533
-
534
- /**
535
- * @return string
536
- */
537
- public static function test() {
538
- return defined( 'HMBKP_PATH' ) ? HMBKP_PATH : '';
539
- }
540
- }
541
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_PATH', 'constants' );
542
-
543
- /**
544
- * Class Requirement_Define_HMBKP_ROOT
545
- */
546
- class Requirement_Define_HMBKP_ROOT extends Requirement {
547
-
548
- /**
549
- * @var string
550
- */
551
- protected $name = 'HMBKP_ROOT';
552
-
553
- /**
554
- * @return string
555
- */
556
- public static function test() {
557
- return defined( 'HMBKP_ROOT' ) ? HMBKP_ROOT : '';
558
- }
559
- }
560
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ROOT', 'constants' );
561
-
562
- /**
563
- * Class Requirement_Define_HMBKP_MYSQLDUMP_PATH
564
- */
565
- class Requirement_Define_HMBKP_MYSQLDUMP_PATH extends Requirement {
566
-
567
- /**
568
- * @var string
569
- */
570
- protected $name = 'HMBKP_MYSQLDUMP_PATH';
571
-
572
- /**
573
- * @return string
574
- */
575
- public static function test() {
576
- return defined( 'HMBKP_MYSQLDUMP_PATH' ) ? HMBKP_MYSQLDUMP_PATH : '';
577
- }
578
- }
579
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_MYSQLDUMP_PATH', 'constants' );
580
-
581
- /**
582
- * Class Requirement_Define_HMBKP_ZIP_PATH
583
- */
584
- class Requirement_Define_HMBKP_ZIP_PATH extends Requirement {
585
-
586
- /**
587
- * @var string
588
- */
589
- protected $name = 'HMBKP_ZIP_PATH';
590
-
591
- /**
592
- * @return string
593
- */
594
- public static function test() {
595
- return defined( 'HMBKP_ZIP_PATH' ) ? HMBKP_ZIP_PATH : '';
596
- }
597
- }
598
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ZIP_PATH', 'constants' );
599
-
600
- /**
601
- * Class Requirement_Define_HMBKP_CAPABILITY
602
- */
603
- class Requirement_Define_HMBKP_CAPABILITY extends Requirement {
604
-
605
- /**
606
- * @var string
607
- */
608
- protected $name = 'HMBKP_CAPABILITY';
609
-
610
- /**
611
- * @return string
612
- */
613
- public static function test() {
614
- return defined( 'HMBKP_CAPABILITY' ) ? HMBKP_CAPABILITY : '';
615
- }
616
- }
617
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_CAPABILITY', 'constants' );
618
-
619
- /**
620
- * Class Requirement_Define_HMBKP_EMAIL
621
- */
622
- class Requirement_Define_HMBKP_EMAIL extends Requirement {
623
-
624
- /**
625
- * @var string
626
- */
627
- protected $name = 'HMBKP_EMAIL';
628
-
629
- /**
630
- * @return string
631
- */
632
- public static function test() {
633
- return defined( 'HMBKP_EMAIL' ) ? HMBKP_EMAIL : '';
634
- }
635
- }
636
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_EMAIL', 'constants' );
637
-
638
- /**
639
- * Class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE
640
- */
641
- class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE extends Requirement {
642
-
643
- /**
644
- * @var string
645
- */
646
- protected $name = 'HMBKP_ATTACHMENT_MAX_FILESIZE';
647
-
648
- /**
649
- * @return string
650
- */
651
- public static function test() {
652
- return defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ? HMBKP_ATTACHMENT_MAX_FILESIZE : '';
653
- }
654
- }
655
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE', 'constants' );
656
-
657
- /**
658
- * Class Requirement_Define_HMBKP_EXCLUDE
659
- */
660
- class Requirement_Define_HMBKP_EXCLUDE extends Requirement {
661
-
662
- /**
663
- * @var string
664
- */
665
- protected $name = 'HMBKP_EXCLUDE';
666
-
667
- /**
668
- * @return string
669
- */
670
- public static function test() {
671
- return defined( 'HMBKP_EXCLUDE' ) ? HMBKP_EXCLUDE : '';
672
- }
673
- }
674
- Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_EXCLUDE', 'constants' );
675
-
676
- class Requirement_Active_Plugins extends Requirement {
677
-
678
- protected $name = 'Active Plugins';
679
-
680
- /**
681
- * Output the list of active plugins.
682
- *
683
- * @return array The array of active plugins.
684
- */
685
- public static function test() {
686
- return get_option( 'active_plugins' );
687
- }
688
- }
689
- Requirements::register( 'HM\BackUpWordPress\Requirement_Active_Plugins', 'Site' );
690
-
691
- class Requirement_Home_Url extends Requirement {
692
-
693
- protected $name = 'Home URL';
694
-
695
- /**
696
- * @return string
697
- */
698
- public static function test() {
699
- return home_url();
700
- }
701
- }
702
- Requirements::register( 'HM\BackUpWordPress\Requirement_Home_Url', 'Site' );
703
-
704
- class Requirement_Site_Url extends Requirement {
705
-
706
- protected $name = 'Site URL';
707
-
708
- /**
709
- * @return string
710
- */
711
- public static function test() {
712
- return site_url();
713
- }
714
- }
715
- Requirements::register( 'HM\BackUpWordPress\Requirement_Site_Url', 'Site' );
716
-
717
- class Requirement_Plugin_Version extends Requirement {
718
- protected $name = 'Plugin Version';
719
-
720
- /**
721
- * @return string
722
- */
723
- public static function test() {
724
- return Plugin::PLUGIN_VERSION;
725
- }
726
- }
727
- Requirements::register( 'HM\BackUpWordPress\Requirement_Plugin_Version', 'constants' );
728
-
729
- class Requirement_Max_Exec extends Requirement {
730
-
731
- protected $name = 'Max execution time';
732
-
733
- /**
734
- * @return string
735
- */
736
- public static function test() {
737
- return @ini_get( 'max_execution_time' );
738
- }
739
- }
740
- Requirements::register( 'HM\BackUpWordPress\Requirement_Max_Exec', 'PHP' );
741
-
742
- class Requirement_PDO extends Requirement {
743
-
744
- protected $name = 'PDO';
745
-
746
- /**
747
- * @return string|false
748
- */
749
- public static function test() {
750
-
751
- if ( class_exists( 'PDO' ) && \PDO::getAvailableDrivers() ) {
752
- return implode( ', ', \PDO::getAvailableDrivers() );
753
- }
754
-
755
- return false;
756
-
757
- }
758
- }
759
-
760
- Requirements::register( 'HM\BackUpWordPress\Requirement_PDO', 'PHP' );
761
-
762
- /**
763
- * Class Requirement_Proc_Open
764
- */
765
- class Requirement_Proc_Open extends Requirement {
766
-
767
- /**
768
- * @var string
769
- */
770
- protected $name = 'proc_open';
771
-
772
- /**
773
- * @return bool
774
- */
775
- public static function test() {
776
- return function_exists( 'proc_open' ) && function_exists( 'proc_close' );
777
- }
778
- }
779
- Requirements::register( 'HM\BackUpWordPress\Requirement_Proc_Open', 'PHP' );
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * An abstract requirement class, individual requirements should
7
+ * extend this class
8
+ */
9
+ abstract class Requirement {
10
+
11
+ /**
12
+ * The name of the requirement.
13
+ *
14
+ * @var string
15
+ */
16
+ protected $name = '';
17
+
18
+ /**
19
+ * @return mixed Did the requirement pass or fail.
20
+ */
21
+ protected static function test() {}
22
+
23
+ /**
24
+ * @return string
25
+ */
26
+ public function name() {
27
+ return $this->name;
28
+ }
29
+
30
+ /**
31
+ * @return string
32
+ */
33
+ public function result() {
34
+
35
+ $test = $this->test();
36
+
37
+ if ( is_string( $test ) && $test ) {
38
+ return $test;
39
+ }
40
+
41
+ if ( is_bool( $test ) || empty( $test ) ) {
42
+
43
+ if ( $test ) {
44
+ return 'Yes';
45
+ }
46
+
47
+ return 'No';
48
+
49
+ }
50
+
51
+ return var_export( $test, true );
52
+
53
+ }
54
+
55
+ public function raw_result() {
56
+ return $this->test();
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Class Requirement_Zip_Archive
62
+ */
63
+ class Requirement_Zip_Archive extends Requirement {
64
+
65
+ /**
66
+ * @var string
67
+ */
68
+ protected $name = 'ZipArchive';
69
+
70
+ /**
71
+ * @return bool
72
+ */
73
+ public static function test() {
74
+
75
+ if ( class_exists( 'ZipArchive' ) ) {
76
+ return true;
77
+ }
78
+
79
+ return false;
80
+
81
+ }
82
+ }
83
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Zip_Archive', 'PHP' );
84
+
85
+ /**
86
+ * Class Requirement_Zip_Command
87
+ *
88
+ * Tests whether the zip command is available and if it is what path it's available at
89
+ */
90
+ class Requirement_Zip_Command_Path extends Requirement {
91
+
92
+ /**
93
+ * @var string
94
+ */
95
+ protected $name = 'zip command';
96
+
97
+ /**
98
+ * @return string|false
99
+ */
100
+ public static function test() {
101
+
102
+ $backup = new Zip_File_Backup_Engine;
103
+
104
+ return $backup->get_zip_executable_path();
105
+
106
+ }
107
+ }
108
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Zip_Command_Path', 'Server' );
109
+
110
+ /**
111
+ * Class Requirement_Mysqldump_Command
112
+ *
113
+ * Tests whether the zip command is available and if it is what path it's available at
114
+ */
115
+ class Requirement_Mysqldump_Command_Path extends Requirement {
116
+
117
+ /**
118
+ * @var string
119
+ */
120
+ protected $name = 'mysqldump command';
121
+
122
+ /**
123
+ * @return string|false
124
+ */
125
+ public static function test() {
126
+
127
+ $backup = new Mysqldump_Database_Backup_Engine;
128
+
129
+ return $backup->get_mysqldump_executable_path();
130
+
131
+ }
132
+ }
133
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Mysqldump_Command_Path', 'Server' );
134
+
135
+ /**
136
+ * Class Requirement_PHP_Version
137
+ */
138
+ class Requirement_PHP_Version extends Requirement {
139
+
140
+ /**
141
+ * @var string
142
+ */
143
+ protected $name = 'Version';
144
+
145
+ /**
146
+ * @return string
147
+ */
148
+ public static function test() {
149
+ return PHP_VERSION;
150
+ }
151
+ }
152
+ Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Version', 'PHP' );
153
+
154
+ /**
155
+ * Class Requirement_Cron_Array
156
+ */
157
+ class Requirement_Cron_Array extends Requirement {
158
+
159
+ /**
160
+ * @var string
161
+ */
162
+ protected $name = 'Cron Array';
163
+
164
+ /**
165
+ * @return bool|mixed
166
+ */
167
+ public static function test() {
168
+
169
+ $cron = get_option( 'cron' );
170
+
171
+ if ( ! $cron ) {
172
+ return false;
173
+ }
174
+
175
+ return $cron;
176
+
177
+ }
178
+ }
179
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Cron_Array', 'Site' );
180
+
181
+ /**
182
+ * Class Requirement_Cron_Array
183
+ */
184
+ class Requirement_Language extends Requirement {
185
+
186
+ /**
187
+ * @var string
188
+ */
189
+ protected $name = 'Language';
190
+
191
+ /**
192
+ * @return bool|mixed
193
+ */
194
+ public static function test() {
195
+
196
+ // Since 4.0
197
+ $language = get_option( 'WPLANG' );
198
+
199
+ if ( $language ) {
200
+ return $language;
201
+ }
202
+
203
+ if ( defined( 'WPLANG' ) && WPLANG ) {
204
+ return WPLANG;
205
+ }
206
+
207
+ return 'en_US';
208
+
209
+ }
210
+ }
211
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Language', 'Site' );
212
+
213
+ /**
214
+ * Class Requirement_Safe_Mode
215
+ */
216
+ class Requirement_Safe_Mode extends Requirement {
217
+
218
+ /**
219
+ * @var string
220
+ */
221
+ protected $name = 'Safe Mode';
222
+
223
+ /**
224
+ * @return bool
225
+ */
226
+ public static function test() {
227
+ return Backup_Utilities::is_safe_mode_on();
228
+ }
229
+ }
230
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Safe_Mode', 'PHP' );
231
+
232
+ /**
233
+ * Class Requirement_Memory_Limit
234
+ */
235
+ class Requirement_PHP_Memory_Limit extends Requirement {
236
+
237
+ /**
238
+ * @var string
239
+ */
240
+ protected $name = 'Memory Limit';
241
+
242
+ /**
243
+ * @return string
244
+ */
245
+ public static function test() {
246
+ return @ini_get( 'memory_limit' );
247
+ }
248
+ }
249
+ Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Memory_Limit', 'PHP' );
250
+
251
+ /**
252
+ * Class Requirement_Backup_Path
253
+ */
254
+ class Requirement_Backup_Path extends Requirement {
255
+
256
+ /**
257
+ * @var string
258
+ */
259
+ protected $name = 'Backup Path';
260
+
261
+ /**
262
+ * @return string
263
+ */
264
+ public static function test() {
265
+ return Path::get_path();
266
+ }
267
+ }
268
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Path', 'Site' );
269
+
270
+ /**
271
+ * Class Requirement_Backup_Path_Permissions
272
+ */
273
+ class Requirement_Backup_Path_Permissions extends Requirement {
274
+
275
+ /**
276
+ * @var string
277
+ */
278
+ protected $name = 'Backup Path Permissions';
279
+
280
+ /**
281
+ * @return string
282
+ */
283
+ public static function test() {
284
+ if ( is_readable( PATH::get_path() ) ) {
285
+ return substr( sprintf( '%o', fileperms( Path::get_path() ) ), - 4 );
286
+ }
287
+ return 'Unreadable';
288
+ }
289
+ }
290
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Path_Permissions', 'Site' );
291
+
292
+ /**
293
+ * Class Requirement_WP_CONTENT_DIR
294
+ */
295
+ class Requirement_WP_CONTENT_DIR extends Requirement {
296
+
297
+ /**
298
+ * @var string
299
+ */
300
+ protected $name = 'WP_CONTENT_DIR';
301
+
302
+ /**
303
+ * @return string
304
+ */
305
+ public static function test() {
306
+ return WP_CONTENT_DIR;
307
+ }
308
+ }
309
+ Requirements::register( 'HM\BackUpWordPress\Requirement_WP_CONTENT_DIR', 'Site' );
310
+
311
+ /**
312
+ * Class Requirement_WP_CONTENT_DIR_Permissions
313
+ */
314
+ class Requirement_WP_CONTENT_DIR_Permissions extends Requirement {
315
+
316
+ /**
317
+ * @var string
318
+ */
319
+ protected $name = 'WP_CONTENT_DIR Permissions';
320
+
321
+ /**
322
+ * @return string
323
+ */
324
+ public static function test() {
325
+ return substr( sprintf( '%o', fileperms( WP_CONTENT_DIR ) ), - 4 );
326
+ }
327
+ }
328
+ Requirements::register( 'HM\BackUpWordPress\Requirement_WP_CONTENT_DIR_Permissions', 'Site' );
329
+
330
+ /**
331
+ * Class Requirement_ABSPATH
332
+ */
333
+ class Requirement_ABSPATH extends Requirement {
334
+
335
+ /**
336
+ * @var string
337
+ */
338
+ protected $name = 'ABSPATH';
339
+
340
+ /**
341
+ * @return string
342
+ */
343
+ public static function test() {
344
+ return ABSPATH;
345
+ }
346
+ }
347
+ Requirements::register( 'HM\BackUpWordPress\Requirement_ABSPATH', 'Site' );
348
+
349
+ /**
350
+ * Class Requirement_Backup_Root_Path
351
+ */
352
+ class Requirement_Backup_Root_Path extends Requirement {
353
+
354
+ /**
355
+ * @var string
356
+ */
357
+ protected $name = 'Site Root Path';
358
+
359
+ /**
360
+ * @return string
361
+ */
362
+ public static function test() {
363
+ return Path::get_root();
364
+ }
365
+ }
366
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Root_Path', 'Site' );
367
+
368
+ /**
369
+ * Class Requirement_Calculated_Size
370
+ */
371
+ class Requirement_Calculated_Size extends Requirement {
372
+
373
+ /**
374
+ * @var string
375
+ */
376
+ protected $name = 'Calculated size of site';
377
+
378
+ /**
379
+ * @return array
380
+ */
381
+ public static function test() {
382
+
383
+ $backup_sizes = array();
384
+
385
+ $schedules = Schedules::get_instance();
386
+
387
+ foreach ( $schedules->get_schedules() as $schedule ) {
388
+
389
+ $site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
390
+
391
+ if ( $site_size->is_site_size_cached() ) {
392
+ $backup_sizes[ $schedule->get_type() ] = $site_size->get_formatted_site_size();
393
+ }
394
+ }
395
+
396
+ return $backup_sizes;
397
+
398
+ }
399
+ }
400
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Calculated_Size', 'Site' );
401
+
402
+ /**
403
+ * Class Requirement_WP_Cron_Test_Response
404
+ */
405
+ class Requirement_WP_Cron_Test extends Requirement {
406
+
407
+ /**
408
+ * @var string
409
+ */
410
+ protected $name = 'WP Cron Test Failed';
411
+
412
+ /**
413
+ * @return boolean
414
+ */
415
+ public static function test() {
416
+ return (bool) get_option( 'hmbkp_wp_cron_test_failed' );
417
+ }
418
+ }
419
+ Requirements::register( 'HM\BackUpWordPress\Requirement_WP_Cron_Test', 'Site' );
420
+
421
+ /**
422
+ * Class Requirement_PHP_API
423
+ */
424
+ class Requirement_PHP_API extends Requirement {
425
+
426
+ /**
427
+ * @var string
428
+ */
429
+ protected $name = 'Interface';
430
+
431
+ /**
432
+ * @return string
433
+ */
434
+ public static function test() {
435
+ return php_sapi_name();
436
+ }
437
+ }
438
+ Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_API', 'PHP' );
439
+
440
+ /**
441
+ * Class Requirement_Server_Software
442
+ */
443
+ class Requirement_Server_Software extends Requirement {
444
+
445
+ /**
446
+ * @var string
447
+ */
448
+ protected $name = 'Server';
449
+
450
+ /**
451
+ * @return bool
452
+ */
453
+ public static function test() {
454
+
455
+ if ( ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
456
+ return $_SERVER['SERVER_SOFTWARE'];
457
+ }
458
+
459
+ return false;
460
+
461
+ }
462
+ }
463
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Server_Software', 'Server' );
464
+
465
+ /**
466
+ * Class Requirement_Server_OS
467
+ */
468
+ class Requirement_Server_OS extends Requirement {
469
+
470
+ /**
471
+ * @var string
472
+ */
473
+ protected $name = 'OS';
474
+
475
+ /**
476
+ * @return string
477
+ */
478
+ public static function test() {
479
+ return PHP_OS;
480
+ }
481
+ }
482
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Server_OS', 'Server' );
483
+
484
+ /**
485
+ * Class Requirement_PHP_Disable_Functions
486
+ */
487
+ class Requirement_PHP_Disable_Functions extends Requirement {
488
+
489
+ /**
490
+ * @var string
491
+ */
492
+ protected $name = 'Disabled Functions';
493
+
494
+ /**
495
+ * @return string
496
+ */
497
+ public static function test() {
498
+ return @ini_get( 'disable_functions' );
499
+ }
500
+ }
501
+ Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Disable_Functions', 'PHP' );
502
+
503
+ /**
504
+ * Class Requirement_PHP_Open_Basedir
505
+ */
506
+ class Requirement_PHP_Open_Basedir extends Requirement {
507
+
508
+ /**
509
+ * @var string
510
+ */
511
+ protected $name = 'open_basedir';
512
+
513
+ /**
514
+ * @return string
515
+ */
516
+ public static function test() {
517
+ return @ini_get( 'open_basedir' );
518
+ }
519
+ }
520
+ Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Open_Basedir', 'PHP' );
521
+
522
+ /* CONSTANTS */
523
+
524
+ /**
525
+ * Class Requirement_Define_HMBKP_PATH
526
+ */
527
+ class Requirement_Define_HMBKP_PATH extends Requirement {
528
+
529
+ /**
530
+ * @var string
531
+ */
532
+ protected $name = 'HMBKP_PATH';
533
+
534
+ /**
535
+ * @return string
536
+ */
537
+ public static function test() {
538
+ return defined( 'HMBKP_PATH' ) ? HMBKP_PATH : '';
539
+ }
540
+ }
541
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_PATH', 'constants' );
542
+
543
+ /**
544
+ * Class Requirement_Define_HMBKP_ROOT
545
+ */
546
+ class Requirement_Define_HMBKP_ROOT extends Requirement {
547
+
548
+ /**
549
+ * @var string
550
+ */
551
+ protected $name = 'HMBKP_ROOT';
552
+
553
+ /**
554
+ * @return string
555
+ */
556
+ public static function test() {
557
+ return defined( 'HMBKP_ROOT' ) ? HMBKP_ROOT : '';
558
+ }
559
+ }
560
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ROOT', 'constants' );
561
+
562
+ /**
563
+ * Class Requirement_Define_HMBKP_MYSQLDUMP_PATH
564
+ */
565
+ class Requirement_Define_HMBKP_MYSQLDUMP_PATH extends Requirement {
566
+
567
+ /**
568
+ * @var string
569
+ */
570
+ protected $name = 'HMBKP_MYSQLDUMP_PATH';
571
+
572
+ /**
573
+ * @return string
574
+ */
575
+ public static function test() {
576
+ return defined( 'HMBKP_MYSQLDUMP_PATH' ) ? HMBKP_MYSQLDUMP_PATH : '';
577
+ }
578
+ }
579
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_MYSQLDUMP_PATH', 'constants' );
580
+
581
+ /**
582
+ * Class Requirement_Define_HMBKP_ZIP_PATH
583
+ */
584
+ class Requirement_Define_HMBKP_ZIP_PATH extends Requirement {
585
+
586
+ /**
587
+ * @var string
588
+ */
589
+ protected $name = 'HMBKP_ZIP_PATH';
590
+
591
+ /**
592
+ * @return string
593
+ */
594
+ public static function test() {
595
+ return defined( 'HMBKP_ZIP_PATH' ) ? HMBKP_ZIP_PATH : '';
596
+ }
597
+ }
598
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ZIP_PATH', 'constants' );
599
+
600
+ /**
601
+ * Class Requirement_Define_HMBKP_CAPABILITY
602
+ */
603
+ class Requirement_Define_HMBKP_CAPABILITY extends Requirement {
604
+
605
+ /**
606
+ * @var string
607
+ */
608
+ protected $name = 'HMBKP_CAPABILITY';
609
+
610
+ /**
611
+ * @return string
612
+ */
613
+ public static function test() {
614
+ return defined( 'HMBKP_CAPABILITY' ) ? HMBKP_CAPABILITY : '';
615
+ }
616
+ }
617
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_CAPABILITY', 'constants' );
618
+
619
+ /**
620
+ * Class Requirement_Define_HMBKP_EMAIL
621
+ */
622
+ class Requirement_Define_HMBKP_EMAIL extends Requirement {
623
+
624
+ /**
625
+ * @var string
626
+ */
627
+ protected $name = 'HMBKP_EMAIL';
628
+
629
+ /**
630
+ * @return string
631
+ */
632
+ public static function test() {
633
+ return defined( 'HMBKP_EMAIL' ) ? HMBKP_EMAIL : '';
634
+ }
635
+ }
636
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_EMAIL', 'constants' );
637
+
638
+ /**
639
+ * Class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE
640
+ */
641
+ class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE extends Requirement {
642
+
643
+ /**
644
+ * @var string
645
+ */
646
+ protected $name = 'HMBKP_ATTACHMENT_MAX_FILESIZE';
647
+
648
+ /**
649
+ * @return string
650
+ */
651
+ public static function test() {
652
+ return defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ? HMBKP_ATTACHMENT_MAX_FILESIZE : '';
653
+ }
654
+ }
655
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE', 'constants' );
656
+
657
+ /**
658
+ * Class Requirement_Define_HMBKP_EXCLUDE
659
+ */
660
+ class Requirement_Define_HMBKP_EXCLUDE extends Requirement {
661
+
662
+ /**
663
+ * @var string
664
+ */
665
+ protected $name = 'HMBKP_EXCLUDE';
666
+
667
+ /**
668
+ * @return string
669
+ */
670
+ public static function test() {
671
+ return defined( 'HMBKP_EXCLUDE' ) ? HMBKP_EXCLUDE : '';
672
+ }
673
+ }
674
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_EXCLUDE', 'constants' );
675
+
676
+ class Requirement_Active_Plugins extends Requirement {
677
+
678
+ protected $name = 'Active Plugins';
679
+
680
+ /**
681
+ * Output the list of active plugins.
682
+ *
683
+ * @return array The array of active plugins.
684
+ */
685
+ public static function test() {
686
+ return get_option( 'active_plugins' );
687
+ }
688
+ }
689
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Active_Plugins', 'Site' );
690
+
691
+ class Requirement_Home_Url extends Requirement {
692
+
693
+ protected $name = 'Home URL';
694
+
695
+ /**
696
+ * @return string
697
+ */
698
+ public static function test() {
699
+ return home_url();
700
+ }
701
+ }
702
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Home_Url', 'Site' );
703
+
704
+ class Requirement_Site_Url extends Requirement {
705
+
706
+ protected $name = 'Site URL';
707
+
708
+ /**
709
+ * @return string
710
+ */
711
+ public static function test() {
712
+ return site_url();
713
+ }
714
+ }
715
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Site_Url', 'Site' );
716
+
717
+ class Requirement_Plugin_Version extends Requirement {
718
+ protected $name = 'Plugin Version';
719
+
720
+ /**
721
+ * @return string
722
+ */
723
+ public static function test() {
724
+ return Plugin::PLUGIN_VERSION;
725
+ }
726
+ }
727
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Plugin_Version', 'constants' );
728
+
729
+ class Requirement_Max_Exec extends Requirement {
730
+
731
+ protected $name = 'Max execution time';
732
+
733
+ /**
734
+ * @return string
735
+ */
736
+ public static function test() {
737
+ return @ini_get( 'max_execution_time' );
738
+ }
739
+ }
740
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Max_Exec', 'PHP' );
741
+
742
+ class Requirement_PDO extends Requirement {
743
+
744
+ protected $name = 'PDO';
745
+
746
+ /**
747
+ * @return string|false
748
+ */
749
+ public static function test() {
750
+
751
+ if ( class_exists( 'PDO' ) && \PDO::getAvailableDrivers() ) {
752
+ return implode( ', ', \PDO::getAvailableDrivers() );
753
+ }
754
+
755
+ return false;
756
+
757
+ }
758
+ }
759
+
760
+ Requirements::register( 'HM\BackUpWordPress\Requirement_PDO', 'PHP' );
761
+
762
+ /**
763
+ * Class Requirement_Proc_Open
764
+ */
765
+ class Requirement_Proc_Open extends Requirement {
766
+
767
+ /**
768
+ * @var string
769
+ */
770
+ protected $name = 'proc_open';
771
+
772
+ /**
773
+ * @return bool
774
+ */
775
+ public static function test() {
776
+ return function_exists( 'proc_open' ) && function_exists( 'proc_close' );
777
+ }
778
+ }
779
+ Requirements::register( 'HM\BackUpWordPress\Requirement_Proc_Open', 'PHP' );
classes/class-requirements.php CHANGED
@@ -1,65 +1,65 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * A singleton to handle the registering, unregistering
7
- * and storage of individual requirements
8
- */
9
- class Requirements {
10
-
11
- /**
12
- * The array of requirements
13
- *
14
- * Should be of the format array( (string) group => __CLASS__ );
15
- * @var array
16
- */
17
- private static $requirements = array();
18
-
19
-
20
- /**
21
- * Get the array of registered requirements
22
- *
23
- * @param string $group
24
- * @return array
25
- */
26
- public static function get_requirements( $group = '' ) {
27
-
28
- $requirements = $group ? self::$requirements[ $group ] : self::$requirements;
29
-
30
- ksort( $requirements );
31
-
32
- return array_map( array( 'self', 'instantiate' ), $requirements );
33
-
34
- }
35
-
36
- /**
37
- * Get the requirement groups
38
- *
39
- * @return string[]
40
- */
41
- public static function get_requirement_groups() {
42
- return array_keys( self::$requirements );
43
- }
44
-
45
- /**
46
- * Register a new requirement
47
- *
48
- * @param $class
49
- * @param string $group
50
- */
51
- public static function register( $class, $group = 'misc' ) {
52
- self::$requirements[ $group ][] = $class;
53
- }
54
-
55
- /**
56
- * Instantiate the individual requirement classes
57
- *
58
- * @param string $class
59
- * @return array An array of instantiated classes
60
- */
61
- private static function instantiate( $class ) {
62
- $$class = new $class;
63
- return $$class;
64
- }
65
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * A singleton to handle the registering, unregistering
7
+ * and storage of individual requirements
8
+ */
9
+ class Requirements {
10
+
11
+ /**
12
+ * The array of requirements
13
+ *
14
+ * Should be of the format array( (string) group => __CLASS__ );
15
+ * @var array
16
+ */
17
+ private static $requirements = array();
18
+
19
+
20
+ /**
21
+ * Get the array of registered requirements
22
+ *
23
+ * @param string $group
24
+ * @return array
25
+ */
26
+ public static function get_requirements( $group = '' ) {
27
+
28
+ $requirements = $group ? self::$requirements[ $group ] : self::$requirements;
29
+
30
+ ksort( $requirements );
31
+
32
+ return array_map( array( 'self', 'instantiate' ), $requirements );
33
+
34
+ }
35
+
36
+ /**
37
+ * Get the requirement groups
38
+ *
39
+ * @return string[]
40
+ */
41
+ public static function get_requirement_groups() {
42
+ return array_keys( self::$requirements );
43
+ }
44
+
45
+ /**
46
+ * Register a new requirement
47
+ *
48
+ * @param $class
49
+ * @param string $group
50
+ */
51
+ public static function register( $class, $group = 'misc' ) {
52
+ self::$requirements[ $group ][] = $class;
53
+ }
54
+
55
+ /**
56
+ * Instantiate the individual requirement classes
57
+ *
58
+ * @param string $class
59
+ * @return array An array of instantiated classes
60
+ */
61
+ private static function instantiate( $class ) {
62
+ $$class = new $class;
63
+ return $$class;
64
+ }
65
+ }
classes/class-scheduled-backup.php CHANGED
@@ -1,683 +1,683 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * The Backup Scheduler
7
- *
8
- * Handles everything related to managing and running a backup schedule
9
- *
10
- * @uses Backup
11
- * @uses
12
- */
13
- class Scheduled_Backup {
14
-
15
- /**
16
- * The unique schedule id
17
- *
18
- * @var string
19
- * @access private
20
- */
21
- private $id = '';
22
-
23
- /**
24
- * The slugified version of the schedule name
25
- *
26
- * @var string
27
- * @access private
28
- */
29
- private $slug = '';
30
-
31
- /**
32
- * The raw schedule options from the database
33
- *
34
- * @var array
35
- * @access private
36
- */
37
- private $options = array(
38
- 'max_backups' => 3,
39
- 'excludes' => array(),
40
- 'type' => 'complete',
41
- 'reoccurrence' => 'manually',
42
- );
43
-
44
- /**
45
- * Setup the schedule object
46
- * Loads the options from the database and populates properties
47
- *
48
- * @param string $id
49
- *
50
- * @throws Exception
51
- */
52
-
53
- public function __construct( $id ) {
54
-
55
- // Verify the schedule id
56
- if ( ! is_string( $id ) || ! trim( $id ) ) {
57
- throw new \Exception( 'Argument 1 for ' . __METHOD__ . ' must be a non-empty string' );
58
- }
59
-
60
- // Store id for later
61
- $this->id = $id;
62
-
63
- // Load the options
64
- $this->options = array_merge( $this->options, array_filter( (array) get_option( 'hmbkp_schedule_' . $this->get_id() ) ) );
65
-
66
- if ( defined( 'HMBKP_SCHEDULE_START_TIME' ) && strtotime( 'HMBKP_SCHEDULE_START_TIME' ) ) {
67
- $this->set_schedule_start_time( strtotime( 'HMBKP_SCHEDULE_START_TIME' ) );
68
- }
69
-
70
- // Setup the schedule if it isn't set
71
- if ( ( ! $this->is_cron_scheduled() && $this->get_reoccurrence() !== 'manually' ) ) {
72
- $this->schedule();
73
- }
74
-
75
- $this->backup_filename = implode( '-', array(
76
- sanitize_title( str_ireplace( array(
77
- 'http://',
78
- 'https://',
79
- 'www',
80
- ), '', home_url() ) ),
81
- $this->get_id(),
82
- $this->get_type(),
83
- current_time( 'Y-m-d-H-i-s' ),
84
- ) ) . '.zip';
85
-
86
- $this->database_dump_filename = implode( '-', array(
87
- 'database',
88
- sanitize_title( str_ireplace( array( 'http://', 'https://', 'www' ), '', home_url() ) ),
89
- $this->get_id(),
90
- ) ) . '.sql';
91
-
92
- $this->status = new Backup_Status( $this->get_id() );
93
-
94
- }
95
-
96
- /**
97
- * Get the id for this schedule
98
- */
99
- public function get_id() {
100
- return esc_attr( $this->id );
101
- }
102
-
103
- /**
104
- * Get a slugified version of name
105
- */
106
- public function get_slug() {
107
-
108
- // We cache slug in $this to save expensive calls to sanitize_title
109
- if ( ! empty( $this->slug ) ) {
110
- return $this->slug;
111
- }
112
-
113
- return $this->slug = sanitize_title( $this->get_name() );
114
-
115
- }
116
-
117
- /**
118
- * Returns the given option value
119
- *
120
- * @param $option_name
121
- * @return mixed The option value
122
- */
123
- public function get_schedule_option( $option_name ) {
124
- if ( isset( $this->options[ $option_name ] ) ) {
125
- return $this->options[ $option_name ];
126
- }
127
- }
128
-
129
- /**
130
- * Get the name of this backup schedule
131
- *
132
- * @return string
133
- */
134
- public function get_name() {
135
- return ucwords( $this->get_type() ) . ' ' . $this->get_reoccurrence();
136
- }
137
-
138
- /**
139
- * Get the type of backup
140
- *
141
- * @return string
142
- */
143
- public function get_type() {
144
- return $this->options['type'];
145
- }
146
-
147
- /**
148
- * Set the type of backup
149
- *
150
- * @param string $type
151
- */
152
- public function set_type( $type ) {
153
- if ( ! isset( $this->options['type'] ) || $this->options['type'] !== $type ) {
154
- $this->options['type'] = $type;
155
- }
156
- }
157
-
158
- /**
159
- * Get the exclude rules
160
- *
161
- * @return array
162
- */
163
- public function get_excludes() {
164
- return new Excludes( $this->options['excludes'] );
165
- }
166
-
167
- /**
168
- * Set the exclude rules
169
- *
170
- * @param mixed $excludes A comma separated list or array of exclude rules
171
- * @param bool $append Whether to replace or append to existing rules
172
- *
173
- * @return string
174
- */
175
- public function set_excludes( $exclude_rules, $append = false ) {
176
-
177
- // Normalize the exclude rules before we save them
178
- $excludes = new Excludes;
179
- $excludes = $excludes->normalize( (array) $exclude_rules );
180
-
181
- // If these are valid excludes and they are different save them
182
- if ( empty( $this->options['excludes'] ) || $this->options['excludes'] !== $excludes ) {
183
- $this->options['excludes'] = $append && ! empty( $this->options['excludes'] ) ? array_merge( (array) $this->options['excludes'], (array) $excludes ) : (array) $excludes;
184
- }
185
-
186
- }
187
-
188
- /**
189
- * Get the maximum number of backups to keep
190
- *
191
- * @return int
192
- */
193
- public function get_max_backups() {
194
- return (int) $this->options['max_backups'];
195
- }
196
-
197
- /**
198
- * Set the maximum number of backups to keep
199
- *
200
- * @param int $max
201
- *
202
- * @return WP_Error|boolean
203
- */
204
- public function set_max_backups( $max ) {
205
- $this->options['max_backups'] = $max;
206
- }
207
-
208
- public function get_status() {
209
- return $this->status;
210
- }
211
-
212
- /**
213
- * Back compat with old set_status mathod
214
- *
215
- * @deprecated 3.4 Backup->status->set_status()
216
- */
217
- public function set_status( $message ) {
218
- _deprecated_function( __FUNCTION__, '3.4', 'Backup->status->set_status()' );
219
- $this->status->set_status( $message );
220
- }
221
-
222
- /**
223
- * Get the array of services options for this schedule
224
- *
225
- * @param $service
226
- * @param null $option
227
- *
228
- * @return array
229
- */
230
- public function get_service_options( $service, $option = null ) {
231
-
232
- if ( ! is_null( $option ) ) {
233
-
234
- if ( isset( $this->options[ $service ][ $option ] ) ) {
235
- return $this->options[ $service ][ $option ];
236
- }
237
-
238
- return array();
239
-
240
- }
241
-
242
- if ( isset( $this->options[ $service ] ) ) {
243
- return $this->options[ $service ];
244
- }
245
-
246
- return array();
247
-
248
- }
249
-
250
- /**
251
- * Set the service options for this schedule
252
- *
253
- * @param $service
254
- * @param array $options
255
- */
256
- public function set_service_options( $service, array $options ) {
257
- $this->options[ $service ] = $options;
258
- }
259
-
260
- /**
261
- * Get the start time for the schedule
262
- *
263
- * @return int timestamp || 0 for manual only schedules
264
- */
265
- public function get_schedule_start_time( $gmt = true ) {
266
-
267
- if ( 'manually' === $this->get_reoccurrence() ) {
268
- return 0;
269
- }
270
-
271
- if ( ! $gmt ) {
272
- $offset = get_option( 'gmt_offset' ) * 3600;
273
- } else {
274
- $offset = 0;
275
- }
276
-
277
- if ( ! empty( $this->options['schedule_start_time'] ) ) {
278
- return $this->options['schedule_start_time'] + $offset;
279
- }
280
-
281
- $this->set_schedule_start_time( time() );
282
-
283
- return time() + $offset;
284
-
285
- }
286
-
287
- /**
288
- * Set the schedule start time.
289
- *
290
- * @param Int $time A valid timestamp
291
- */
292
- public function set_schedule_start_time( $time ) {
293
-
294
- $this->options['schedule_start_time'] = $time;
295
-
296
- $this->schedule();
297
-
298
- }
299
-
300
- /**
301
- * Get the schedule reoccurrence
302
- *
303
- */
304
- public function get_reoccurrence() {
305
- return $this->options['reoccurrence'];
306
- }
307
-
308
- /**
309
- * Set the schedule reoccurrence
310
- *
311
- * @param string $reoccurrence
312
- *
313
- * @return \WP_Error|null|boolean
314
- */
315
- public function set_reoccurrence( $reoccurrence ) {
316
-
317
- $hmbkp_schedules = cron_schedules();
318
-
319
- // Check it's valid
320
- if ( ! is_string( $reoccurrence ) || ! trim( $reoccurrence ) || ( ! in_array( $reoccurrence, array_keys( $hmbkp_schedules ) ) ) && 'manually' !== $reoccurrence ) {
321
- return new \WP_Error( 'hmbkp_invalid_argument_error', sprintf( __( 'Argument 1 for %s must be a valid cron recurrence or "manually"', 'backupwordpress' ), __METHOD__ ) );
322
- }
323
-
324
- // If the recurrence is already set to the same thing then there's no need to continue
325
- if ( isset( $this->options['reoccurrence'] ) && $this->options['reoccurrence'] === $reoccurrence && $this->is_cron_scheduled() ) {
326
- return;
327
- }
328
-
329
- $this->options['reoccurrence'] = $reoccurrence;
330
-
331
- if ( 'manually' === $reoccurrence ) {
332
- $this->unschedule();
333
-
334
- } else {
335
- $this->schedule();
336
- }
337
-
338
- return true;
339
-
340
- }
341
-
342
- /**
343
- * Get the interval between backups
344
- *
345
- * @return int
346
- */
347
- public function get_interval() {
348
-
349
- $hmbkp_schedules = cron_schedules();
350
-
351
- if ( 'manually' === $this->get_reoccurrence() ) {
352
- return 0;
353
- }
354
-
355
- return $hmbkp_schedules[ $this->get_reoccurrence() ]['interval'];
356
-
357
- }
358
-
359
- /**
360
- * Get the next occurrence of this scheduled backup
361
- *
362
- */
363
- public function get_next_occurrence( $gmt = true ) {
364
-
365
- $time = wp_next_scheduled( 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
366
-
367
- if ( ! $time ) {
368
- $time = 0;
369
- }
370
-
371
- if ( ! $gmt ) {
372
- $time += get_option( 'gmt_offset' ) * 3600;
373
- }
374
-
375
- return $time;
376
-
377
- }
378
-
379
- public function is_cron_scheduled() {
380
- return (bool) $this->get_next_occurrence();
381
- }
382
-
383
- /**
384
- * Schedule the backup cron
385
- *
386
- */
387
- public function schedule() {
388
-
389
- // Clear any existing hooks
390
- $this->unschedule();
391
-
392
- $schedule_timestamp = $this->get_schedule_start_time();
393
-
394
- wp_schedule_event( $schedule_timestamp, $this->get_reoccurrence(), 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
395
-
396
- }
397
-
398
-
399
- /**
400
- * Unschedule the backup cron.
401
- *
402
- * @return void
403
- */
404
- public function unschedule() {
405
- wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
406
- }
407
-
408
- /**
409
- * Run the backup
410
- *
411
- */
412
- public function run() {
413
-
414
- // Don't run if this schedule is already running
415
- if ( $this->status->is_started() ) {
416
- return;
417
- }
418
-
419
- // Setup our Site Backup Object
420
- $backup = new Backup( $this->get_backup_filename(), $this->get_database_dump_filename() );
421
- $backup->set_type( $this->get_type() );
422
- $backup->set_excludes( $this->get_excludes() );
423
- $backup->set_status( $this->status );
424
-
425
- $this->do_action( 'hmbkp_backup_started', $backup );
426
-
427
- $this->status->start( $this->get_backup_filename(), __( 'Starting backup...', 'backupwordpress' ) );
428
-
429
- $this->status->set_status( __( 'Deleting old backups...', 'backupwordpress' ) );
430
-
431
- // Delete old backups now in-case we fatal error during the backup process
432
- $this->delete_old_backups();
433
-
434
- $backup->run();
435
-
436
- $errors = array_merge( $backup->errors, $backup->warnings );
437
- $notices = array();
438
- foreach ( $errors as $key => $error ) {
439
- $key = str_replace( array( __NAMESPACE__ . '\\', '_File_Backup_Engine', '_Database_Backup_Engine' ), array( '', '', '' ), $key );
440
- $notices[] = $key . ': ' . implode( ', ', $error );
441
- }
442
- Notices::get_instance()->set_notices( 'backup_errors', $notices );
443
-
444
- $this->status->set_status( __( 'Deleting old backups...', 'backupwordpress' ) );
445
-
446
- // Delete old backups again
447
- $this->delete_old_backups();
448
-
449
- $this->do_action( 'hmbkp_backup_complete', $backup );
450
-
451
- $this->status->finish();
452
- $this->update_average_schedule_run_time( $this->status->get_start_time(), time() );
453
-
454
- }
455
-
456
- public function get_backup_filename() {
457
-
458
- if ( $this->status->is_started() ) {
459
- $this->backup_filename = $this->status->get_backup_filename();
460
- }
461
-
462
- return $this->backup_filename;
463
- }
464
-
465
- public function get_database_dump_filename() {
466
- return $this->database_dump_filename;
467
- }
468
-
469
- /**
470
- * Hook into the actions fired in the Backup class and set the status
471
- *
472
- * @param $action
473
- */
474
- public function do_action( $action, Backup $backup ) {
475
-
476
- // Pass the actions to all the services
477
- // Todo should be decoupled into the service class
478
- foreach ( Services::get_services( $this ) as $service ) {
479
- if ( is_wp_error( $service ) ) {
480
- return $service;
481
- }
482
- $service->action( $action, $backup );
483
- }
484
-
485
- }
486
-
487
- /**
488
- * Calculate schedule run time.
489
- *
490
- * @param int Timestamp $end
491
- */
492
- public function update_average_schedule_run_time( $start, $end ) {
493
-
494
- if ( $end <= $start ) {
495
- // Something went wrong, ignore.
496
- return;
497
- }
498
-
499
- $diff = (int) abs( $end - $start );
500
-
501
- if ( isset( $this->options['duration_total'] ) && isset( $this->options['backup_run_count'] ) ) {
502
-
503
- $this->options['duration_total'] += $diff;
504
- $this->options['backup_run_count'] ++;
505
-
506
- } else {
507
-
508
- $this->options['duration_total'] = $diff;
509
- $this->options['backup_run_count'] = 1;
510
-
511
- }
512
-
513
- $this->save();
514
- }
515
-
516
- /**
517
- * Calculates the average run time for this schedule.
518
- *
519
- * @return string
520
- */
521
- public function get_schedule_average_duration() {
522
-
523
- $duration = 'Unknown';
524
-
525
- if ( ! isset( $this->options['duration_total'] ) || ! isset( $this->options['backup_run_count'] ) ) {
526
- return $duration;
527
- }
528
-
529
- if ( 0 === (int) $this->options['backup_run_count'] ) {
530
- return $duration;
531
- }
532
-
533
- $average_run_time = (int) $this->options['duration_total'] / (int) $this->options['backup_run_count'];
534
-
535
- if ( $average_run_time < HOUR_IN_SECONDS ) {
536
-
537
- $mins = round( $average_run_time / MINUTE_IN_SECONDS );
538
-
539
- if ( $mins <= 1 ) {
540
- $mins = 1;
541
- }
542
-
543
- /* translators: min=minute */
544
- $duration = sprintf( _n( '%s min', '%s mins', $mins, 'backupwordpress' ), $mins );
545
-
546
- } elseif ( $average_run_time < DAY_IN_SECONDS && $average_run_time >= HOUR_IN_SECONDS ) {
547
-
548
- $hours = round( $average_run_time / HOUR_IN_SECONDS );
549
-
550
- if ( $hours <= 1 ) {
551
- $hours = 1;
552
- }
553
-
554
- $duration = sprintf( _n( '%s hour', '%s hours', $hours, 'backupwordpress' ), $hours );
555
- }
556
-
557
- return $duration;
558
- }
559
-
560
- /**
561
- * Get the backups created by this schedule
562
- *
563
- * @todo look into using recursiveDirectoryIterator and recursiveRegexIterator
564
- * @return string[] - file paths of the backups
565
- */
566
- public function get_backups() {
567
-
568
- $files = array();
569
-
570
- if ( $handle = @opendir( Path::get_path() ) ) {
571
-
572
- while ( false !== ( $file = readdir( $handle ) ) ) {
573
-
574
- if ( pathinfo( $file, PATHINFO_EXTENSION ) === 'zip' && strpos( $file, $this->get_id() ) !== false && ( isset( $this->status ) && $this->get_backup_filename() !== $file ) ) {
575
- $files[ @filemtime( trailingslashit( Path::get_path() ) . $file ) ] = trailingslashit( Path::get_path() ) . $file;
576
- }
577
- }
578
-
579
- closedir( $handle );
580
-
581
- }
582
-
583
- krsort( $files );
584
-
585
- return $files;
586
-
587
- }
588
-
589
- /**
590
- * Delete old backups
591
- *
592
- * @access private
593
- */
594
- public function delete_old_backups() {
595
-
596
- if ( count( $this->get_backups() ) <= $this->get_max_backups() ) {
597
- return;
598
- }
599
-
600
- array_map( array( $this, 'delete_backup' ), array_slice( $this->get_backups(), $this->get_max_backups() ) );
601
-
602
- }
603
-
604
- /**
605
- * Delete a specific back up file created by this schedule
606
- *
607
- * @param string $filepath
608
- *
609
- * @return \WP_Error|boolean
610
- */
611
- public function delete_backup( $filepath ) {
612
-
613
- // Check that it's a valid filepath
614
- if ( empty( $filepath ) || ! is_string( $filepath ) ) {
615
- return new \WP_Error( 'hmbkp_empty_string_error', sprintf( __( 'Argument 1 for %s must be a non-empty string', 'backupwordpress' ), __METHOD__ ) );
616
- }
617
-
618
- // Make sure it exists
619
- if ( ! file_exists( $filepath ) ) {
620
- return new \WP_Error( 'hmbkp_file_error', sprintf( __( '%s doesn\'t exist', 'backupwordpress' ), $filepath ) );
621
- }
622
-
623
- // Make sure it was created by this schedule
624
- if ( strpos( $filepath, $this->get_id() ) === false ) {
625
- return new \WP_Error( 'hmbkp_backup_error', __( 'That backup wasn\'t created by this schedule', 'backupwordpress' ) );
626
- }
627
-
628
- unlink( $filepath );
629
-
630
- return true;
631
-
632
- }
633
-
634
- /**
635
- * Delete all back up files created by this schedule
636
- *
637
- */
638
- public function delete_backups() {
639
- array_map( array( $this, 'delete_backup' ), $this->get_backups() );
640
- }
641
-
642
- /**
643
- * Save the schedules options.
644
- *
645
- */
646
- public function save() {
647
-
648
- // Only save them if they have changed
649
- if ( get_option( 'hmbkp_schedule_' . $this->get_id() ) !== $this->options ) {
650
- update_option( 'hmbkp_schedule_' . $this->get_id(), $this->options );
651
-
652
- // Delete the schedule cache.
653
- delete_transient( 'hmbkp_schedules' );
654
- }
655
-
656
- }
657
-
658
- /**
659
- * Cancel this schedule
660
- *
661
- * Cancels the cron job, removes the schedules options
662
- * and optionally deletes all backups created by
663
- * this schedule.
664
- *
665
- */
666
- public function cancel( $delete_backups = false ) {
667
-
668
- // Delete the schedule options
669
- delete_option( 'hmbkp_schedule_' . $this->get_id() );
670
-
671
- // Delete the schedule cache.
672
- delete_transient( 'hmbkp_schedules' );
673
-
674
- // Clear any existing schedules
675
- $this->unschedule();
676
-
677
- // Delete it's backups
678
- if ( $delete_backups ) {
679
- $this->delete_backups();
680
- }
681
-
682
- }
683
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * The Backup Scheduler
7
+ *
8
+ * Handles everything related to managing and running a backup schedule
9
+ *
10
+ * @uses Backup
11
+ * @uses
12
+ */
13
+ class Scheduled_Backup {
14
+
15
+ /**
16
+ * The unique schedule id
17
+ *
18
+ * @var string
19
+ * @access private
20
+ */
21
+ private $id = '';
22
+
23
+ /**
24
+ * The slugified version of the schedule name
25
+ *
26
+ * @var string
27
+ * @access private
28
+ */
29
+ private $slug = '';
30
+
31
+ /**
32
+ * The raw schedule options from the database
33
+ *
34
+ * @var array
35
+ * @access private
36
+ */
37
+ private $options = array(
38
+ 'max_backups' => 3,
39
+ 'excludes' => array(),
40
+ 'type' => 'complete',
41
+ 'reoccurrence' => 'manually',
42
+ );
43
+
44
+ /**
45
+ * Setup the schedule object
46
+ * Loads the options from the database and populates properties
47
+ *
48
+ * @param string $id
49
+ *
50
+ * @throws Exception
51
+ */
52
+
53
+ public function __construct( $id ) {
54
+
55
+ // Verify the schedule id
56
+ if ( ! is_string( $id ) || ! trim( $id ) ) {
57
+ throw new \Exception( 'Argument 1 for ' . __METHOD__ . ' must be a non-empty string' );
58
+ }
59
+
60
+ // Store id for later
61
+ $this->id = $id;
62
+
63
+ // Load the options
64
+ $this->options = array_merge( $this->options, array_filter( (array) get_option( 'hmbkp_schedule_' . $this->get_id() ) ) );
65
+
66
+ if ( defined( 'HMBKP_SCHEDULE_START_TIME' ) && strtotime( 'HMBKP_SCHEDULE_START_TIME' ) ) {
67
+ $this->set_schedule_start_time( strtotime( 'HMBKP_SCHEDULE_START_TIME' ) );
68
+ }
69
+
70
+ // Setup the schedule if it isn't set
71
+ if ( ( ! $this->is_cron_scheduled() && $this->get_reoccurrence() !== 'manually' ) ) {
72
+ $this->schedule();
73
+ }
74
+
75
+ $this->backup_filename = implode( '-', array(
76
+ sanitize_title( str_ireplace( array(
77
+ 'http://',
78
+ 'https://',
79
+ 'www',
80
+ ), '', home_url() ) ),
81
+ $this->get_id(),
82
+ $this->get_type(),
83
+ current_time( 'Y-m-d-H-i-s' ),
84
+ ) ) . '.zip';
85
+
86
+ $this->database_dump_filename = implode( '-', array(
87
+ 'database',
88
+ sanitize_title( str_ireplace( array( 'http://', 'https://', 'www' ), '', home_url() ) ),
89
+ $this->get_id(),
90
+ ) ) . '.sql';
91
+
92
+ $this->status = new Backup_Status( $this->get_id() );
93
+
94
+ }
95
+
96
+ /**
97
+ * Get the id for this schedule
98
+ */
99
+ public function get_id() {
100
+ return esc_attr( $this->id );
101
+ }
102
+
103
+ /**
104
+ * Get a slugified version of name
105
+ */
106
+ public function get_slug() {
107
+
108
+ // We cache slug in $this to save expensive calls to sanitize_title
109
+ if ( ! empty( $this->slug ) ) {
110
+ return $this->slug;
111
+ }
112
+
113
+ return $this->slug = sanitize_title( $this->get_name() );
114
+
115
+ }
116
+
117
+ /**
118
+ * Returns the given option value
119
+ *
120
+ * @param $option_name
121
+ * @return mixed The option value
122
+ */
123
+ public function get_schedule_option( $option_name ) {
124
+ if ( isset( $this->options[ $option_name ] ) ) {
125
+ return $this->options[ $option_name ];
126
+ }
127
+ }
128
+
129
+ /**
130
+ * Get the name of this backup schedule
131
+ *
132
+ * @return string
133
+ */
134
+ public function get_name() {
135
+ return ucwords( $this->get_type() ) . ' ' . $this->get_reoccurrence();
136
+ }
137
+
138
+ /**
139
+ * Get the type of backup
140
+ *
141
+ * @return string
142
+ */
143
+ public function get_type() {
144
+ return $this->options['type'];
145
+ }
146
+
147
+ /**
148
+ * Set the type of backup
149
+ *
150
+ * @param string $type
151
+ */
152
+ public function set_type( $type ) {
153
+ if ( ! isset( $this->options['type'] ) || $this->options['type'] !== $type ) {
154
+ $this->options['type'] = $type;
155
+ }
156
+ }
157
+
158
+ /**
159
+ * Get the exclude rules
160
+ *
161
+ * @return array
162
+ */
163
+ public function get_excludes() {
164
+ return new Excludes( $this->options['excludes'] );
165
+ }
166
+
167
+ /**
168
+ * Set the exclude rules
169
+ *
170
+ * @param mixed $excludes A comma separated list or array of exclude rules
171
+ * @param bool $append Whether to replace or append to existing rules
172
+ *
173
+ * @return string
174
+ */
175
+ public function set_excludes( $exclude_rules, $append = false ) {
176
+
177
+ // Normalize the exclude rules before we save them
178
+ $excludes = new Excludes;
179
+ $excludes = $excludes->normalize( (array) $exclude_rules );
180
+
181
+ // If these are valid excludes and they are different save them
182
+ if ( empty( $this->options['excludes'] ) || $this->options['excludes'] !== $excludes ) {
183
+ $this->options['excludes'] = $append && ! empty( $this->options['excludes'] ) ? array_merge( (array) $this->options['excludes'], (array) $excludes ) : (array) $excludes;
184
+ }
185
+
186
+ }
187
+
188
+ /**
189
+ * Get the maximum number of backups to keep
190
+ *
191
+ * @return int
192
+ */
193
+ public function get_max_backups() {
194
+ return (int) $this->options['max_backups'];
195
+ }
196
+
197
+ /**
198
+ * Set the maximum number of backups to keep
199
+ *
200
+ * @param int $max
201
+ *
202
+ * @return WP_Error|boolean
203
+ */
204
+ public function set_max_backups( $max ) {
205
+ $this->options['max_backups'] = $max;
206
+ }
207
+
208
+ public function get_status() {
209
+ return $this->status;
210
+ }
211
+
212
+ /**
213
+ * Back compat with old set_status mathod
214
+ *
215
+ * @deprecated 3.4 Backup->status->set_status()
216
+ */
217
+ public function set_status( $message ) {
218
+ _deprecated_function( __FUNCTION__, '3.4', 'Backup->status->set_status()' );
219
+ $this->status->set_status( $message );
220
+ }
221
+
222
+ /**
223
+ * Get the array of services options for this schedule
224
+ *
225
+ * @param $service
226
+ * @param null $option
227
+ *
228
+ * @return array
229
+ */
230
+ public function get_service_options( $service, $option = null ) {
231
+
232
+ if ( ! is_null( $option ) ) {
233
+
234
+ if ( isset( $this->options[ $service ][ $option ] ) ) {
235
+ return $this->options[ $service ][ $option ];
236
+ }
237
+
238
+ return array();
239
+
240
+ }
241
+
242
+ if ( isset( $this->options[ $service ] ) ) {
243
+ return $this->options[ $service ];
244
+ }
245
+
246
+ return array();
247
+
248
+ }
249
+
250
+ /**
251
+ * Set the service options for this schedule
252
+ *
253
+ * @param $service
254
+ * @param array $options
255
+ */
256
+ public function set_service_options( $service, array $options ) {
257
+ $this->options[ $service ] = $options;
258
+ }
259
+
260
+ /**
261
+ * Get the start time for the schedule
262
+ *
263
+ * @return int timestamp || 0 for manual only schedules
264
+ */
265
+ public function get_schedule_start_time( $gmt = true ) {
266
+
267
+ if ( 'manually' === $this->get_reoccurrence() ) {
268
+ return 0;
269
+ }
270
+
271
+ if ( ! $gmt ) {
272
+ $offset = get_option( 'gmt_offset' ) * 3600;
273
+ } else {
274
+ $offset = 0;
275
+ }
276
+
277
+ if ( ! empty( $this->options['schedule_start_time'] ) ) {
278
+ return $this->options['schedule_start_time'] + $offset;
279
+ }
280
+
281
+ $this->set_schedule_start_time( time() );
282
+
283
+ return time() + $offset;
284
+
285
+ }
286
+
287
+ /**
288
+ * Set the schedule start time.
289
+ *
290
+ * @param Int $time A valid timestamp
291
+ */
292
+ public function set_schedule_start_time( $time ) {
293
+
294
+ $this->options['schedule_start_time'] = $time;
295
+
296
+ $this->schedule();
297
+
298
+ }
299
+
300
+ /**
301
+ * Get the schedule reoccurrence
302
+ *
303
+ */
304
+ public function get_reoccurrence() {
305
+ return $this->options['reoccurrence'];
306
+ }
307
+
308
+ /**
309
+ * Set the schedule reoccurrence
310
+ *
311
+ * @param string $reoccurrence
312
+ *
313
+ * @return \WP_Error|null|boolean
314
+ */
315
+ public function set_reoccurrence( $reoccurrence ) {
316
+
317
+ $hmbkp_schedules = cron_schedules();
318
+
319
+ // Check it's valid
320
+ if ( ! is_string( $reoccurrence ) || ! trim( $reoccurrence ) || ( ! in_array( $reoccurrence, array_keys( $hmbkp_schedules ) ) ) && 'manually' !== $reoccurrence ) {
321
+ return new \WP_Error( 'hmbkp_invalid_argument_error', sprintf( __( 'Argument 1 for %s must be a valid cron recurrence or "manually"', 'backupwordpress' ), __METHOD__ ) );
322
+ }
323
+
324
+ // If the recurrence is already set to the same thing then there's no need to continue
325
+ if ( isset( $this->options['reoccurrence'] ) && $this->options['reoccurrence'] === $reoccurrence && $this->is_cron_scheduled() ) {
326
+ return;
327
+ }
328
+
329
+ $this->options['reoccurrence'] = $reoccurrence;
330
+
331
+ if ( 'manually' === $reoccurrence ) {
332
+ $this->unschedule();
333
+
334
+ } else {
335
+ $this->schedule();
336
+ }
337
+
338
+ return true;
339
+
340
+ }
341
+
342
+ /**
343
+ * Get the interval between backups
344
+ *
345
+ * @return int
346
+ */
347
+ public function get_interval() {
348
+
349
+ $hmbkp_schedules = cron_schedules();
350
+
351
+ if ( 'manually' === $this->get_reoccurrence() ) {
352
+ return 0;
353
+ }
354
+
355
+ return $hmbkp_schedules[ $this->get_reoccurrence() ]['interval'];
356
+
357
+ }
358
+
359
+ /**
360
+ * Get the next occurrence of this scheduled backup
361
+ *
362
+ */
363
+ public function get_next_occurrence( $gmt = true ) {
364
+
365
+ $time = wp_next_scheduled( 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
366
+
367
+ if ( ! $time ) {
368
+ $time = 0;
369
+ }
370
+
371
+ if ( ! $gmt ) {
372
+ $time += get_option( 'gmt_offset' ) * 3600;
373
+ }
374
+
375
+ return $time;
376
+
377
+ }
378
+
379
+ public function is_cron_scheduled() {
380
+ return (bool) $this->get_next_occurrence();
381
+ }
382
+
383
+ /**
384
+ * Schedule the backup cron
385
+ *
386
+ */
387
+ public function schedule() {
388
+
389
+ // Clear any existing hooks
390
+ $this->unschedule();
391
+
392
+ $schedule_timestamp = $this->get_schedule_start_time();
393
+
394
+ wp_schedule_event( $schedule_timestamp, $this->get_reoccurrence(), 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
395
+
396
+ }
397
+
398
+
399
+ /**
400
+ * Unschedule the backup cron.
401
+ *
402
+ * @return void
403
+ */
404
+ public function unschedule() {
405
+ wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $this->get_id() ) );
406
+ }
407
+
408
+ /**
409
+ * Run the backup
410
+ *
411
+ */
412
+ public function run() {
413
+
414
+ // Don't run if this schedule is already running
415
+ if ( $this->status->is_started() ) {
416
+ return;
417
+ }
418
+
419
+ // Setup our Site Backup Object
420
+ $backup = new Backup( $this->get_backup_filename(), $this->get_database_dump_filename() );
421
+ $backup->set_type( $this->get_type() );
422
+ $backup->set_excludes( $this->get_excludes() );
423
+ $backup->set_status( $this->status );
424
+
425
+ $this->do_action( 'hmbkp_backup_started', $backup );
426
+
427
+ $this->status->start( $this->get_backup_filename(), __( 'Starting backup...', 'backupwordpress' ) );
428
+
429
+ $this->status->set_status( __( 'Deleting old backups...', 'backupwordpress' ) );
430
+
431
+ // Delete old backups now in-case we fatal error during the backup process
432
+ $this->delete_old_backups();
433
+
434
+ $backup->run();
435
+
436
+ $errors = array_merge( $backup->errors, $backup->warnings );
437
+ $notices = array();
438
+ foreach ( $errors as $key => $error ) {
439
+ $key = str_replace( array( __NAMESPACE__ . '\\', '_File_Backup_Engine', '_Database_Backup_Engine' ), array( '', '', '' ), $key );
440
+ $notices[] = $key . ': ' . implode( ', ', $error );
441
+ }
442
+ Notices::get_instance()->set_notices( 'backup_errors', $notices );
443
+
444
+ $this->status->set_status( __( 'Deleting old backups...', 'backupwordpress' ) );
445
+
446
+ // Delete old backups again
447
+ $this->delete_old_backups();
448
+
449
+ $this->do_action( 'hmbkp_backup_complete', $backup );
450
+
451
+ $this->status->finish();
452
+ $this->update_average_schedule_run_time( $this->status->get_start_time(), time() );
453
+
454
+ }
455
+
456
+ public function get_backup_filename() {
457
+
458
+ if ( $this->status->is_started() ) {
459
+ $this->backup_filename = $this->status->get_backup_filename();
460
+ }
461
+
462
+ return $this->backup_filename;
463
+ }
464
+
465
+ public function get_database_dump_filename() {
466
+ return $this->database_dump_filename;
467
+ }
468
+
469
+ /**
470
+ * Hook into the actions fired in the Backup class and set the status
471
+ *
472
+ * @param $action
473
+ */
474
+ public function do_action( $action, Backup $backup ) {
475
+
476
+ // Pass the actions to all the services
477
+ // Todo should be decoupled into the service class
478
+ foreach ( Services::get_services( $this ) as $service ) {
479
+ if ( is_wp_error( $service ) ) {
480
+ return $service;
481
+ }
482
+ $service->action( $action, $backup );
483
+ }
484
+
485
+ }
486
+
487
+ /**
488
+ * Calculate schedule run time.
489
+ *
490
+ * @param int Timestamp $end
491
+ */
492
+ public function update_average_schedule_run_time( $start, $end ) {
493
+
494
+ if ( $end <= $start ) {
495
+ // Something went wrong, ignore.
496
+ return;
497
+ }
498
+
499
+ $diff = (int) abs( $end - $start );
500
+
501
+ if ( isset( $this->options['duration_total'] ) && isset( $this->options['backup_run_count'] ) ) {
502
+
503
+ $this->options['duration_total'] += $diff;
504
+ $this->options['backup_run_count'] ++;
505
+
506
+ } else {
507
+
508
+ $this->options['duration_total'] = $diff;
509
+ $this->options['backup_run_count'] = 1;
510
+
511
+ }
512
+
513
+ $this->save();
514
+ }
515
+
516
+ /**
517
+ * Calculates the average run time for this schedule.
518
+ *
519
+ * @return string
520
+ */
521
+ public function get_schedule_average_duration() {
522
+
523
+ $duration = 'Unknown';
524
+
525
+ if ( ! isset( $this->options['duration_total'] ) || ! isset( $this->options['backup_run_count'] ) ) {
526
+ return $duration;
527
+ }
528
+
529
+ if ( 0 === (int) $this->options['backup_run_count'] ) {
530
+ return $duration;
531
+ }
532
+
533
+ $average_run_time = (int) $this->options['duration_total'] / (int) $this->options['backup_run_count'];
534
+
535
+ if ( $average_run_time < HOUR_IN_SECONDS ) {
536
+
537
+ $mins = round( $average_run_time / MINUTE_IN_SECONDS );
538
+
539
+ if ( $mins <= 1 ) {
540
+ $mins = 1;
541
+ }
542
+
543
+ /* translators: min=minute */
544
+ $duration = sprintf( _n( '%s min', '%s mins', $mins, 'backupwordpress' ), $mins );
545
+
546
+ } elseif ( $average_run_time < DAY_IN_SECONDS && $average_run_time >= HOUR_IN_SECONDS ) {
547
+
548
+ $hours = round( $average_run_time / HOUR_IN_SECONDS );
549
+
550
+ if ( $hours <= 1 ) {
551
+ $hours = 1;
552
+ }
553
+
554
+ $duration = sprintf( _n( '%s hour', '%s hours', $hours, 'backupwordpress' ), $hours );
555
+ }
556
+
557
+ return $duration;
558
+ }
559
+
560
+ /**
561
+ * Get the backups created by this schedule
562
+ *
563
+ * @todo look into using recursiveDirectoryIterator and recursiveRegexIterator
564
+ * @return string[] - file paths of the backups
565
+ */
566
+ public function get_backups() {
567
+
568
+ $files = array();
569
+
570
+ if ( $handle = @opendir( Path::get_path() ) ) {
571
+
572
+ while ( false !== ( $file = readdir( $handle ) ) ) {
573
+
574
+ if ( pathinfo( $file, PATHINFO_EXTENSION ) === 'zip' && strpos( $file, $this->get_id() ) !== false && ( isset( $this->status ) && $this->get_backup_filename() !== $file ) ) {
575
+ $files[ @filemtime( trailingslashit( Path::get_path() ) . $file ) ] = trailingslashit( Path::get_path() ) . $file;
576
+ }
577
+ }
578
+
579
+ closedir( $handle );
580
+
581
+ }
582
+
583
+ krsort( $files );
584
+
585
+ return $files;
586
+
587
+ }
588
+
589
+ /**
590
+ * Delete old backups
591
+ *
592
+ * @access private
593
+ */
594
+ public function delete_old_backups() {
595
+
596
+ if ( count( $this->get_backups() ) <= $this->get_max_backups() ) {
597
+ return;
598
+ }
599
+
600
+ array_map( array( $this, 'delete_backup' ), array_slice( $this->get_backups(), $this->get_max_backups() ) );
601
+
602
+ }
603
+
604
+ /**
605
+ * Delete a specific back up file created by this schedule
606
+ *
607
+ * @param string $filepath
608
+ *
609
+ * @return \WP_Error|boolean
610
+ */
611
+ public function delete_backup( $filepath ) {
612
+
613
+ // Check that it's a valid filepath
614
+ if ( empty( $filepath ) || ! is_string( $filepath ) ) {
615
+ return new \WP_Error( 'hmbkp_empty_string_error', sprintf( __( 'Argument 1 for %s must be a non-empty string', 'backupwordpress' ), __METHOD__ ) );
616
+ }
617
+
618
+ // Make sure it exists
619
+ if ( ! file_exists( $filepath ) ) {
620
+ return new \WP_Error( 'hmbkp_file_error', sprintf( __( '%s doesn\'t exist', 'backupwordpress' ), $filepath ) );
621
+ }
622
+
623
+ // Make sure it was created by this schedule
624
+ if ( strpos( $filepath, $this->get_id() ) === false ) {
625
+ return new \WP_Error( 'hmbkp_backup_error', __( 'That backup wasn\'t created by this schedule', 'backupwordpress' ) );
626
+ }
627
+
628
+ unlink( $filepath );
629
+
630
+ return true;
631
+
632
+ }
633
+
634
+ /**
635
+ * Delete all back up files created by this schedule
636
+ *
637
+ */
638
+ public function delete_backups() {
639
+ array_map( array( $this, 'delete_backup' ), $this->get_backups() );
640
+ }
641
+
642
+ /**
643
+ * Save the schedules options.
644
+ *
645
+ */
646
+ public function save() {
647
+
648
+ // Only save them if they have changed
649
+ if ( get_option( 'hmbkp_schedule_' . $this->get_id() ) !== $this->options ) {
650
+ update_option( 'hmbkp_schedule_' . $this->get_id(), $this->options );
651
+
652
+ // Delete the schedule cache.
653
+ delete_transient( 'hmbkp_schedules' );
654
+ }
655
+
656
+ }
657
+
658
+ /**
659
+ * Cancel this schedule
660
+ *
661
+ * Cancels the cron job, removes the schedules options
662
+ * and optionally deletes all backups created by
663
+ * this schedule.
664
+ *
665
+ */
666
+ public function cancel( $delete_backups = false ) {
667
+
668
+ // Delete the schedule options
669
+ delete_option( 'hmbkp_schedule_' . $this->get_id() );
670
+
671
+ // Delete the schedule cache.
672
+ delete_transient( 'hmbkp_schedules' );
673
+
674
+ // Clear any existing schedules
675
+ $this->unschedule();
676
+
677
+ // Delete it's backups
678
+ if ( $delete_backups ) {
679
+ $this->delete_backups();
680
+ }
681
+
682
+ }
683
+ }
classes/class-schedules.php CHANGED
@@ -1,96 +1,96 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * A simple class for loading schedules
7
- */
8
- class Schedules {
9
-
10
- /**
11
- * An array of schedules
12
- *
13
- * @var mixed
14
- * @access private
15
- */
16
- private $schedules;
17
-
18
- /**
19
- *
20
- */
21
- protected static $instance;
22
-
23
- public static function get_instance() {
24
-
25
- if ( ! ( self::$instance instanceof Schedules ) ) {
26
- self::$instance = new Schedules();
27
- }
28
-
29
- return self::$instance;
30
-
31
- }
32
-
33
- /**
34
- * Load the schedules from wp_options and store in $this->schedules
35
- *
36
- */
37
- private function __construct() {
38
- $this->refresh_schedules();
39
- }
40
-
41
- public function refresh_schedules() {
42
-
43
- $schedules = get_transient( 'hmbkp_schedules' );
44
-
45
- if ( ! $schedules ) {
46
-
47
- global $wpdb;
48
-
49
- // Load all schedule options from the database.
50
- $schedules = $wpdb->get_col( "SELECT option_name from $wpdb->options WHERE option_name LIKE 'hmbkp\_schedule\_%'" );
51
-
52
- set_transient( 'hmbkp_schedules', $schedules, WEEK_IN_SECONDS );
53
- }
54
-
55
- // Instantiate each one as a Scheduled_Backup
56
- $this->schedules = array_map( array( $this, 'instantiate' ), array_filter( (array) $schedules ) );
57
-
58
- }
59
-
60
- /**
61
- * Get an array of schedules
62
- *
63
- * @return Scheduled_Backup[]
64
- */
65
- public function get_schedules() {
66
- return $this->schedules;
67
- }
68
-
69
- /**
70
- * Get a schedule by ID
71
- *
72
- * @param $id
73
- * @return Scheduled_Backup
74
- */
75
- public function get_schedule( $id ) {
76
-
77
- foreach ( $this->schedules as $schedule ) {
78
- if ( $schedule->get_id() == $id ) {
79
- return $schedule;
80
- }
81
- }
82
-
83
- return null;
84
- }
85
-
86
- /**
87
- * Instantiate the individual scheduled backup objects
88
- *
89
- * @access private
90
- * @param string $id
91
- * @return Scheduled_Backup
92
- */
93
- private function instantiate( $id ) {
94
- return new Scheduled_Backup( str_replace( 'hmbkp_schedule_', '', $id ) );
95
- }
96
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * A simple class for loading schedules
7
+ */
8
+ class Schedules {
9
+
10
+ /**
11
+ * An array of schedules
12
+ *
13
+ * @var mixed
14
+ * @access private
15
+ */
16
+ private $schedules;
17
+
18
+ /**
19
+ *
20
+ */
21
+ protected static $instance;
22
+
23
+ public static function get_instance() {
24
+
25
+ if ( ! ( self::$instance instanceof Schedules ) ) {
26
+ self::$instance = new Schedules();
27
+ }
28
+
29
+ return self::$instance;
30
+
31
+ }
32
+
33
+ /**
34
+ * Load the schedules from wp_options and store in $this->schedules
35
+ *
36
+ */
37
+ private function __construct() {
38
+ $this->refresh_schedules();
39
+ }
40
+
41
+ public function refresh_schedules() {
42
+
43
+ $schedules = get_transient( 'hmbkp_schedules' );
44
+
45
+ if ( ! $schedules ) {
46
+
47
+ global $wpdb;
48
+
49
+ // Load all schedule options from the database.
50
+ $schedules = $wpdb->get_col( "SELECT option_name from $wpdb->options WHERE option_name LIKE 'hmbkp\_schedule\_%'" );
51
+
52
+ set_transient( 'hmbkp_schedules', $schedules, WEEK_IN_SECONDS );
53
+ }
54
+
55
+ // Instantiate each one as a Scheduled_Backup
56
+ $this->schedules = array_map( array( $this, 'instantiate' ), array_filter( (array) $schedules ) );
57
+
58
+ }
59
+
60
+ /**
61
+ * Get an array of schedules
62
+ *
63
+ * @return Scheduled_Backup[]
64
+ */
65
+ public function get_schedules() {
66
+ return $this->schedules;
67
+ }
68
+
69
+ /**
70
+ * Get a schedule by ID
71
+ *
72
+ * @param $id
73
+ * @return Scheduled_Backup
74
+ */
75
+ public function get_schedule( $id ) {
76
+
77
+ foreach ( $this->schedules as $schedule ) {
78
+ if ( $schedule->get_id() == $id ) {
79
+ return $schedule;
80
+ }
81
+ }
82
+
83
+ return null;
84
+ }
85
+
86
+ /**
87
+ * Instantiate the individual scheduled backup objects
88
+ *
89
+ * @access private
90
+ * @param string $id
91
+ * @return Scheduled_Backup
92
+ */
93
+ private function instantiate( $id ) {
94
+ return new Scheduled_Backup( str_replace( 'hmbkp_schedule_', '', $id ) );
95
+ }
96
+ }
classes/class-service.php CHANGED
@@ -1,215 +1,215 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * An abstract service class, individual services should
7
- * extend this class
8
- */
9
- abstract class Service {
10
-
11
- /**
12
- * Human readable name for this service
13
- * @var string
14
- */
15
- public $name;
16
-
17
- /**
18
- * The instance Backup_Schedule that this service is
19
- * is currently working with
20
- *
21
- * @var Scheduled_Backup
22
- */
23
- protected $schedule;
24
-
25
- public function __construct( Scheduled_Backup $schedule ) {
26
- $this->set_schedule( $schedule );
27
- }
28
-
29
- /**
30
- * Used to determine if the service is in use or not
31
- *
32
- * @return boolean
33
- */
34
- abstract public function is_service_active();
35
-
36
- /**
37
- * The form to output as part of the schedule settings
38
- *
39
- * If you don't want a whole form return ''; here and use @field instead
40
- *
41
- * @return string The raw HTML for the form you want to output
42
- */
43
- abstract public function form();
44
-
45
- /**
46
- * The field to output as part of the schedule settings
47
- *
48
- * If you don't want a field return ''; here and use @form instead
49
- *
50
- * @return string The raw HTML for the field you want to output
51
- */
52
- abstract public function field();
53
-
54
- /**
55
- * Help text that should be output in the Constants help tab
56
- *
57
- * @return string The raw HTML for the Constant help text you want to output
58
- */
59
- public static function constant() {}
60
-
61
- /**
62
- * Validate and sanitize data before it's saved.
63
- *
64
- * @param array &$new_data An array or data from $_GET, passed by reference so it can be modified,
65
- * @param array $old_data The old data thats going to be overwritten
66
- * @return array $error Array of validation errors e.g. return array( 'email' => 'not valid' );
67
- */
68
- abstract public function update( &$new_data, $old_data );
69
-
70
- /**
71
- * The string to be output as part of the schedule sentence
72
- *
73
- * @return string
74
- */
75
- abstract public function display();
76
-
77
- /**
78
- * Receives actions from the backup
79
- *
80
- * This is where the service should do it's thing
81
- *
82
- * @see Backup::do_action for a list of the actions
83
- *
84
- * @param $action
85
- * @param Backup $backup
86
- *
87
- * @return mixed
88
- */
89
- public function action( $action, Backup $backup ) {}
90
-
91
- public function get_slug() {
92
- return sanitize_key( $this->name );
93
- }
94
-
95
- /**
96
- * Utility for getting a formated html input name attribute
97
- *
98
- * @param string $name The name of the field
99
- * @return string The formated name
100
- */
101
- protected function get_field_name( $name ) {
102
- return esc_attr( $this->get_slug() . '[' . $name . ']' );
103
- }
104
-
105
- /**
106
- * Get the value of a field
107
- *
108
- * @param string $name The name of the field
109
- * @param string $esc The escaping function that should be used
110
- * @return string
111
- */
112
- protected function get_field_value( $name, $esc = 'esc_attr' ) {
113
-
114
- if ( $name && $this->schedule->get_service_options( $this->get_slug(), $name ) ) {
115
- return $esc( $this->schedule->get_service_options( $this->get_slug(), $name ) );
116
- }
117
-
118
- return '';
119
-
120
- }
121
-
122
- /**
123
- * Save the settings for this service
124
- *
125
- * @return null|array returns null on success, array of errors on failure
126
- */
127
- public function save() {
128
-
129
- $classname = $this->get_slug();
130
-
131
- $old_data = $this->schedule->get_service_options( $classname );
132
-
133
- $new_data = isset( $_POST[ $classname ] ) ? $_POST[ $classname ] : array();
134
-
135
- // $new_data is passed by ref, so it is clean after this method call.
136
- $errors = $this->update( $new_data, $old_data );
137
-
138
- if ( $errors && $errors = array_flip( $errors ) ) {
139
-
140
- foreach ( $errors as $error => &$field ) {
141
- $field = $this->get_slug() . '[' . $field . ']';
142
- }
143
-
144
- return array_flip( $errors );
145
-
146
- }
147
-
148
- // Only overwrite settings if they changed
149
- if ( ! empty( $new_data ) ) {
150
- $this->schedule->set_service_options( $classname, $new_data );
151
- }
152
-
153
- return array();
154
-
155
- }
156
-
157
- /**
158
- * Set the current schedule object
159
- *
160
- * @param Scheduled_Backup $schedule An instantiated schedule object
161
- */
162
- public function set_schedule( Scheduled_Backup $schedule ) {
163
- $this->schedule = $schedule;
164
- }
165
-
166
- /**
167
- * Gets the settings for a similar destination from the existing schedules
168
- * so that we can copy them into the form to avoid having to type them again
169
- *
170
- * @return array
171
- */
172
- protected function fetch_destination_settings() {
173
-
174
- $service = $this->get_slug();
175
-
176
- $schedules_obj = Schedules::get_instance();
177
-
178
- $schedules = $schedules_obj->get_schedules();
179
-
180
- foreach ( $schedules as $schedule ) {
181
-
182
- if ( $schedule->get_id() != $this->schedule->get_id() ) {
183
-
184
- $options = $schedule->get_service_options( $service );
185
-
186
- if ( ! empty( $options ) ) {
187
- return $options;
188
- }
189
- }
190
- }
191
-
192
- return array();
193
-
194
- }
195
-
196
- /**
197
- * @return boolean
198
- */
199
- public function has_form() {
200
-
201
- ob_start();
202
-
203
- $this->form();
204
-
205
- return (bool) ob_get_clean();
206
-
207
- }
208
-
209
- /**
210
- * Handles passing service specific data to Intercom
211
- */
212
- public static function intercom_data() {}
213
-
214
- public static function intercom_data_html() {}
215
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * An abstract service class, individual services should
7
+ * extend this class
8
+ */
9
+ abstract class Service {
10
+
11
+ /**
12
+ * Human readable name for this service
13
+ * @var string
14
+ */
15
+ public $name;
16
+
17
+ /**
18
+ * The instance Backup_Schedule that this service is
19
+ * is currently working with
20
+ *
21
+ * @var Scheduled_Backup
22
+ */
23
+ protected $schedule;
24
+
25
+ public function __construct( Scheduled_Backup $schedule ) {
26
+ $this->set_schedule( $schedule );
27
+ }
28
+
29
+ /**
30
+ * Used to determine if the service is in use or not
31
+ *
32
+ * @return boolean
33
+ */
34
+ abstract public function is_service_active();
35
+
36
+ /**
37
+ * The form to output as part of the schedule settings
38
+ *
39
+ * If you don't want a whole form return ''; here and use @field instead
40
+ *
41
+ * @return string The raw HTML for the form you want to output
42
+ */
43
+ abstract public function form();
44
+
45
+ /**
46
+ * The field to output as part of the schedule settings
47
+ *
48
+ * If you don't want a field return ''; here and use @form instead
49
+ *
50
+ * @return string The raw HTML for the field you want to output
51
+ */
52
+ abstract public function field();
53
+
54
+ /**
55
+ * Help text that should be output in the Constants help tab
56
+ *
57
+ * @return string The raw HTML for the Constant help text you want to output
58
+ */
59
+ public static function constant() {}
60
+
61
+ /**
62
+ * Validate and sanitize data before it's saved.
63
+ *
64
+ * @param array &$new_data An array or data from $_GET, passed by reference so it can be modified,
65
+ * @param array $old_data The old data thats going to be overwritten
66
+ * @return array $error Array of validation errors e.g. return array( 'email' => 'not valid' );
67
+ */
68
+ abstract public function update( &$new_data, $old_data );
69
+
70
+ /**
71
+ * The string to be output as part of the schedule sentence
72
+ *
73
+ * @return string
74
+ */
75
+ abstract public function display();
76
+
77
+ /**
78
+ * Receives actions from the backup
79
+ *
80
+ * This is where the service should do it's thing
81
+ *
82
+ * @see Backup::do_action for a list of the actions
83
+ *
84
+ * @param $action
85
+ * @param Backup $backup
86
+ *
87
+ * @return mixed
88
+ */
89
+ public function action( $action, Backup $backup ) {}
90
+
91
+ public function get_slug() {
92
+ return sanitize_key( $this->name );
93
+ }
94
+
95
+ /**
96
+ * Utility for getting a formated html input name attribute
97
+ *
98
+ * @param string $name The name of the field
99
+ * @return string The formated name
100
+ */
101
+ protected function get_field_name( $name ) {
102
+ return esc_attr( $this->get_slug() . '[' . $name . ']' );
103
+ }
104
+
105
+ /**
106
+ * Get the value of a field
107
+ *
108
+ * @param string $name The name of the field
109
+ * @param string $esc The escaping function that should be used
110
+ * @return string
111
+ */
112
+ protected function get_field_value( $name, $esc = 'esc_attr' ) {
113
+
114
+ if ( $name && $this->schedule->get_service_options( $this->get_slug(), $name ) ) {
115
+ return $esc( $this->schedule->get_service_options( $this->get_slug(), $name ) );
116
+ }
117
+
118
+ return '';
119
+
120
+ }
121
+
122
+ /**
123
+ * Save the settings for this service
124
+ *
125
+ * @return null|array returns null on success, array of errors on failure
126
+ */
127
+ public function save() {
128
+
129
+ $classname = $this->get_slug();
130
+
131
+ $old_data = $this->schedule->get_service_options( $classname );
132
+
133
+ $new_data = isset( $_POST[ $classname ] ) ? $_POST[ $classname ] : array();
134
+
135
+ // $new_data is passed by ref, so it is clean after this method call.
136
+ $errors = $this->update( $new_data, $old_data );
137
+
138
+ if ( $errors && $errors = array_flip( $errors ) ) {
139
+
140
+ foreach ( $errors as $error => &$field ) {
141
+ $field = $this->get_slug() . '[' . $field . ']';
142
+ }
143
+
144
+ return array_flip( $errors );
145
+
146
+ }
147
+
148
+ // Only overwrite settings if they changed
149
+ if ( ! empty( $new_data ) ) {
150
+ $this->schedule->set_service_options( $classname, $new_data );
151
+ }
152
+
153
+ return array();
154
+
155
+ }
156
+
157
+ /**
158
+ * Set the current schedule object
159
+ *
160
+ * @param Scheduled_Backup $schedule An instantiated schedule object
161
+ */
162
+ public function set_schedule( Scheduled_Backup $schedule ) {
163
+ $this->schedule = $schedule;
164
+ }
165
+
166
+ /**
167
+ * Gets the settings for a similar destination from the existing schedules
168
+ * so that we can copy them into the form to avoid having to type them again
169
+ *
170
+ * @return array
171
+ */
172
+ protected function fetch_destination_settings() {
173
+
174
+ $service = $this->get_slug();
175
+
176
+ $schedules_obj = Schedules::get_instance();
177
+
178
+ $schedules = $schedules_obj->get_schedules();
179
+
180
+ foreach ( $schedules as $schedule ) {
181
+
182
+ if ( $schedule->get_id() != $this->schedule->get_id() ) {
183
+
184
+ $options = $schedule->get_service_options( $service );
185
+
186
+ if ( ! empty( $options ) ) {
187
+ return $options;
188
+ }
189
+ }
190
+ }
191
+
192
+ return array();
193
+
194
+ }
195
+
196
+ /**
197
+ * @return boolean
198
+ */
199
+ public function has_form() {
200
+
201
+ ob_start();
202
+
203
+ $this->form();
204
+
205
+ return (bool) ob_get_clean();
206
+
207
+ }
208
+
209
+ /**
210
+ * Handles passing service specific data to Intercom
211
+ */
212
+ public static function intercom_data() {}
213
+
214
+ public static function intercom_data_html() {}
215
+ }
classes/class-services.php CHANGED
@@ -1,126 +1,126 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * A singleton to handle the registering, de-registering
7
- * and storage of services
8
- */
9
- class Services {
10
-
11
- /**
12
- * Store the current instance
13
- *
14
- * @access private
15
- * @var object Services
16
- * @static
17
- */
18
- private static $instance;
19
-
20
- /**
21
- * The array of services
22
- *
23
- * Should be of the format array( __FILE__ => __CLASS__ );
24
- *
25
- * @access private
26
- * @var array
27
- * @static
28
- */
29
- private $services = array();
30
-
31
- /**
32
- * The current schedule object
33
- *
34
- * @access private
35
- * @var object Scheduled_Backup
36
- */
37
- private $schedule;
38
-
39
- /**
40
- * Get the current instance
41
- *
42
- * @static
43
- */
44
- public static function instance() {
45
-
46
- if ( ! isset( self::$instance ) ) {
47
- self::$instance = new Services;
48
- }
49
-
50
- return self::$instance;
51
-
52
- }
53
-
54
- /**
55
- * Get the array of registered services
56
- *
57
- * @param Scheduled_Backup $schedule
58
- * @return Service[]
59
- */
60
- public static function get_services( Scheduled_Backup $schedule = null ) {
61
-
62
- if ( is_null( $schedule ) ) {
63
- return self::instance()->services;
64
- }
65
-
66
- self::instance()->schedule = $schedule;
67
-
68
- return array_map( array( self::instance(), 'instantiate' ), self::instance()->services );
69
-
70
- }
71
-
72
- /**
73
- * Register a new service
74
- *
75
- * @param $filepath
76
- * @param $classname
77
- * @return \WP_Error|boolean
78
- */
79
- public static function register( $filepath, $classname ) {
80
- if ( ! file_exists( $filepath ) ) {
81
- return new \WP_Error( 'hmbkp_invalid_path_error', sprintf( __( 'Argument 1 for %s must be a valid filepath', 'backupwordpress' ), __METHOD__ ) );
82
- }
83
-
84
- self::instance()->services[ $filepath ] = $classname;
85
-
86
- return true;
87
- }
88
-
89
- /**
90
- * De-register an existing service
91
- * @param string $filepath
92
- * @return \WP_Error|boolean
93
- */
94
- public static function unregister( $filepath ) {
95
-
96
- if ( ! isset( self::instance()->services[ $filepath ] ) ) {
97
- return new \WP_Error( 'hmbkp_unrecognized_service_error', sprintf( __( 'Argument 1 for %s must be a registered service', 'backupwordpress' ), __METHOD__ ) );
98
- }
99
-
100
- unset( self::instance()->services[ $filepath ] );
101
-
102
- return true;
103
- }
104
-
105
- /**
106
- * Instantiate the individual service classes
107
- *
108
- * @param string $classname
109
- *
110
- * @return array An array of instantiated classes
111
- */
112
- private static function instantiate( $classname ) {
113
-
114
- if ( ! class_exists( $classname ) ) {
115
- return new \WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid class', 'backupwordpress' ), __METHOD__ ) );
116
- }
117
-
118
- /**
119
- * @var Service
120
- */
121
- $class = new $classname( self::instance()->schedule );
122
-
123
- return $class;
124
-
125
- }
126
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * A singleton to handle the registering, de-registering
7
+ * and storage of services
8
+ */
9
+ class Services {
10
+
11
+ /**
12
+ * Store the current instance
13
+ *
14
+ * @access private
15
+ * @var object Services
16
+ * @static
17
+ */
18
+ private static $instance;
19
+
20
+ /**
21
+ * The array of services
22
+ *
23
+ * Should be of the format array( __FILE__ => __CLASS__ );
24
+ *
25
+ * @access private
26
+ * @var array
27
+ * @static
28
+ */
29
+ private $services = array();
30
+
31
+ /**
32
+ * The current schedule object
33
+ *
34
+ * @access private
35
+ * @var object Scheduled_Backup
36
+ */
37
+ private $schedule;
38
+
39
+ /**
40
+ * Get the current instance
41
+ *
42
+ * @static
43
+ */
44
+ public static function instance() {
45
+
46
+ if ( ! isset( self::$instance ) ) {
47
+ self::$instance = new Services;
48
+ }
49
+
50
+ return self::$instance;
51
+
52
+ }
53
+
54
+ /**
55
+ * Get the array of registered services
56
+ *
57
+ * @param Scheduled_Backup $schedule
58
+ * @return Service[]
59
+ */
60
+ public static function get_services( Scheduled_Backup $schedule = null ) {
61
+
62
+ if ( is_null( $schedule ) ) {
63
+ return self::instance()->services;
64
+ }
65
+
66
+ self::instance()->schedule = $schedule;
67
+
68
+ return array_map( array( self::instance(), 'instantiate' ), self::instance()->services );
69
+
70
+ }
71
+
72
+ /**
73
+ * Register a new service
74
+ *
75
+ * @param $filepath
76
+ * @param $classname
77
+ * @return \WP_Error|boolean
78
+ */
79
+ public static function register( $filepath, $classname ) {
80
+ if ( ! file_exists( $filepath ) ) {
81
+ return new \WP_Error( 'hmbkp_invalid_path_error', sprintf( __( 'Argument 1 for %s must be a valid filepath', 'backupwordpress' ), __METHOD__ ) );
82
+ }
83
+
84
+ self::instance()->services[ $filepath ] = $classname;
85
+
86
+ return true;
87
+ }
88
+
89
+ /**
90
+ * De-register an existing service
91
+ * @param string $filepath
92
+ * @return \WP_Error|boolean
93
+ */
94
+ public static function unregister( $filepath ) {
95
+
96
+ if ( ! isset( self::instance()->services[ $filepath ] ) ) {
97
+ return new \WP_Error( 'hmbkp_unrecognized_service_error', sprintf( __( 'Argument 1 for %s must be a registered service', 'backupwordpress' ), __METHOD__ ) );
98
+ }
99
+
100
+ unset( self::instance()->services[ $filepath ] );
101
+
102
+ return true;
103
+ }
104
+
105
+ /**
106
+ * Instantiate the individual service classes
107
+ *
108
+ * @param string $classname
109
+ *
110
+ * @return array An array of instantiated classes
111
+ */
112
+ private static function instantiate( $classname ) {
113
+
114
+ if ( ! class_exists( $classname ) ) {
115
+ return new \WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid class', 'backupwordpress' ), __METHOD__ ) );
116
+ }
117
+
118
+ /**
119
+ * @var Service
120
+ */
121
+ $class = new $classname( self::instance()->schedule );
122
+
123
+ return $class;
124
+
125
+ }
126
+ }
classes/class-setup.php CHANGED
@@ -1,178 +1,174 @@
1
- <?php
2
- /**
3
- * Class BackUpWordPress_Setup
4
- */
5
- class HMBKP_Setup {
6
-
7
- /**
8
- * Defines the minimum version of WordPress required by BWP.
9
- */
10
- const MIN_WP_VERSION = '3.9';
11
-
12
- /**
13
- * Defines the minimum version of PHP required by BWP.
14
- */
15
- const MIN_PHP_VERSION = '5.3.2';
16
-
17
- /**
18
- * Setup the plugin defaults on activation
19
- */
20
- public static function activate() {
21
-
22
- if ( ! current_user_can( 'activate_plugins' ) ) {
23
- return;
24
- }
25
-
26
- // loads the translation files for the Error message in the wp_die call.
27
- load_plugin_textdomain( 'backupwordpress', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
28
-
29
- if ( ! self::meets_requirements() ) {
30
-
31
- wp_die( self::get_notice_message(), __( 'BackUpWordPress', 'backupwordpress' ), array( 'back_link' => true ) );
32
-
33
- }
34
-
35
- // Run deactivate on activation in-case it was deactivated manually
36
- self::deactivate();
37
-
38
- }
39
-
40
- /**
41
- * Cleanup on plugin deactivation
42
- *
43
- * Removes options and clears all cron schedules
44
- */
45
- public static function deactivate() {
46
-
47
- if ( ! current_user_can( 'activate_plugins' ) ) {
48
- return;
49
- }
50
-
51
- self::delete_schedules();
52
-
53
- self::delete_transients();
54
-
55
- }
56
-
57
- /**
58
- * Deletes the backup schedule database entries and WP Cron entries.
59
- */
60
- public static function delete_schedules() {
61
-
62
- // Delete Cron schedules.
63
- global $wpdb;
64
-
65
- $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) );
66
-
67
- foreach ( array_map( array( 'self', 'trim_prefix' ), $schedules ) as $item ) {
68
- wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $item ) );
69
- }
70
- }
71
-
72
- public static function trim_prefix( $item ) {
73
- return ltrim( $item, 'hmbkp_schedule_' );
74
- }
75
-
76
- /**
77
- * Deletes the plugin's transients from the database.
78
- */
79
- public static function delete_transients() {
80
-
81
- // Delete all transients
82
- $transients = array(
83
- 'hmbkp_plugin_data',
84
- 'hmbkp_directory_filesizes',
85
- 'hmbkp_directory_filesizes_running',
86
- 'hmbkp_wp_cron_test_beacon',
87
- 'hm_backdrop',
88
- );
89
-
90
- array_map( 'delete_transient', $transients );
91
- }
92
-
93
- /**
94
- * Deactivate BackUpWordPress.
95
- */
96
- public static function self_deactivate() {
97
-
98
- if ( ! current_user_can( 'activate_plugins' ) ) {
99
- return;
100
- }
101
-
102
- if ( ! function_exists( 'deactivate_plugins' ) ) {
103
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
104
- }
105
-
106
- deactivate_plugins( dirname( dirname( __FILE__ ) ) . '/backupwordpress.php' );
107
-
108
- if ( isset( $_GET['activate'] ) ) {
109
- unset( $_GET['activate'] );
110
- }
111
-
112
- }
113
-
114
- /**
115
- * Determine if this WordPress install meets the minimum requirements for BWP to run.
116
- *
117
- * @return bool
118
- */
119
- public static function meets_requirements() {
120
-
121
- if ( false === self::is_supported_php_version() ) {
122
- return false;
123
- }
124
-
125
- if ( false === self::is_supported_wp_version() ) {
126
- return false;
127
- }
128
-
129
- return true;
130
- }
131
-
132
- /**
133
- * Checks the current PHP version against the required version.
134
- *
135
- * @return bool 'Operator' parameter specified, returns a boolean.
136
- */
137
- protected static function is_supported_php_version() {
138
-
139
- return version_compare( phpversion(), self::MIN_PHP_VERSION, '>=' );
140
- }
141
-
142
- /**
143
- * Checks the current WordPress version against the required version.
144
- *
145
- * @return bool 'Operator' parameter specified, returns a boolean.
146
- */
147
- protected static function is_supported_wp_version() {
148
-
149
- return version_compare( get_bloginfo( 'version' ), self::MIN_WP_VERSION, '>=' );
150
- }
151
-
152
- /**
153
- * Displays a user friendly message in the WordPress admin.
154
- */
155
- public static function display_admin_notices() {
156
-
157
- echo '<div class="error"><p>' . self::get_notice_message() . '</p></div>';
158
-
159
- }
160
-
161
- /**
162
- * Returns a localized user friendly error message.
163
- *
164
- * @return string
165
- */
166
- public static function get_notice_message() {
167
-
168
- return sprintf(
169
- __( 'BackUpWordPress requires PHP version %1$s or later and WordPress version %2$s or later to run. It has not been activated. %3$s%4$s%5$sLearn more%6$s', 'backupwordpress' ),
170
- self::MIN_PHP_VERSION,
171
- self::MIN_WP_VERSION,
172
- '<a href="',
173
- 'https://bwp.hmn.md/unsupported-php-version-error/',
174
- '">',
175
- '</a>'
176
- );
177
- }
178
- }
1
+ <?php
2
+ /**
3
+ * Class BackUpWordPress_Setup
4
+ */
5
+ class HMBKP_Setup {
6
+
7
+ /**
8
+ * Defines the minimum version of WordPress required by BWP.
9
+ */
10
+ const MIN_WP_VERSION = '3.9';
11
+
12
+ /**
13
+ * Defines the minimum version of PHP required by BWP.
14
+ */
15
+ const MIN_PHP_VERSION = '5.3.2';
16
+
17
+ /**
18
+ * Setup the plugin defaults on activation
19
+ */
20
+ public static function activate() {
21
+
22
+ if ( ! current_user_can( 'activate_plugins' ) ) {
23
+ return;
24
+ }
25
+
26
+ // loads the translation files for the Error message in the wp_die call.
27
+ load_plugin_textdomain( 'backupwordpress', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
28
+
29
+ if ( ! self::meets_requirements() ) {
30
+
31
+ wp_die( self::get_notice_message(), __( 'BackUpWordPress', 'backupwordpress' ), array( 'back_link' => true ) );
32
+
33
+ }
34
+
35
+ // Run deactivate on activation in-case it was deactivated manually
36
+ self::deactivate();
37
+
38
+ }
39
+
40
+ /**
41
+ * Cleanup on plugin deactivation
42
+ *
43
+ * Removes options and clears all cron schedules
44
+ */
45
+ public static function deactivate() {
46
+
47
+ if ( ! current_user_can( 'activate_plugins' ) ) {
48
+ return;
49
+ }
50
+
51
+ self::delete_schedules();
52
+
53
+ self::delete_transients();
54
+
55
+ }
56
+
57
+ /**
58
+ * Deletes the backup schedule database entries and WP Cron entries.
59
+ */
60
+ public static function delete_schedules() {
61
+
62
+ // Delete Cron schedules.
63
+ global $wpdb;
64
+
65
+ $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) );
66
+
67
+ foreach ( array_map( array( 'self', 'trim_prefix' ), $schedules ) as $item ) {
68
+ wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $item ) );
69
+ }
70
+ }
71
+
72
+ public static function trim_prefix( $item ) {
73
+ return ltrim( $item, 'hmbkp_schedule_' );
74
+ }
75
+
76
+ /**
77
+ * Deletes the plugin's transients from the database.
78
+ */
79
+ public static function delete_transients() {
80
+
81
+ // Delete all transients
82
+ $transients = array(
83
+ 'hmbkp_plugin_data',
84
+ 'hmbkp_directory_filesizes',
85
+ 'hmbkp_directory_filesizes_running',
86
+ 'hmbkp_wp_cron_test_beacon',
87
+ 'hm_backdrop',
88
+ );
89
+
90
+ array_map( 'delete_transient', $transients );
91
+ }
92
+
93
+ /**
94
+ * Deactivate BackUpWordPress.
95
+ */
96
+ public static function self_deactivate() {
97
+
98
+ if ( ! current_user_can( 'activate_plugins' ) ) {
99
+ return;
100
+ }
101
+
102
+ if ( ! function_exists( 'deactivate_plugins' ) ) {
103
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
104
+ }
105
+
106
+ deactivate_plugins( dirname( dirname( __FILE__ ) ) . '/backupwordpress.php' );
107
+
108
+ if ( isset( $_GET['activate'] ) ) {
109
+ unset( $_GET['activate'] );
110
+ }
111
+
112
+ }
113
+
114
+ /**
115
+ * Determine if this WordPress install meets the minimum requirements for BWP to run.
116
+ *
117
+ * @return bool
118
+ */
119
+ public static function meets_requirements() {
120
+
121
+ if ( false === self::is_supported_php_version() ) {
122
+ return false;
123
+ }
124
+
125
+ if ( false === self::is_supported_wp_version() ) {
126
+ return false;
127
+ }
128
+
129
+ return true;
130
+ }
131
+
132
+ /**
133
+ * Checks the current PHP version against the required version.
134
+ *
135
+ * @return bool 'Operator' parameter specified, returns a boolean.
136
+ */
137
+ protected static function is_supported_php_version() {
138
+
139
+ return version_compare( phpversion(), self::MIN_PHP_VERSION, '>=' );
140
+ }
141
+
142
+ /**
143
+ * Checks the current WordPress version against the required version.
144
+ *
145
+ * @return bool 'Operator' parameter specified, returns a boolean.
146
+ */
147
+ protected static function is_supported_wp_version() {
148
+
149
+ return version_compare( get_bloginfo( 'version' ), self::MIN_WP_VERSION, '>=' );
150
+ }
151
+
152
+ /**
153
+ * Displays a user friendly message in the WordPress admin.
154
+ */
155
+ public static function display_admin_notices() {
156
+
157
+ echo '<div class="error"><p>' . self::get_notice_message() . '</p></div>';
158
+
159
+ }
160
+
161
+ /**
162
+ * Returns a localized user friendly error message.
163
+ *
164
+ * @return string
165
+ */
166
+ public static function get_notice_message() {
167
+
168
+ return sprintf(
169
+ __( 'BackUpWordPress requires PHP version %1$s or later and WordPress version %2$s or later to run. It has not been activated.', 'backupwordpress' ),
170
+ self::MIN_PHP_VERSION,
171
+ self::MIN_WP_VERSION
172
+ );
173
+ }
174
+ }
 
 
 
 
classes/class-site-size.php CHANGED
@@ -1,281 +1,281 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- use HM\Backdrop\Task;
6
- use Symfony\Component\Finder\Finder;
7
-
8
- /**
9
- * Site Size class
10
- *
11
- * Use to calculate the total or partial size of the site's database and files.
12
- */
13
- class Site_Size {
14
-
15
- private $size = 0;
16
- private $type = '';
17
- private $excludes = array();
18
-
19
- /**
20
- * Constructor
21
- *
22
- * Set up some initial conditions including whether we want to calculate the
23
- * size of the database, files or both and whether to exclude any files from
24
- * the file size calculation.
25
- *
26
- * @param string $type Whether to calculate the size of the database, files
27
- * or both. Should be one of 'file', 'database' or 'complete'
28
- * @param array $excludes An array of exclude rules
29
- */
30
- public function __construct( $type = 'complete', Excludes $excludes = null ) {
31
- $this->type = $type;
32
- $this->excludes = $excludes;
33
- }
34
-
35
- /**
36
- * Calculate the size total size of the database + files.
37
- *
38
- * Doesn't account for any compression that would be gained by zipping.
39
- *
40
- * @return string
41
- */
42
- public function get_site_size() {
43
-
44
- if ( $this->size ) {
45
- return $this->size;
46
- }
47
-
48
- $size = 0;
49
-
50
- // Include database size except for file only schedule.
51
- if ( 'file' !== $this->type ) {
52
-
53
- $size = (int) get_transient( 'hmbkp_database_size' );
54
-
55
- if ( ! $size ) {
56
-
57
- global $wpdb;
58
-
59
- $tables = $wpdb->get_results( 'SHOW TABLE STATUS FROM `' . DB_NAME . '`', ARRAY_A );
60
-
61
- foreach ( $tables as $table ) {
62
- $size += (float) $table['Data_length'];
63
- }
64
-
65
- set_transient( 'hmbkp_database_size', $size, WEEK_IN_SECONDS );
66
- }
67
- }
68
-
69
- // Include total size of dirs/files except for database only schedule.
70
- if ( 'database' !== $this->type ) {
71
-
72
- $root = new \SplFileInfo( Path::get_root() );
73
- $size += $this->filesize( $root );
74
-
75
- }
76
-
77
- $this->size = $size;
78
-
79
- return $size;
80
-
81
- }
82
-
83
- /**
84
- * Get the site size formatted
85
- *
86
- * @see size_format
87
- *
88
- * @return string
89
- */
90
- public function get_formatted_site_size() {
91
- return size_format( $this->get_site_size() );
92
- }
93
-
94
- /**
95
- * Whether the total filesize is being calculated
96
- *
97
- * @return bool
98
- */
99
- public static function is_site_size_being_calculated() {
100
- return false !== get_transient( 'hmbkp_directory_filesizes_running' );
101
- }
102
-
103
- /**
104
- * Whether the total filesize is cached
105
- *
106
- * @return bool
107
- */
108
- public function is_site_size_cached() {
109
- return (bool) $this->get_cached_filesizes();
110
- }
111
-
112
- /**
113
- * Recursively scans a directory to calculate the total filesize
114
- *
115
- * Locks should be set by the caller with `set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );`
116
- *
117
- * @return array $directory_sizes An array of directory paths => filesize sum of all files in directory
118
- */
119
- public function recursive_filesize_scanner() {
120
-
121
- /**
122
- * Raise the `memory_limit` and `max_execution time`
123
- *
124
- * Respects the WP_MAX_MEMORY_LIMIT Constant and the `admin_memory_limit`
125
- * filter.
126
- */
127
- @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
128
- @set_time_limit( 0 );
129
-
130
- // Use the cached array directory sizes if available
131
- $directory_sizes = $this->get_cached_filesizes();
132
-
133
- // If we do have it in cache then let's use it and also clear the lock
134
- if ( is_array( $directory_sizes ) ) {
135
- delete_transient( 'hmbkp_directory_filesizes_running' );
136
- return $directory_sizes;
137
- }
138
-
139
- // If we don't have it cached then we'll need to re-calculate
140
- $finder = new Finder();
141
- $finder->followLinks();
142
- $finder->ignoreDotFiles( false );
143
- $finder->ignoreUnreadableDirs( true );
144
-
145
- $files = $finder->in( Path::get_root() );
146
-
147
- foreach ( $files as $file ) {
148
-
149
- if ( $file->isReadable() ) {
150
- $directory_sizes[ wp_normalize_path( $file->getRealpath() ) ] = $file->getSize();
151
- } else {
152
- $directory_sizes[ wp_normalize_path( $file->getRealpath() ) ] = 0;
153
- }
154
- }
155
-
156
- file_put_contents( PATH::get_path() . '/.files', gzcompress( json_encode( $directory_sizes ) ) );
157
-
158
- // Remove the lock
159
- delete_transient( 'hmbkp_directory_filesizes_running' );
160
-
161
- return $directory_sizes;
162
-
163
- }
164
-
165
- /**
166
- * Get the total filesize for a given file or directory. Aware of exclusions.
167
- *
168
- * If $file is a file then return the result of `filesize()` or 0 if it's excluded.
169
- * If $file is a directory then recursively calculate the size without
170
- * the size of excluded files/directories.
171
- *
172
- * @param \SplFileInfo $file The file or directory you want to know the size of.
173
- *
174
- * @return int The total filesize of the file or directory without
175
- * the size of excluded files/directories.
176
- */
177
- public function filesize( \SplFileInfo $file ) {
178
-
179
- // Skip missing or unreadable files.
180
- if ( ! file_exists( $file->getPathname() ) || ! $file->getRealpath() || ! $file->isReadable() ) {
181
- return 0;
182
- }
183
-
184
- // If it's a file then return its filesize or 0 if it's excluded.
185
- if ( $file->isFile() ) {
186
-
187
- if ( $this->excludes && $this->excludes->is_file_excluded( $file ) ) {
188
- return 0;
189
- } else {
190
- return $file->getSize();
191
- }
192
- }
193
-
194
- // If it's a directory then pull it from the cached filesize array.
195
- if ( $file->isDir() ) {
196
- return $this->directory_filesize( $file );
197
- }
198
- }
199
-
200
- public function directory_filesize( \SplFileInfo $file ) {
201
-
202
- // For performance reasons we cache the root.
203
- if ( $file->getRealPath() === PATH::get_root() && $this->excludes ) {
204
-
205
- $directory_sizes = get_transient( 'hmbkp_root_size' );
206
-
207
- if ( $directory_sizes ) {
208
- return (int) $directory_sizes;
209
- }
210
- }
211
-
212
- // If we haven't calculated the site size yet then kick it off in a thread.
213
- $directory_sizes = $this->get_cached_filesizes();
214
-
215
- if ( ! is_array( $directory_sizes ) ) {
216
- $this->rebuild_directory_filesizes();
217
-
218
- // Intentionally return null so the caller can tell that the size is being calculated.
219
- return null;
220
- }
221
-
222
- /*
223
- * Ensure we only include files in the current path, the filepaths are stored in keys
224
- * so we need to flip for use with preg_grep.
225
- */
226
- $directory_sizes = array_flip( preg_grep( '(' . wp_normalize_path( $file->getRealPath() ) . ')', array_flip( $directory_sizes ) ) );
227
-
228
- if ( $this->excludes ) {
229
-
230
- $excludes = implode( '|', $this->excludes->get_excludes_for_regex() );
231
-
232
- if ( $excludes ) {
233
- // Use PREG_GREP_INVERT to remove any filepaths which match an exclude rule
234
- $directory_sizes = array_flip( preg_grep( '(' . $excludes . ')', array_flip( $directory_sizes ), PREG_GREP_INVERT ) );
235
- }
236
- }
237
-
238
- $directory_sizes = absint( array_sum( $directory_sizes ) );
239
-
240
- // For performance reasons we cache the root.
241
- if ( $file->getRealPath() === PATH::get_root() && $this->excludes ) {
242
- set_transient( 'hmbkp_root_size', $directory_sizes, DAY_IN_SECONDS );
243
- }
244
-
245
- // Directory size is now just a sum of all files across all sub directories.
246
- return (int) $directory_sizes;
247
-
248
- }
249
-
250
- public function rebuild_directory_filesizes() {
251
-
252
- if ( $this->is_site_size_being_calculated() ) {
253
- return false;
254
- }
255
-
256
- // Mark the filesize as being calculated
257
- set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );
258
-
259
- // Schedule a Backdrop task to trigger a recalculation
260
- $task = new Task( array( $this, 'recursive_filesize_scanner' ) );
261
- $task->schedule();
262
-
263
- }
264
-
265
- public function get_cached_filesizes( $max_age = WEEK_IN_SECONDS ) {
266
-
267
- $cache = PATH::get_path() . '/.files';
268
- $files = false;
269
-
270
- if ( file_exists( $cache ) ) {
271
-
272
- // If the file is old then regenerate it
273
- if ( ( time() - filemtime( $cache ) ) <= $max_age ) {
274
- $files = json_decode( gzuncompress( file_get_contents( $cache ) ), 'ARRAY_A' );
275
- }
276
- }
277
-
278
- return $files;
279
-
280
- }
281
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ use HM\Backdrop\Task;
6
+ use Symfony\Component\Finder\Finder;
7
+
8
+ /**
9
+ * Site Size class
10
+ *
11
+ * Use to calculate the total or partial size of the site's database and files.
12
+ */
13
+ class Site_Size {
14
+
15
+ private $size = 0;
16
+ private $type = '';
17
+ private $excludes = array();
18
+
19
+ /**
20
+ * Constructor
21
+ *
22
+ * Set up some initial conditions including whether we want to calculate the
23
+ * size of the database, files or both and whether to exclude any files from
24
+ * the file size calculation.
25
+ *
26
+ * @param string $type Whether to calculate the size of the database, files
27
+ * or both. Should be one of 'file', 'database' or 'complete'
28
+ * @param array $excludes An array of exclude rules
29
+ */
30
+ public function __construct( $type = 'complete', Excludes $excludes = null ) {
31
+ $this->type = $type;
32
+ $this->excludes = $excludes;
33
+ }
34
+
35
+ /**
36
+ * Calculate the size total size of the database + files.
37
+ *
38
+ * Doesn't account for any compression that would be gained by zipping.
39
+ *
40
+ * @return string
41
+ */
42
+ public function get_site_size() {
43
+
44
+ if ( $this->size ) {
45
+ return $this->size;
46
+ }
47
+
48
+ $size = 0;
49
+
50
+ // Include database size except for file only schedule.
51
+ if ( 'file' !== $this->type ) {
52
+
53
+ $size = (int) get_transient( 'hmbkp_database_size' );
54
+
55
+ if ( ! $size ) {
56
+
57
+ global $wpdb;
58
+
59
+ $tables = $wpdb->get_results( 'SHOW TABLE STATUS FROM `' . DB_NAME . '`', ARRAY_A );
60
+
61
+ foreach ( $tables as $table ) {
62
+ $size += (float) $table['Data_length'];
63
+ }
64
+
65
+ set_transient( 'hmbkp_database_size', $size, WEEK_IN_SECONDS );
66
+ }
67
+ }
68
+
69
+ // Include total size of dirs/files except for database only schedule.
70
+ if ( 'database' !== $this->type ) {
71
+
72
+ $root = new \SplFileInfo( Path::get_root() );
73
+ $size += $this->filesize( $root );
74
+
75
+ }
76
+
77
+ $this->size = $size;
78
+
79
+ return $size;
80
+
81
+ }
82
+
83
+ /**
84
+ * Get the site size formatted
85
+ *
86
+ * @see size_format
87
+ *
88
+ * @return string
89
+ */
90
+ public function get_formatted_site_size() {
91
+ return size_format( $this->get_site_size() );
92
+ }
93
+
94
+ /**
95
+ * Whether the total filesize is being calculated
96
+ *
97
+ * @return bool
98
+ */
99
+ public static function is_site_size_being_calculated() {
100
+ return false !== get_transient( 'hmbkp_directory_filesizes_running' );
101
+ }
102
+
103
+ /**
104
+ * Whether the total filesize is cached
105
+ *
106
+ * @return bool
107
+ */
108
+ public function is_site_size_cached() {
109
+ return (bool) $this->get_cached_filesizes();
110
+ }
111
+
112
+ /**
113
+ * Recursively scans a directory to calculate the total filesize
114
+ *
115
+ * Locks should be set by the caller with `set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );`
116
+ *
117
+ * @return array $directory_sizes An array of directory paths => filesize sum of all files in directory
118
+ */
119
+ public function recursive_filesize_scanner() {
120
+
121
+ /**
122
+ * Raise the `memory_limit` and `max_execution time`
123
+ *
124
+ * Respects the WP_MAX_MEMORY_LIMIT Constant and the `admin_memory_limit`
125
+ * filter.
126
+ */
127
+ @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
128
+ @set_time_limit( 0 );
129
+
130
+ // Use the cached array directory sizes if available
131
+ $directory_sizes = $this->get_cached_filesizes();
132
+
133
+ // If we do have it in cache then let's use it and also clear the lock
134
+ if ( is_array( $directory_sizes ) ) {
135
+ delete_transient( 'hmbkp_directory_filesizes_running' );
136
+ return $directory_sizes;
137
+ }
138
+
139
+ // If we don't have it cached then we'll need to re-calculate
140
+ $finder = new Finder();
141
+ $finder->followLinks();
142
+ $finder->ignoreDotFiles( false );
143
+ $finder->ignoreUnreadableDirs( true );
144
+
145
+ $files = $finder->in( Path::get_root() );
146
+
147
+ foreach ( $files as $file ) {
148
+
149
+ if ( $file->isReadable() ) {
150
+ $directory_sizes[ wp_normalize_path( $file->getRealpath() ) ] = $file->getSize();
151
+ } else {
152
+ $directory_sizes[ wp_normalize_path( $file->getRealpath() ) ] = 0;
153
+ }
154
+ }
155
+
156
+ file_put_contents( PATH::get_path() . '/.files', gzcompress( json_encode( $directory_sizes ) ) );
157
+
158
+ // Remove the lock
159
+ delete_transient( 'hmbkp_directory_filesizes_running' );
160
+
161
+ return $directory_sizes;
162
+
163
+ }
164
+
165
+ /**
166
+ * Get the total filesize for a given file or directory. Aware of exclusions.
167
+ *
168
+ * If $file is a file then return the result of `filesize()` or 0 if it's excluded.
169
+ * If $file is a directory then recursively calculate the size without
170
+ * the size of excluded files/directories.
171
+ *
172
+ * @param \SplFileInfo $file The file or directory you want to know the size of.
173
+ *
174
+ * @return int The total filesize of the file or directory without
175
+ * the size of excluded files/directories.
176
+ */
177
+ public function filesize( \SplFileInfo $file ) {
178
+
179
+ // Skip missing or unreadable files.
180
+ if ( ! file_exists( $file->getPathname() ) || ! $file->getRealpath() || ! $file->isReadable() ) {
181
+ return 0;
182
+ }
183
+
184
+ // If it's a file then return its filesize or 0 if it's excluded.
185
+ if ( $file->isFile() ) {
186
+
187
+ if ( $this->excludes && $this->excludes->is_file_excluded( $file ) ) {
188
+ return 0;
189
+ } else {
190
+ return $file->getSize();
191
+ }
192
+ }
193
+
194
+ // If it's a directory then pull it from the cached filesize array.
195
+ if ( $file->isDir() ) {
196
+ return $this->directory_filesize( $file );
197
+ }
198
+ }
199
+
200
+ public function directory_filesize( \SplFileInfo $file ) {
201
+
202
+ // For performance reasons we cache the root.
203
+ if ( $file->getRealPath() === PATH::get_root() && $this->excludes ) {
204
+
205
+ $directory_sizes = get_transient( 'hmbkp_root_size' );
206
+
207
+ if ( $directory_sizes ) {
208
+ return (int) $directory_sizes;
209
+ }
210
+ }
211
+
212
+ // If we haven't calculated the site size yet then kick it off in a thread.
213
+ $directory_sizes = $this->get_cached_filesizes();
214
+
215
+ if ( ! is_array( $directory_sizes ) ) {
216
+ $this->rebuild_directory_filesizes();
217
+
218
+ // Intentionally return null so the caller can tell that the size is being calculated.
219
+ return null;
220
+ }
221
+
222
+ /*
223
+ * Ensure we only include files in the current path, the filepaths are stored in keys
224
+ * so we need to flip for use with preg_grep.
225
+ */
226
+ $directory_sizes = array_flip( preg_grep( '(' . wp_normalize_path( $file->getRealPath() ) . ')', array_flip( $directory_sizes ) ) );
227
+
228
+ if ( $this->excludes ) {
229
+
230
+ $excludes = implode( '|', $this->excludes->get_excludes_for_regex() );
231
+
232
+ if ( $excludes ) {
233
+ // Use PREG_GREP_INVERT to remove any filepaths which match an exclude rule
234
+ $directory_sizes = array_flip( preg_grep( '(' . $excludes . ')', array_flip( $directory_sizes ), PREG_GREP_INVERT ) );
235
+ }
236
+ }
237
+
238
+ $directory_sizes = absint( array_sum( $directory_sizes ) );
239
+
240
+ // For performance reasons we cache the root.
241
+ if ( $file->getRealPath() === PATH::get_root() && $this->excludes ) {
242
+ set_transient( 'hmbkp_root_size', $directory_sizes, DAY_IN_SECONDS );
243
+ }
244
+
245
+ // Directory size is now just a sum of all files across all sub directories.
246
+ return (int) $directory_sizes;
247
+
248
+ }
249
+
250
+ public function rebuild_directory_filesizes() {
251
+
252
+ if ( $this->is_site_size_being_calculated() ) {
253
+ return false;
254
+ }
255
+
256
+ // Mark the filesize as being calculated
257
+ set_transient( 'hmbkp_directory_filesizes_running', true, HOUR_IN_SECONDS );
258
+
259
+ // Schedule a Backdrop task to trigger a recalculation
260
+ $task = new Task( array( $this, 'recursive_filesize_scanner' ) );
261
+ $task->schedule();
262
+
263
+ }
264
+
265
+ public function get_cached_filesizes( $max_age = WEEK_IN_SECONDS ) {
266
+
267
+ $cache = PATH::get_path() . '/.files';
268
+ $files = false;
269
+
270
+ if ( file_exists( $cache ) ) {
271
+
272
+ // If the file is old then regenerate it
273
+ if ( ( time() - filemtime( $cache ) ) <= $max_age ) {
274
+ $files = json_decode( gzuncompress( file_get_contents( $cache ) ), 'ARRAY_A' );
275
+ }
276
+ }
277
+
278
+ return $files;
279
+
280
+ }
281
+ }
classes/class-webhook-service.php CHANGED
@@ -1,113 +1,113 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Webhook notifications for backups
7
- *
8
- * @extends Service
9
- */
10
- abstract class Webhook_Service extends Service {
11
-
12
- /**
13
- * Human readable name for this service
14
- * @var string
15
- */
16
- public $name = 'Webhook';
17
-
18
- /**
19
- * @return string
20
- */
21
- abstract protected function get_secret_key();
22
-
23
- /**
24
- * @return string
25
- */
26
- abstract protected function get_url();
27
-
28
- /**
29
- * Fire the webhook notification on the hmbkp_backup_complete
30
- *
31
- * @see Backup::do_action
32
- * @param string $action The action received from the backup
33
- * @return void
34
- */
35
- public function action( $action, Backup $backup ) {
36
-
37
- if ( 'hmbkp_backup_complete' !== $action || ! $this->is_service_active() ) {
38
- return;
39
- }
40
-
41
- $webhook_url = $this->get_url();
42
- $file = $backup->get_backup_filepath();
43
- $download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
44
- $domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
45
-
46
- // The backup failed, send a message saying as much
47
- if ( ! file_exists( $file ) && ( $errors = array_merge( $backup->get_errors(), $backup->get_warnings() ) ) ) {
48
-
49
- $error_message = '';
50
-
51
- foreach ( $errors as $error_set ) {
52
- $error_message .= implode( "\n - ", $error_set );
53
- }
54
-
55
- if ( $error_message ) {
56
- $error_message = ' - ' . $error_message;
57
- }
58
-
59
- $subject = sprintf( __( 'Backup of %s Failed', 'backupwordpress' ), $domain );
60
-
61
- $body = array(
62
- 'type' => 'backup.error',
63
- 'site_url' => site_url(),
64
- 'backup' => array(
65
- 'id' => 'backup_' . pathinfo( $file, PATHINFO_FILENAME ),
66
- 'start' => '0',
67
- 'end' => '0',
68
- 'download_url' => '',
69
- 'type' => $this->schedule->get_type(),
70
- 'status' => array(
71
- 'message' => $subject . ' - ' . $error_message,
72
- 'success' => '0',
73
- ),
74
- ),
75
- );
76
-
77
- } else {
78
-
79
- $body = array(
80
- 'type' => 'backup.success',
81
- 'site_url' => site_url(),
82
- 'backup' => array(
83
- 'id' => 'backup_' . $this->schedule->get_id(),
84
- 'start' => '0',
85
- 'end' => '0',
86
- 'download_url' => $download,
87
- 'type' => $this->schedule->get_type(),
88
- 'status' => array(
89
- 'message' => 'Backup complete',
90
- 'success' => '1',
91
- ),
92
- ),
93
- );
94
-
95
- }
96
-
97
- $signature = hash_hmac( 'sha1', serialize( $body ), $this->get_secret_key() );
98
- $webhook_args = array( 'headers' => array( 'X-BWP-Signature' => $signature ), 'body' => $body );
99
-
100
- $ret = wp_remote_post( $webhook_url, $webhook_args );
101
-
102
- if ( is_wp_error( $ret ) ) {
103
- $backup->warning( 'Webhook', sprintf( __( 'Error: %s', 'backupwordpress' ), $ret->get_error_message() ) );
104
- }
105
-
106
- }
107
-
108
- public static function intercom_data() {
109
- return array();
110
- }
111
-
112
- public static function intercom_data_html() {}
113
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Webhook notifications for backups
7
+ *
8
+ * @extends Service
9
+ */
10
+ abstract class Webhook_Service extends Service {
11
+
12
+ /**
13
+ * Human readable name for this service
14
+ * @var string
15
+ */
16
+ public $name = 'Webhook';
17
+
18
+ /**
19
+ * @return string
20
+ */
21
+ abstract protected function get_secret_key();
22
+
23
+ /**
24
+ * @return string
25
+ */
26
+ abstract protected function get_url();
27
+
28
+ /**
29
+ * Fire the webhook notification on the hmbkp_backup_complete
30
+ *
31
+ * @see Backup::do_action
32
+ * @param string $action The action received from the backup
33
+ * @return void
34
+ */
35
+ public function action( $action, Backup $backup ) {
36
+
37
+ if ( 'hmbkp_backup_complete' !== $action || ! $this->is_service_active() ) {
38
+ return;
39
+ }
40
+
41
+ $webhook_url = $this->get_url();
42
+ $file = $backup->get_backup_filepath();
43
+ $download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
44
+ $domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
45
+
46
+ // The backup failed, send a message saying as much
47
+ if ( ! file_exists( $file ) && ( $errors = array_merge( $backup->get_errors(), $backup->get_warnings() ) ) ) {
48
+
49
+ $error_message = '';
50
+
51
+ foreach ( $errors as $error_set ) {
52
+ $error_message .= implode( "\n - ", $error_set );
53
+ }
54
+
55
+ if ( $error_message ) {
56
+ $error_message = ' - ' . $error_message;
57
+ }
58
+
59
+ $subject = sprintf( __( 'Backup of %s Failed', 'backupwordpress' ), $domain );
60
+
61
+ $body = array(
62
+ 'type' => 'backup.error',
63
+ 'site_url' => site_url(),
64
+ 'backup' => array(
65
+ 'id' => 'backup_' . pathinfo( $file, PATHINFO_FILENAME ),
66
+ 'start' => '0',
67
+ 'end' => '0',
68
+ 'download_url' => '',
69
+ 'type' => $this->schedule->get_type(),
70
+ 'status' => array(
71
+ 'message' => $subject . ' - ' . $error_message,
72
+ 'success' => '0',
73
+ ),
74
+ ),
75
+ );
76
+
77
+ } else {
78
+
79
+ $body = array(
80
+ 'type' => 'backup.success',
81
+ 'site_url' => site_url(),
82
+ 'backup' => array(
83
+ 'id' => 'backup_' . $this->schedule->get_id(),
84
+ 'start' => '0',
85
+ 'end' => '0',
86
+ 'download_url' => $download,
87
+ 'type' => $this->schedule->get_type(),
88
+ 'status' => array(
89
+ 'message' => 'Backup complete',
90
+ 'success' => '1',
91
+ ),
92
+ ),
93
+ );
94
+
95
+ }
96
+
97
+ $signature = hash_hmac( 'sha1', serialize( $body ), $this->get_secret_key() );
98
+ $webhook_args = array( 'headers' => array( 'X-BWP-Signature' => $signature ), 'body' => $body );
99
+
100
+ $ret = wp_remote_post( $webhook_url, $webhook_args );
101
+
102
+ if ( is_wp_error( $ret ) ) {
103
+ $backup->warning( 'Webhook', sprintf( __( 'Error: %s', 'backupwordpress' ), $ret->get_error_message() ) );
104
+ }
105
+
106
+ }
107
+
108
+ public static function intercom_data() {
109
+ return array();
110
+ }
111
+
112
+ public static function intercom_data_html() {}
113
+ }
classes/class-wpremote-webhook-service.php CHANGED
@@ -1,71 +1,71 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Webhook notifications for backups on WPRemote
7
- *
8
- * @extends Service
9
- */
10
- class WPRemote_Webhook_Service extends Webhook_Service {
11
-
12
- /**
13
- * Human readable name for this service
14
- * @var string
15
- */
16
- public $name = 'WP Remote Webhook';
17
-
18
- private $wpremote_webhook_url = 'http://wpremote.com/api/json/backupwordpress/webhook';
19
-
20
- /**
21
- * Not in use
22
- *
23
- * @see field
24
- * @return null
25
- */
26
- public function form() {}
27
-
28
- /**
29
- * Not in use
30
- *
31
- * @return null
32
- */
33
- public function field() {}
34
-
35
- /**
36
- * Not in use
37
- *
38
- * @return null
39
- */
40
- public function display() {}
41
-
42
- /**
43
- * Not in use
44
- * $return null
45
- */
46
- public function update( &$new_data, $old_data ) {}
47
-
48
- /**
49
- * Used to determine if the service is in use or not
50
- */
51
- public function is_service_active() {
52
- return strlen( $this->get_url() ) > 0;
53
- }
54
-
55
- /**
56
- * @return string
57
- */
58
- protected function get_url() {
59
- return ( defined( 'WPRP_PLUGIN_SLUG' ) && get_option( 'wpr_api_key' ) ) ? $this->wpremote_webhook_url : false;
60
- }
61
-
62
- /**
63
- * @return string
64
- */
65
- protected function get_secret_key() {
66
- return get_option( 'wpr_api_key' );
67
- }
68
- }
69
-
70
- // Register the service
71
- Services::register( __FILE__, 'HM\BackUpWordPress\WPRemote_Webhook_Service' );
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Webhook notifications for backups on WPRemote
7
+ *
8
+ * @extends Service
9
+ */
10
+ class WPRemote_Webhook_Service extends Webhook_Service {
11
+
12
+ /**
13
+ * Human readable name for this service
14
+ * @var string
15
+ */
16
+ public $name = 'WP Remote Webhook';
17
+
18
+ private $wpremote_webhook_url = 'http://wpremote.com/api/json/backupwordpress/webhook';
19
+
20
+ /**
21
+ * Not in use
22
+ *
23
+ * @see field
24
+ * @return null
25
+ */
26
+ public function form() {}
27
+
28
+ /**
29
+ * Not in use
30
+ *
31
+ * @return null
32
+ */
33
+ public function field() {}
34
+
35
+ /**
36
+ * Not in use
37
+ *
38
+ * @return null
39
+ */
40
+ public function display() {}
41
+
42
+ /**
43
+ * Not in use
44
+ * $return null
45
+ */
46
+ public function update( &$new_data, $old_data ) {}
47
+
48
+ /**
49
+ * Used to determine if the service is in use or not
50
+ */
51
+ public function is_service_active() {
52
+ return strlen( $this->get_url() ) > 0;
53
+ }
54
+
55
+ /**
56
+ * @return string
57
+ */
58
+ protected function get_url() {
59
+ return ( defined( 'WPRP_PLUGIN_SLUG' ) && get_option( 'wpr_api_key' ) ) ? $this->wpremote_webhook_url : false;
60
+ }
61
+
62
+ /**
63
+ * @return string
64
+ */
65
+ protected function get_secret_key() {
66
+ return get_option( 'wpr_api_key' );
67
+ }
68
+ }
69
+
70
+ // Register the service
71
+ Services::register( __FILE__, 'HM\BackUpWordPress\WPRemote_Webhook_Service' );
classes/deprecated.php CHANGED
@@ -1,92 +1,92 @@
1
- <?php
2
-
3
-
4
- /**
5
- * An abstract service class, individual services should
6
- * extend this class
7
- */
8
- abstract class HMBKP_Service {}
9
-
10
- /**
11
- * A singleton to handle the registering, de-registering
12
- * and storage of services
13
- */
14
- class HMBKP_Services {
15
-
16
- /**
17
- * Store the current instance
18
- *
19
- * @access private
20
- * @var object HMBKP_Services
21
- * @static
22
- */
23
- private static $instance;
24
-
25
- /**
26
- * The array of services
27
- *
28
- * Should be of the format array( __FILE__ => __CLASS__ );
29
- *
30
- * @access private
31
- * @var array
32
- * @static
33
- */
34
- private $services = array();
35
-
36
- /**
37
- * The current schedule object
38
- *
39
- * @access private
40
- * @var object HMBKP_Scheduled_Backup
41
- */
42
- private $schedule;
43
-
44
- /**
45
- * Get the current instance
46
- *
47
- * @access public
48
- * @static
49
- */
50
- public static function instance() {
51
-
52
- if ( ! isset( self::$instance ) )
53
- self::$instance = new HMBKP_Services;
54
-
55
- return self::$instance;
56
-
57
- }
58
-
59
- /**
60
- * Register a new service
61
- *
62
- * @param $filepath
63
- * @param $classname
64
- * @return bool|WP_Error
65
- */
66
- public static function register( $filepath, $classname ) {
67
-
68
- _deprecated_function( __METHOD__, '3.1.2' );
69
- }
70
-
71
- /**
72
- * Instantiate the individual service classes
73
- *
74
- * @param string $classname
75
- *
76
- * @return array An array of instantiated classes
77
- */
78
- private static function instantiate( $classname ) {
79
-
80
- if ( ! class_exists( $classname ) )
81
- return new \WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid class', 'backupwordpress' ) ), __METHOD__ );
82
-
83
- /**
84
- * @var HMBKP_Service
85
- */
86
- $class = new $classname( self::instance()->schedule );
87
-
88
- return $class;
89
-
90
- }
91
-
92
- }
1
+ <?php
2
+
3
+
4
+ /**
5
+ * An abstract service class, individual services should
6
+ * extend this class
7
+ */
8
+ abstract class HMBKP_Service {}
9
+
10
+ /**
11
+ * A singleton to handle the registering, de-registering
12
+ * and storage of services
13
+ */
14
+ class HMBKP_Services {
15
+
16
+ /**
17
+ * Store the current instance
18
+ *
19
+ * @access private
20
+ * @var object HMBKP_Services
21
+ * @static
22
+ */
23
+ private static $instance;
24
+
25
+ /**
26
+ * The array of services
27
+ *
28
+ * Should be of the format array( __FILE__ => __CLASS__ );
29
+ *
30
+ * @access private
31
+ * @var array
32
+ * @static
33
+ */
34
+ private $services = array();
35
+
36
+ /**
37
+ * The current schedule object
38
+ *
39
+ * @access private
40
+ * @var object HMBKP_Scheduled_Backup
41
+ */
42
+ private $schedule;
43
+
44
+ /**
45
+ * Get the current instance
46
+ *
47
+ * @access public
48
+ * @static
49
+ */
50
+ public static function instance() {
51
+
52
+ if ( ! isset( self::$instance ) )
53
+ self::$instance = new HMBKP_Services;
54
+
55
+ return self::$instance;
56
+
57
+ }
58
+
59
+ /**
60
+ * Register a new service
61
+ *
62
+ * @param $filepath
63
+ * @param $classname
64
+ * @return bool|WP_Error
65
+ */
66
+ public static function register( $filepath, $classname ) {
67
+
68
+ _deprecated_function( __METHOD__, '3.1.2' );
69
+ }
70
+
71
+ /**
72
+ * Instantiate the individual service classes
73
+ *
74
+ * @param string $classname
75
+ *
76
+ * @return array An array of instantiated classes
77
+ */
78
+ private static function instantiate( $classname ) {
79
+
80
+ if ( ! class_exists( $classname ) )
81
+ return new \WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid class', 'backupwordpress' ) ), __METHOD__ );
82
+
83
+ /**
84
+ * @var HMBKP_Service
85
+ */
86
+ $class = new $classname( self::instance()->schedule );
87
+
88
+ return $class;
89
+
90
+ }
91
+
92
+ }
functions/core.php CHANGED
@@ -1,678 +1,678 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Handles anything that needs to be
7
- * done when the plugin is updated
8
- */
9
- function update() {
10
-
11
- // Update from backUpWordPress 0.4.5
12
- if ( get_option( 'bkpwp_max_backups' ) ) {
13
-
14
- // Carry over the custom path
15
- if ( $legacy_path = get_option( 'bkpwppath' ) ) {
16
- update_option( 'hmbkp_path', $legacy_path );
17
- }
18
-
19
- // Options to remove
20
- $legacy_options = array(
21
- 'bkpwp_archive_types',
22
- 'bkpwp_automail_from',
23
- 'bkpwp_domain',
24
- 'bkpwp_domain_path',
25
- 'bkpwp_easy_mode',
26
- 'bkpwp_excludelists',
27
- 'bkpwp_install_user',
28
- 'bkpwp_listmax_backups',
29
- 'bkpwp_max_backups',
30
- 'bkpwp_presets',
31
- 'bkpwp_reccurrences',
32
- 'bkpwp_schedules',
33
- 'bkpwp_calculation',
34
- 'bkpwppath',
35
- 'bkpwp_status_config',
36
- 'bkpwp_status',
37
- );
38
-
39
- foreach ( $legacy_options as $option ) {
40
- delete_option( $option );
41
- }
42
-
43
- global $wp_roles;
44
-
45
- $wp_roles->remove_cap( 'administrator', 'manage_backups' );
46
- $wp_roles->remove_cap( 'administrator', 'download_backups' );
47
-
48
- wp_clear_scheduled_hook( 'bkpwp_schedule_bkpwp_hook' );
49
-
50
- }
51
-
52
- // Version 1 to 2
53
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '2.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
54
-
55
- /**
56
- * Setup a backwards compatible schedule
57
- */
58
- $legacy_schedule = new Scheduled_Backup( 'backup' );
59
-
60
- // Backup type
61
- if ( ( defined( 'HMBKP_FILES_ONLY' ) && HMBKP_FILES_ONLY ) || get_option( 'hmbkp_files_only' ) ) {
62
- $legacy_schedule->set_type( 'file' );
63
- } elseif ( ( defined( 'HMBKP_DATABASE_ONLY' ) && HMBKP_DATABASE_ONLY ) || get_option( 'hmbkp_database_only' ) ) {
64
- $legacy_schedule->set_type( 'database' );
65
- } else {
66
- $legacy_schedule->set_type( 'complete' );
67
- }
68
-
69
- // Daily schedule time
70
- if ( defined( 'HMBKP_DAILY_SCHEDULE_TIME' ) && HMBKP_DAILY_SCHEDULE_TIME ) {
71
- $legacy_schedule->set_schedule_start_time( strtotime( HMBKP_DAILY_SCHEDULE_TIME ) );
72
- }
73
-
74
- // Backup schedule
75
- $legacy_schedule->set_reoccurrence( get_option( 'hmbkp_schedule_frequency', 'daily' ) );
76
-
77
- // Automatic backups disabled?
78
- if ( ( defined( 'HMBKP_DISABLE_AUTOMATIC_BACKUP' ) && HMBKP_DISABLE_AUTOMATIC_BACKUP ) || get_option( 'hmbkp_disable_automatic_backup' ) ) {
79
- $legacy_schedule->set_reoccurrence( 'manually' );
80
- }
81
-
82
- // Max backups
83
- if ( defined( 'HMBKP_MAX_BACKUPS' ) && is_numeric( HMBKP_MAX_BACKUPS ) ) {
84
- $legacy_schedule->set_max_backups( (int) HMBKP_MAX_BACKUPS );
85
- } else {
86
- $legacy_schedule->set_max_backups( (int) get_option( 'hmbkp_max_backups', 10 ) );
87
- }
88
-
89
- // Excludes
90
- if ( get_option( 'hmbkp_excludes' ) ) {
91
- $legacy_schedule->set_excludes( get_option( 'hmbkp_excludes' ) );
92
- }
93
-
94
- // Backup email
95
- if ( defined( 'HMBKP_EMAIL' ) && is_email( HMBKP_EMAIL ) ) {
96
- $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => HMBKP_EMAIL ) );
97
- } elseif ( is_email( get_option( 'hmbkp_email_address' ) ) ) {
98
- $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => get_option( 'hmbkp_email_address' ) ) );
99
- }
100
-
101
- // Set the archive filename to what it used to be
102
- $legacy_schedule->backup_filename = implode( '-', array( get_bloginfo( 'name' ), 'backup', current_time( 'Y-m-d-H-i-s' ) ) ) . '.zip';
103
-
104
- $legacy_schedule->save();
105
-
106
- $legacy_path = get_option( 'hmbkp_path' );
107
-
108
- if ( $legacy_path ) {
109
-
110
- // Prepend 'backup-' to the beginning of any legacy backups so they are picked up by the legacy schedule
111
- if ( $handle = opendir( $legacy_path ) ) {
112
- while ( false !== ( $file = readdir( $handle ) ) ) {
113
- if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) ) {
114
- rename( trailingslashit( $legacy_path ) . $file, trailingslashit( $legacy_path ) . 'backup-' . $file );
115
- }
116
- }
117
- closedir( $handle );
118
- }
119
-
120
- PATH::get_instance()->move_old_backups( $legacy_path );
121
-
122
- }
123
-
124
- // Remove the legacy options
125
- foreach ( array( 'hmbkp_database_only', 'hmbkp_files_only', 'hmbkp_max_backups', 'hmbkp_email_address', 'hmbkp_email', 'hmbkp_schedule_frequency', 'hmbkp_disable_automatic_backup' ) as $option_name ) {
126
- delete_option( $option_name );
127
- }
128
- }
129
-
130
- // Update from 2.x to 3.0
131
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '2.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
132
-
133
- // Remove the plugin data cache
134
- delete_transient( 'hmbkp_plugin_data' );
135
-
136
- }
137
-
138
- // Update to 3.1
139
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
140
-
141
- // Remove the plugin data cache
142
- delete_option( 'hmbkp_path' );
143
- delete_option( 'hmbkp_default_path' );
144
-
145
- }
146
-
147
- // update to 3.1.4
148
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.1.4', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
149
-
150
- $old_option_names = array(
151
- 'HM\BackUpWordPressDropbox\Dropbox_Service' => 'dropbox',
152
- 'HMBKP_DX_Backup_Service' => 'dropbox',
153
- 'HM\BackUpWordPressFTP\FTP_Backup_Service' => 'ftp',
154
- 'HMBKP_FTP_Backup_Service' => 'ftp',
155
- 'HM\BackUpWordPressGDrive\Google_Drive_BackUp' => 'google-drive',
156
- 'HMBKP_GDV_Backup_Service' => 'google-drive',
157
- 'HM\BackUpWordPressRackspace\RackSpace_BackUp' => 'rackspace-cloud',
158
- 'HMBKP_RSC_Backup_Service' => 'rackspace-cloud',
159
- 'HM\BackUpWordPressS3\S3_Backup' => 's3',
160
- 'HMBKP_S3_Backup_Service' => 's3',
161
- 'HM\BackUpWordPressWinAzure\WinAzure_Backup' => 'azure',
162
- 'HMBKP_WAZ_Backup_Service' => 'azure',
163
- 'HM\BackUpWordPress\Email_Service' => 'email',
164
- );
165
-
166
- global $wpdb;
167
-
168
- // Get all schedule options with a SELECT query and delete them.
169
- $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) );
170
-
171
- if ( 0 < count( $schedules ) ) {
172
-
173
- // Access each schedules settings to see if the addon settings names need to be be updated to the new naming convention which uses the service slug generated from the $name property.
174
- foreach ( $schedules as $schedule_id ) {
175
-
176
- // Load the settings for this schedule into an array
177
- // so we can loop through the different service settings
178
- $schedule_settings = get_option( $schedule_id );
179
-
180
- // Iterate over each schedule setting for this schedule and check its name against our array.
181
- foreach ( $schedule_settings as $key => $val ) {
182
- // Find the current element key in our control array and get its value. Set a new element in the settings array with the found value as its key. Aka rename the element key
183
- if ( array_key_exists( $key, $old_option_names ) ) {
184
-
185
- // move the value to our new key
186
- $schedule_settings[ $old_option_names[ $key ] ] = $schedule_settings[ $key ];
187
-
188
- unset( $schedule_settings[ $key ] );
189
-
190
- }
191
- }
192
-
193
- // Save back to the DB
194
- update_option( $schedule_id, $schedule_settings );
195
- }
196
- }
197
- }
198
-
199
- // Update to 3.1.5
200
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.1.5', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
201
-
202
- // Delete all transients
203
- $transients = array(
204
- 'hmbkp_plugin_data',
205
- 'hmbkp_directory_filesizes',
206
- 'hmbkp_directory_filesizes_running',
207
- 'hmbkp_wp_cron_test_beacon',
208
- 'hm_backdrop',
209
- );
210
-
211
- array_map( 'delete_transient', $transients );
212
-
213
- // Clear duplicate schedules on multisite
214
- if ( is_multisite() ) {
215
-
216
- // get current blogs from DB
217
- $blogs = wp_get_sites();
218
-
219
- foreach ( $blogs as $blog ) {
220
-
221
- switch_to_blog( get_current_blog_id() );
222
-
223
- if ( is_main_site( get_current_blog_id() ) ) {
224
- continue;
225
- }
226
-
227
- global $wpdb;
228
-
229
- // Get the schedule options
230
- $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) );
231
-
232
- // clear schedules
233
- foreach ( array_map( function ( $item ) {
234
- return ltrim( $item, 'hmbkp_schedule_' );
235
- }, $schedules ) as $item ) {
236
- wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $item ) );
237
- }
238
-
239
- // delete options
240
- array_map( 'delete_option', $schedules );
241
-
242
- array_map( 'delete_option', array( 'hmbkp_enable_support', 'hmbkp_plugin_version', 'hmbkp_path', 'hmbkp_default_path', 'hmbkp_upsell' ) );
243
-
244
- // Delete all transients
245
- array_map( 'delete_transient', array( 'hmbkp_plugin_data', 'hmbkp_directory_filesizes', 'hmbkp_directory_filesize_running', 'timeout_hmbkp_wp_cron_test_beacon', 'hmbkp_wp_cron_test_beacon' ) );
246
-
247
- }
248
-
249
- restore_current_blog();
250
- }
251
- }
252
-
253
- // Update from 3.3.0
254
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.3.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
255
-
256
- $schedules = Schedules::get_instance();
257
-
258
- // Loop through all schedules and re-set the reccurrence to include hmbkp_
259
- foreach ( $schedules->get_schedules() as $schedule ) {
260
-
261
- $reoccurrence = $schedule->get_reoccurrence();
262
-
263
- if ( 'manually' !== $reoccurrence && strpos( $reoccurrence, 'hmbkp_' ) === 0 ) {
264
- $schedule->set_reoccurrence( substr( $reoccurrence, 6 ) );
265
- }
266
-
267
- $schedule->save();
268
-
269
- }
270
- }
271
-
272
- // Update from 3.3.4
273
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.4.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
274
- delete_transient( 'hmbkp_directory_filesizes' );
275
- }
276
-
277
- // Every update
278
- if ( get_option( 'hmbkp_plugin_version' ) && version_compare( Plugin::PLUGIN_VERSION, get_option( 'hmbkp_plugin_version' ), '>' ) ) {
279
-
280
- require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' );
281
-
282
- \HMBKP_Setup::deactivate();
283
-
284
- Path::get_instance()->protect_path( 'reset' );
285
-
286
- }
287
-
288
- // Update the stored version
289
- if ( get_option( 'hmbkp_plugin_version' ) !== Plugin::PLUGIN_VERSION ) {
290
- update_option( 'hmbkp_plugin_version', Plugin::PLUGIN_VERSION );
291
- }
292
-
293
- }
294
-
295
- /**
296
- * Setup the default backup schedules
297
- */
298
- function setup_default_schedules() {
299
-
300
- $schedules = Schedules::get_instance();
301
-
302
- if ( $schedules->get_schedules() ) {
303
- return;
304
- }
305
-
306
- /**
307
- * Schedule a database backup daily and store backups
308
- * for the last 2 weeks
309
- */
310
- $database_daily = new Scheduled_Backup( (string) time() );
311
- $database_daily->set_type( 'database' );
312
- $database_daily->set_schedule_start_time( determine_start_time( 'daily', array( 'hours' => '23', 'minutes' => '0' ) ) );
313
- $database_daily->set_reoccurrence( 'daily' );
314
- $database_daily->set_max_backups( 7 );
315
- $database_daily->save();
316
-
317
- /**
318
- * Schedule a complete backup to run weekly and store backups for
319
- * the last 3 months
320
- */
321
- $complete_weekly = new Scheduled_Backup( (string) ( time() + 1 ) );
322
- $complete_weekly->set_type( 'complete' );
323
- $complete_weekly->set_schedule_start_time( determine_start_time( 'weekly', array( 'day_of_week' => 'sunday', 'hours' => '3', 'minutes' => '0' ) ) );
324
- $complete_weekly->set_reoccurrence( 'weekly' );
325
- $complete_weekly->set_max_backups( 3 );
326
- $complete_weekly->save();
327
-
328
- $schedules->refresh_schedules();
329
-
330
- add_action( 'admin_notices', function() {
331
- echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has set up your default schedules.', 'backupwordpress' ) . '</strong> ' . __( 'By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules.', 'backupwordpress' ) . '</p></div>';
332
- } );
333
-
334
- }
335
-
336
- add_action( 'admin_init', '\HM\BackUpWordPress\setup_default_schedules', 11 );
337
-
338
- /**
339
- * Return an array of cron schedules
340
- *
341
- * @param $schedules
342
- * @return array $reccurrences
343
- */
344
- function cron_schedules( $schedules = array() ) {
345
-
346
- $schedules += array(
347
- 'hourly' => array( 'interval' => HOUR_IN_SECONDS, 'display' => __( 'Once Hourly', 'backupwordpress' ) ),
348
- 'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __( 'Twice Daily', 'backupwordpress' ) ),
349
- 'daily' => array( 'interval' => DAY_IN_SECONDS, 'display' => __( 'Once Daily', 'backupwordpress' ) ),
350
- 'weekly' => array( 'interval' => WEEK_IN_SECONDS, 'display' => __( 'Once Weekly', 'backupwordpress' ) ),
351
- 'fortnightly' => array( 'interval' => 2 * WEEK_IN_SECONDS, 'display' => __( 'Once Every Two Weeks', 'backupwordpress' ) ),
352
- 'monthly' => array( 'interval' => 30 * DAY_IN_SECONDS, 'display' => __( 'Once Monthly', 'backupwordpress' ) ),
353
- );
354
-
355
- return $schedules;
356
- }
357
-
358
- add_filter( 'cron_schedules', '\HM\BackUpWordPress\cron_schedules' );
359
-
360
- /**
361
- * Recursively delete a directory including
362
- * all the files and sub-directories.
363
- *
364
- * @param string $dir
365
- * @return bool
366
- * @return bool|WP_Error
367
- */
368
- function rmdirtree( $dir ) {
369
-
370
- if ( false !== strpos( Path::get_home_path(), $dir ) ) {
371
- return new WP_Error( 'hmbkp_invalid_action_error', sprintf( __( 'You can only delete directories inside your WordPress installation', 'backupwordpress' ) ) );
372
- }
373
-
374
- if ( is_file( $dir ) ) {
375
- @unlink( $dir );
376
- }
377
-
378
- if ( ! is_dir( $dir ) || ! is_readable( $dir ) ) {
379
- return false;
380
- }
381
-
382
- $files = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator( $dir, \RecursiveDirectoryIterator::SKIP_DOTS ), \RecursiveIteratorIterator::CHILD_FIRST, \RecursiveIteratorIterator::CATCH_GET_CHILD );
383
-
384
- foreach ( $files as $file ) {
385
-
386
- if ( $file->isDir() ) {
387
- @rmdir( $file->getPathname() );
388
- } else {
389
- @unlink( $file->getPathname() );
390
- }
391
- }
392
-
393
- @rmdir( $dir );
394
-
395
- return true;
396
-
397
- }
398
-
399
- /**
400
- * Check if we have read and write permission on the server
401
- *
402
- * @return bool
403
- */
404
- function has_server_permissions() {
405
-
406
- if ( ! wp_is_writable( Path::get_path() ) ) {
407
- return false;
408
- }
409
-
410
- if ( ! is_readable( Path::get_root() ) ) {
411
- return false;
412
- }
413
-
414
- return true;
415
- }
416
-
417
- /**
418
- * Check if a backup is possible with regards to file
419
- * permissions etc.
420
- *
421
- * @return bool
422
- */
423
- function is_backup_possible() {
424
-
425
- if ( ! has_server_permissions() || ! is_dir( Path::get_path() ) ) {
426
- return false;
427
- }
428
-
429
- if ( ! Requirement_Mysqldump_Command_Path::test() && ! Requirement_PDO::test() ) {
430
- return false;
431
- }
432
-
433
- if ( ! Requirement_Zip_Command_Path::test() && ! Requirement_Zip_Archive::test() ) {
434
- return false;
435
- }
436
-
437
- return true;
438
- }
439
-
440
- /**
441
- * Get the max email attachment filesize
442
- *
443
- * Can be overridden by defining HMBKP_ATTACHMENT_MAX_FILESIZE
444
- *
445
- * return int the filesize
446
- */
447
- function get_max_attachment_size() {
448
-
449
- $max_size = '10mb';
450
-
451
- if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) && wp_convert_hr_to_bytes( HMBKP_ATTACHMENT_MAX_FILESIZE ) ) {
452
- $max_size = HMBKP_ATTACHMENT_MAX_FILESIZE;
453
- }
454
-
455
- return wp_convert_hr_to_bytes( $max_size );
456
-
457
- }
458
-
459
- function is_path_accessible( $dir ) {
460
-
461
- // Path is inaccessible
462
- if ( strpos( $dir, Path::get_home_path() ) === false ) {
463
- return false;
464
- }
465
-
466
- return true;
467
- }
468
-
469
- /**
470
- * List of schedules
471
- *
472
- * @return array
473
- */
474
- function get_cron_schedules() {
475
- return cron_schedules();
476
- }
477
-
478
- /**
479
- * @param string $type the type of the schedule
480
- * @param array $times {
481
- * An array of time arguments. Optional.
482
- *
483
- * @type int $minutes The minute to start the schedule on. Defaults to current time + 10 minutes. Accepts
484
- * any valid `date( 'i' )` output.
485
- * @type int $hours The hour to start the schedule on. Defaults to current time + 10 minutes. Accepts
486
- * any valid `date( 'G' )` output.
487
- * @type string $day_of_week The day of the week to start the schedule on. Defaults to current time + 10 minutes. Accepts
488
- * any valid `date( 'l' )` output.
489
- * @type int $day_of_month The day of the month to start the schedule on. Defaults to current time + 10 minutes. Accepts
490
- * any valid `date( 'j' )` output.
491
- * @type int $now The current time. Defaults to `time()`. Accepts any valid timestamp.
492
- *
493
- * }
494
- * @return int $timestamp Returns the resulting timestamp on success and Int 0 on failure
495
- */
496
- function determine_start_time( $type, $times = array() ) {
497
-
498
- // Default to in 10 minutes
499
- if ( ! empty( $times['now'] ) ) {
500
- $default_timestamp = $times['now'] + 600;
501
-
502
- } else {
503
- $default_timestamp = time() + 600;
504
- }
505
-
506
- $default_times = array(
507
- 'minutes' => date( 'i', $default_timestamp ),
508
- 'hours' => date( 'G', $default_timestamp ),
509
- 'day_of_week' => date( 'l', $default_timestamp ),
510
- 'day_of_month' => date( 'j', $default_timestamp ),
511
- 'now' => time(),
512
- );
513
-
514
- $args = wp_parse_args( $times, $default_times );
515
-
516
- $intervals = get_cron_schedules();
517
-
518
- // Allow the hours and minutes to be overwritten by a constant
519
- if ( defined( 'HMBKP_SCHEDULE_TIME' ) && HMBKP_SCHEDULE_TIME ) {
520
- $hm = HMBKP_SCHEDULE_TIME;
521
- } else { // The hour and minute that the schedule should start on
522
- $hm = $args['hours'] . ':' . $args['minutes'] . ':00';
523
- }
524
-
525
- switch ( $type ) {
526
-
527
- case 'hourly' :
528
- case 'daily' :
529
- case 'twicedaily':
530
-
531
- // The next occurance of the specified time
532
- $schedule_start = $hm;
533
- break;
534
-
535
- case 'weekly' :
536
- case 'fortnightly' :
537
-
538
- // The next day of the week at the specified time
539
- $schedule_start = $args['day_of_week'] . ' ' . $hm;
540
- break;
541
-
542
- case 'monthly' :
543
-
544
- // The occurance of the time on the specified day of the month
545
- $schedule_start = date( 'F', $args['now'] ) . ' ' . $args['day_of_month'] . ' ' . $hm;
546
-
547
- // If we've already gone past that day this month then we'll need to start next month
548
- if ( strtotime( $schedule_start, $args['now'] ) <= $args['now'] ) {
549
- $schedule_start = date( 'F', strtotime( '+ 1 month', $args['now'] ) ) . ' ' . $args['day_of_month'] . ' ' . $hm;
550
- }
551
-
552
- // If that's still in the past then we'll need to jump to next year
553
- if ( strtotime( $schedule_start, $args['now'] ) <= $args['now'] ) {
554
- $schedule_start = date( 'F', strtotime( '+ 1 month', $args['now'] ) ) . ' ' . $args['day_of_month'] . ' ' . date( 'Y', strtotime( '+ 1 year', $args['now'] ) ) . ' ' . $hm;
555
- }
556
-
557
- break;
558
-
559
- default :
560
-
561
- return 0;
562
-
563
- }
564
-
565
- $timestamp = strtotime( $schedule_start, $args['now'] );
566
-
567
- // Convert to UTC
568
- $timestamp -= get_option( 'gmt_offset' ) * 3600;
569
-
570
- // If the scheduled time already passed then keep adding the interval until we get to a future date
571
- while ( $timestamp <= $args['now'] ) {
572
- $timestamp += $intervals[ $type ]['interval'];
573
- }
574
-
575
- return $timestamp;
576
-
577
- }
578
-
579
- /**
580
- * Helper function for creating safe action URLs.
581
- *
582
- * @param string $action Callback function name.
583
- * @param array $query_args Additional GET params.
584
- *
585
- * @return string
586
- */
587
- function admin_action_url( $action, array $query_args = array() ) {
588
-
589
- $query_args = array_merge( $query_args, array( 'action' => 'hmbkp_' . $action ) );
590
-
591
- return esc_url( wp_nonce_url( add_query_arg( $query_args, admin_url( 'admin-post.php' ) ), 'hmbkp_' . $action, 'hmbkp-' . $action . '_nonce' ) );
592
- }
593
-
594
- /**
595
- * OS dependant way to pipe stderr to null
596
- *
597
- * @return string The exec argument to pipe stderr to null
598
- */
599
- function ignore_stderr() {
600
-
601
- // If we're on Windows
602
- if ( DIRECTORY_SEPARATOR == '\\' ) {
603
- return '2>nul';
604
- }
605
-
606
- // Or Unix
607
- return '2>/dev/null';
608
-
609
- }
610
-
611
- /**
612
- * Return the contents of `$directory` as a single depth list ordered by total filesize.
613
- *
614
- * Will schedule background threads to recursively calculate the filesize of subdirectories.
615
- * The total filesize of each directory and subdirectory is cached in a transient for 1 week.
616
- *
617
- * @param string $directory The directory to list
618
- *
619
- * @todo doesn't really belong in this class, should just be a function
620
- * @return array returns an array of files ordered by filesize
621
- */
622
- function list_directory_by_total_filesize( $directory, Excludes $excludes ) {
623
-
624
- $files = $files_with_no_size = $empty_files = $files_with_size = $unreadable_files = array();
625
-
626
- if ( ! is_dir( $directory ) ) {
627
- return $files;
628
- }
629
-
630
- $finder = new \Symfony\Component\Finder\Finder();
631
- $finder->followLinks();
632
- $finder->ignoreDotFiles( false );
633
- $finder->ignoreUnreadableDirs();
634
- $finder->depth( '== 0' );
635
-
636
- $site_size = new Site_Size( 'file', $excludes );
637
-
638
- $files = $finder->in( $directory );
639
-
640
- foreach ( $files as $entry ) {
641
-
642
- // Get the total filesize for each file and directory
643
- $filesize = $site_size->filesize( $entry );
644
-
645
- if ( $filesize ) {
646
-
647
- // If there is already a file with exactly the same filesize then let's keep increasing the filesize of this one until we don't have a clash
648
- while ( array_key_exists( $filesize, $files_with_size ) ) {
649
- $filesize ++;
650
- }
651
-
652
- $files_with_size[ $filesize ] = $entry;
653
-
654
- } elseif ( 0 === $filesize ) {
655
- $empty_files[] = $entry;
656
- } else {
657
- $files_with_no_size[] = $entry;
658
- }
659
- }
660
-
661
- // Sort files by filesize, largest first
662
- krsort( $files_with_size );
663
-
664
- // Add 0 byte files / directories to the bottom
665
- $files = $files_with_size + array_merge( $empty_files, $unreadable_files );
666
-
667
- // Add directories that are still calculating to the top
668
- if ( $files_with_no_size ) {
669
-
670
- // We have to loop as merging or concatenating the array would re-flow the keys which we don't want because the filesize is stored in the key
671
- foreach ( $files_with_no_size as $entry ) {
672
- array_unshift( $files, $entry );
673
- }
674
- }
675
-
676
- return $files;
677
-
678
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Handles anything that needs to be
7
+ * done when the plugin is updated
8
+ */
9
+ function update() {
10
+
11
+ // Update from backUpWordPress 0.4.5
12
+ if ( get_option( 'bkpwp_max_backups' ) ) {
13
+
14
+ // Carry over the custom path
15
+ if ( $legacy_path = get_option( 'bkpwppath' ) ) {
16
+ update_option( 'hmbkp_path', $legacy_path );
17
+ }
18
+
19
+ // Options to remove
20
+ $legacy_options = array(
21
+ 'bkpwp_archive_types',
22
+ 'bkpwp_automail_from',
23
+ 'bkpwp_domain',
24
+ 'bkpwp_domain_path',
25
+ 'bkpwp_easy_mode',
26
+ 'bkpwp_excludelists',
27
+ 'bkpwp_install_user',
28
+ 'bkpwp_listmax_backups',
29
+ 'bkpwp_max_backups',
30
+ 'bkpwp_presets',
31
+ 'bkpwp_reccurrences',
32
+ 'bkpwp_schedules',
33
+ 'bkpwp_calculation',
34
+ 'bkpwppath',
35
+ 'bkpwp_status_config',
36
+ 'bkpwp_status',
37
+ );
38
+
39
+ foreach ( $legacy_options as $option ) {
40
+ delete_option( $option );
41
+ }
42
+
43
+ global $wp_roles;
44
+
45
+ $wp_roles->remove_cap( 'administrator', 'manage_backups' );
46
+ $wp_roles->remove_cap( 'administrator', 'download_backups' );
47
+
48
+ wp_clear_scheduled_hook( 'bkpwp_schedule_bkpwp_hook' );
49
+
50
+ }
51
+
52
+ // Version 1 to 2
53
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '2.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
54
+
55
+ /**
56
+ * Setup a backwards compatible schedule
57
+ */
58
+ $legacy_schedule = new Scheduled_Backup( 'backup' );
59
+
60
+ // Backup type
61
+ if ( ( defined( 'HMBKP_FILES_ONLY' ) && HMBKP_FILES_ONLY ) || get_option( 'hmbkp_files_only' ) ) {
62
+ $legacy_schedule->set_type( 'file' );
63
+ } elseif ( ( defined( 'HMBKP_DATABASE_ONLY' ) && HMBKP_DATABASE_ONLY ) || get_option( 'hmbkp_database_only' ) ) {
64
+ $legacy_schedule->set_type( 'database' );
65
+ } else {
66
+ $legacy_schedule->set_type( 'complete' );
67
+ }
68
+
69
+ // Daily schedule time
70
+ if ( defined( 'HMBKP_DAILY_SCHEDULE_TIME' ) && HMBKP_DAILY_SCHEDULE_TIME ) {
71
+ $legacy_schedule->set_schedule_start_time( strtotime( HMBKP_DAILY_SCHEDULE_TIME ) );
72
+ }
73
+
74
+ // Backup schedule
75
+ $legacy_schedule->set_reoccurrence( get_option( 'hmbkp_schedule_frequency', 'daily' ) );
76
+
77
+ // Automatic backups disabled?
78
+ if ( ( defined( 'HMBKP_DISABLE_AUTOMATIC_BACKUP' ) && HMBKP_DISABLE_AUTOMATIC_BACKUP ) || get_option( 'hmbkp_disable_automatic_backup' ) ) {
79
+ $legacy_schedule->set_reoccurrence( 'manually' );
80
+ }
81
+
82
+ // Max backups
83
+ if ( defined( 'HMBKP_MAX_BACKUPS' ) && is_numeric( HMBKP_MAX_BACKUPS ) ) {
84
+ $legacy_schedule->set_max_backups( (int) HMBKP_MAX_BACKUPS );
85
+ } else {
86
+ $legacy_schedule->set_max_backups( (int) get_option( 'hmbkp_max_backups', 10 ) );
87
+ }
88
+
89
+ // Excludes
90
+ if ( get_option( 'hmbkp_excludes' ) ) {
91
+ $legacy_schedule->set_excludes( get_option( 'hmbkp_excludes' ) );
92
+ }
93
+
94
+ // Backup email
95
+ if ( defined( 'HMBKP_EMAIL' ) && is_email( HMBKP_EMAIL ) ) {
96
+ $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => HMBKP_EMAIL ) );
97
+ } elseif ( is_email( get_option( 'hmbkp_email_address' ) ) ) {
98
+ $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => get_option( 'hmbkp_email_address' ) ) );
99
+ }
100
+
101
+ // Set the archive filename to what it used to be
102
+ $legacy_schedule->backup_filename = implode( '-', array( get_bloginfo( 'name' ), 'backup', current_time( 'Y-m-d-H-i-s' ) ) ) . '.zip';
103
+
104
+ $legacy_schedule->save();
105
+
106
+ $legacy_path = get_option( 'hmbkp_path' );
107
+
108
+ if ( $legacy_path ) {
109
+
110
+ // Prepend 'backup-' to the beginning of any legacy backups so they are picked up by the legacy schedule
111
+ if ( $handle = opendir( $legacy_path ) ) {
112
+ while ( false !== ( $file = readdir( $handle ) ) ) {
113
+ if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) ) {
114
+ rename( trailingslashit( $legacy_path ) . $file, trailingslashit( $legacy_path ) . 'backup-' . $file );
115
+ }
116
+ }
117
+ closedir( $handle );
118
+ }
119
+
120
+ PATH::get_instance()->move_old_backups( $legacy_path );
121
+
122
+ }
123
+
124
+ // Remove the legacy options
125
+ foreach ( array( 'hmbkp_database_only', 'hmbkp_files_only', 'hmbkp_max_backups', 'hmbkp_email_address', 'hmbkp_email', 'hmbkp_schedule_frequency', 'hmbkp_disable_automatic_backup' ) as $option_name ) {
126
+ delete_option( $option_name );
127
+ }
128
+ }
129
+
130
+ // Update from 2.x to 3.0
131
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '2.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
132
+
133
+ // Remove the plugin data cache
134
+ delete_transient( 'hmbkp_plugin_data' );
135
+
136
+ }
137
+
138
+ // Update to 3.1
139
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
140
+
141
+ // Remove the plugin data cache
142
+ delete_option( 'hmbkp_path' );
143
+ delete_option( 'hmbkp_default_path' );
144
+
145
+ }
146
+
147
+ // update to 3.1.4
148
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.1.4', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
149
+
150
+ $old_option_names = array(
151
+ 'HM\BackUpWordPressDropbox\Dropbox_Service' => 'dropbox',
152
+ 'HMBKP_DX_Backup_Service' => 'dropbox',
153
+ 'HM\BackUpWordPressFTP\FTP_Backup_Service' => 'ftp',
154
+ 'HMBKP_FTP_Backup_Service' => 'ftp',
155
+ 'HM\BackUpWordPressGDrive\Google_Drive_BackUp' => 'google-drive',
156
+ 'HMBKP_GDV_Backup_Service' => 'google-drive',
157
+ 'HM\BackUpWordPressRackspace\RackSpace_BackUp' => 'rackspace-cloud',
158
+ 'HMBKP_RSC_Backup_Service' => 'rackspace-cloud',
159
+ 'HM\BackUpWordPressS3\S3_Backup' => 's3',
160
+ 'HMBKP_S3_Backup_Service' => 's3',
161
+ 'HM\BackUpWordPressWinAzure\WinAzure_Backup' => 'azure',
162
+ 'HMBKP_WAZ_Backup_Service' => 'azure',
163
+ 'HM\BackUpWordPress\Email_Service' => 'email',
164
+ );
165
+
166
+ global $wpdb;
167
+
168
+ // Get all schedule options with a SELECT query and delete them.
169
+ $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) );
170
+
171
+ if ( 0 < count( $schedules ) ) {
172
+
173
+ // Access each schedules settings to see if the addon settings names need to be be updated to the new naming convention which uses the service slug generated from the $name property.
174
+ foreach ( $schedules as $schedule_id ) {
175
+
176
+ // Load the settings for this schedule into an array
177
+ // so we can loop through the different service settings
178
+ $schedule_settings = get_option( $schedule_id );
179
+
180
+ // Iterate over each schedule setting for this schedule and check its name against our array.
181
+ foreach ( $schedule_settings as $key => $val ) {
182
+ // Find the current element key in our control array and get its value. Set a new element in the settings array with the found value as its key. Aka rename the element key
183
+ if ( array_key_exists( $key, $old_option_names ) ) {
184
+
185
+ // move the value to our new key
186
+ $schedule_settings[ $old_option_names[ $key ] ] = $schedule_settings[ $key ];
187
+
188
+ unset( $schedule_settings[ $key ] );
189
+
190
+ }
191
+ }
192
+
193
+ // Save back to the DB
194
+ update_option( $schedule_id, $schedule_settings );
195
+ }
196
+ }
197
+ }
198
+
199
+ // Update to 3.1.5
200
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.1.5', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
201
+
202
+ // Delete all transients
203
+ $transients = array(
204
+ 'hmbkp_plugin_data',
205
+ 'hmbkp_directory_filesizes',
206
+ 'hmbkp_directory_filesizes_running',
207
+ 'hmbkp_wp_cron_test_beacon',
208
+ 'hm_backdrop',
209
+ );
210
+
211
+ array_map( 'delete_transient', $transients );
212
+
213
+ // Clear duplicate schedules on multisite
214
+ if ( is_multisite() ) {
215
+
216
+ // get current blogs from DB
217
+ $blogs = wp_get_sites();
218
+
219
+ foreach ( $blogs as $blog ) {
220
+
221
+ switch_to_blog( get_current_blog_id() );
222
+
223
+ if ( is_main_site( get_current_blog_id() ) ) {
224
+ continue;
225
+ }
226
+
227
+ global $wpdb;
228
+
229
+ // Get the schedule options
230
+ $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) );
231
+
232
+ // clear schedules
233
+ foreach ( array_map( function ( $item ) {
234
+ return ltrim( $item, 'hmbkp_schedule_' );
235
+ }, $schedules ) as $item ) {
236
+ wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $item ) );
237
+ }
238
+
239
+ // delete options
240
+ array_map( 'delete_option', $schedules );
241
+
242
+ array_map( 'delete_option', array( 'hmbkp_enable_support', 'hmbkp_plugin_version', 'hmbkp_path', 'hmbkp_default_path', 'hmbkp_upsell' ) );
243
+
244
+ // Delete all transients
245
+ array_map( 'delete_transient', array( 'hmbkp_plugin_data', 'hmbkp_directory_filesizes', 'hmbkp_directory_filesize_running', 'timeout_hmbkp_wp_cron_test_beacon', 'hmbkp_wp_cron_test_beacon' ) );
246
+
247
+ }
248
+
249
+ restore_current_blog();
250
+ }
251
+ }
252
+
253
+ // Update from 3.3.0
254
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.3.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
255
+
256
+ $schedules = Schedules::get_instance();
257
+
258
+ // Loop through all schedules and re-set the reccurrence to include hmbkp_
259
+ foreach ( $schedules->get_schedules() as $schedule ) {
260
+
261
+ $reoccurrence = $schedule->get_reoccurrence();
262
+
263
+ if ( 'manually' !== $reoccurrence && strpos( $reoccurrence, 'hmbkp_' ) === 0 ) {
264
+ $schedule->set_reoccurrence( substr( $reoccurrence, 6 ) );
265
+ }
266
+
267
+ $schedule->save();
268
+
269
+ }
270
+ }
271
+
272
+ // Update from 3.3.4
273
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.4.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) {
274
+ delete_transient( 'hmbkp_directory_filesizes' );
275
+ }
276
+
277
+ // Every update
278
+ if ( get_option( 'hmbkp_plugin_version' ) && version_compare( Plugin::PLUGIN_VERSION, get_option( 'hmbkp_plugin_version' ), '>' ) ) {
279
+
280
+ require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' );
281
+
282
+ \HMBKP_Setup::deactivate();
283
+
284
+ Path::get_instance()->protect_path( 'reset' );
285
+
286
+ }
287
+
288
+ // Update the stored version
289
+ if ( get_option( 'hmbkp_plugin_version' ) !== Plugin::PLUGIN_VERSION ) {
290
+ update_option( 'hmbkp_plugin_version', Plugin::PLUGIN_VERSION );
291
+ }
292
+
293
+ }
294
+
295
+ /**
296
+ * Setup the default backup schedules
297
+ */
298
+ function setup_default_schedules() {
299
+
300
+ $schedules = Schedules::get_instance();
301
+
302
+ if ( $schedules->get_schedules() ) {
303
+ return;
304
+ }
305
+
306
+ /**
307
+ * Schedule a database backup daily and store backups
308
+ * for the last 2 weeks
309
+ */
310
+ $database_daily = new Scheduled_Backup( (string) time() );
311
+ $database_daily->set_type( 'database' );
312
+ $database_daily->set_schedule_start_time( determine_start_time( 'daily', array( 'hours' => '23', 'minutes' => '0' ) ) );
313
+ $database_daily->set_reoccurrence( 'daily' );
314
+ $database_daily->set_max_backups( 7 );
315
+ $database_daily->save();
316
+
317
+ /**
318
+ * Schedule a complete backup to run weekly and store backups for
319
+ * the last 3 months
320
+ */
321
+ $complete_weekly = new Scheduled_Backup( (string) ( time() + 1 ) );
322
+ $complete_weekly->set_type( 'complete' );
323
+ $complete_weekly->set_schedule_start_time( determine_start_time( 'weekly', array( 'day_of_week' => 'sunday', 'hours' => '3', 'minutes' => '0' ) ) );
324
+ $complete_weekly->set_reoccurrence( 'weekly' );
325
+ $complete_weekly->set_max_backups( 3 );
326
+ $complete_weekly->save();
327
+
328
+ $schedules->refresh_schedules();
329
+
330
+ add_action( 'admin_notices', function() {
331
+ echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has set up your default schedules.', 'backupwordpress' ) . '</strong> ' . __( 'By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules.', 'backupwordpress' ) . '</p></div>';
332
+ } );
333
+
334
+ }
335
+
336
+ add_action( 'admin_init', '\HM\BackUpWordPress\setup_default_schedules', 11 );
337
+
338
+ /**
339
+ * Return an array of cron schedules
340
+ *
341
+ * @param $schedules
342
+ * @return array $reccurrences
343
+ */
344
+ function cron_schedules( $schedules = array() ) {
345
+
346
+ $schedules += array(
347
+ 'hourly' => array( 'interval' => HOUR_IN_SECONDS, 'display' => __( 'Once Hourly', 'backupwordpress' ) ),
348
+ 'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __( 'Twice Daily', 'backupwordpress' ) ),
349
+ 'daily' => array( 'interval' => DAY_IN_SECONDS, 'display' => __( 'Once Daily', 'backupwordpress' ) ),
350
+ 'weekly' => array( 'interval' => WEEK_IN_SECONDS, 'display' => __( 'Once Weekly', 'backupwordpress' ) ),
351
+ 'fortnightly' => array( 'interval' => 2 * WEEK_IN_SECONDS, 'display' => __( 'Once Every Two Weeks', 'backupwordpress' ) ),
352
+ 'monthly' => array( 'interval' => 30 * DAY_IN_SECONDS, 'display' => __( 'Once Monthly', 'backupwordpress' ) ),
353
+ );
354
+
355
+ return $schedules;
356
+ }
357
+
358
+ add_filter( 'cron_schedules', '\HM\BackUpWordPress\cron_schedules' );
359
+
360
+ /**
361
+ * Recursively delete a directory including
362
+ * all the files and sub-directories.
363
+ *
364
+ * @param string $dir
365
+ * @return bool
366
+ * @return bool|WP_Error
367
+ */
368
+ function rmdirtree( $dir ) {
369
+
370
+ if ( false !== strpos( Path::get_home_path(), $dir ) ) {
371
+ return new WP_Error( 'hmbkp_invalid_action_error', sprintf( __( 'You can only delete directories inside your WordPress installation', 'backupwordpress' ) ) );
372
+ }
373
+
374
+ if ( is_file( $dir ) ) {
375
+ @unlink( $dir );
376
+ }
377
+
378
+ if ( ! is_dir( $dir ) || ! is_readable( $dir ) ) {
379
+ return false;
380
+ }
381
+
382
+ $files = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator( $dir, \RecursiveDirectoryIterator::SKIP_DOTS ), \RecursiveIteratorIterator::CHILD_FIRST, \RecursiveIteratorIterator::CATCH_GET_CHILD );
383
+
384
+ foreach ( $files as $file ) {
385
+
386
+ if ( $file->isDir() ) {
387
+ @rmdir( $file->getPathname() );
388
+ } else {
389
+ @unlink( $file->getPathname() );
390
+ }
391
+ }
392
+
393
+ @rmdir( $dir );
394
+
395
+ return true;
396
+
397
+ }
398
+
399
+ /**
400
+ * Check if we have read and write permission on the server
401
+ *
402
+ * @return bool
403
+ */
404
+ function has_server_permissions() {
405
+
406
+ if ( ! wp_is_writable( Path::get_path() ) ) {
407
+ return false;
408
+ }
409
+
410
+ if ( ! is_readable( Path::get_root() ) ) {
411
+ return false;
412
+ }
413
+
414
+ return true;
415
+ }
416
+
417
+ /**
418
+ * Check if a backup is possible with regards to file
419
+ * permissions etc.
420
+ *
421
+ * @return bool
422
+ */
423
+ function is_backup_possible() {
424
+
425
+ if ( ! has_server_permissions() || ! is_dir( Path::get_path() ) ) {
426
+ return false;
427
+ }
428
+
429
+ if ( ! Requirement_Mysqldump_Command_Path::test() && ! Requirement_PDO::test() ) {
430
+ return false;
431
+ }
432
+
433
+ if ( ! Requirement_Zip_Command_Path::test() && ! Requirement_Zip_Archive::test() ) {
434
+ return false;
435
+ }
436
+
437
+ return true;
438
+ }
439
+
440
+ /**
441
+ * Get the max email attachment filesize
442
+ *
443
+ * Can be overridden by defining HMBKP_ATTACHMENT_MAX_FILESIZE
444
+ *
445
+ * return int the filesize
446
+ */
447
+ function get_max_attachment_size() {
448
+
449
+ $max_size = '10mb';
450
+
451
+ if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) && wp_convert_hr_to_bytes( HMBKP_ATTACHMENT_MAX_FILESIZE ) ) {
452
+ $max_size = HMBKP_ATTACHMENT_MAX_FILESIZE;
453
+ }
454
+
455
+ return wp_convert_hr_to_bytes( $max_size );
456
+
457
+ }
458
+
459
+ function is_path_accessible( $dir ) {
460
+
461
+ // Path is inaccessible
462
+ if ( strpos( $dir, Path::get_home_path() ) === false ) {
463
+ return false;
464
+ }
465
+
466
+ return true;
467
+ }
468
+
469
+ /**
470
+ * List of schedules
471
+ *
472
+ * @return array
473
+ */
474
+ function get_cron_schedules() {
475
+ return cron_schedules();
476
+ }
477
+
478
+ /**
479
+ * @param string $type the type of the schedule
480
+ * @param array $times {
481
+ * An array of time arguments. Optional.
482
+ *
483
+ * @type int $minutes The minute to start the schedule on. Defaults to current time + 10 minutes. Accepts
484
+ * any valid `date( 'i' )` output.
485
+ * @type int $hours The hour to start the schedule on. Defaults to current time + 10 minutes. Accepts
486
+ * any valid `date( 'G' )` output.
487
+ * @type string $day_of_week The day of the week to start the schedule on. Defaults to current time + 10 minutes. Accepts
488
+ * any valid `date( 'l' )` output.
489
+ * @type int $day_of_month The day of the month to start the schedule on. Defaults to current time + 10 minutes. Accepts
490
+ * any valid `date( 'j' )` output.
491
+ * @type int $now The current time. Defaults to `time()`. Accepts any valid timestamp.
492
+ *
493
+ * }
494
+ * @return int $timestamp Returns the resulting timestamp on success and Int 0 on failure
495
+ */
496
+ function determine_start_time( $type, $times = array() ) {
497
+
498
+ // Default to in 10 minutes
499
+ if ( ! empty( $times['now'] ) ) {
500
+ $default_timestamp = $times['now'] + 600;
501
+
502
+ } else {
503
+ $default_timestamp = time() + 600;
504
+ }
505
+
506
+ $default_times = array(
507
+ 'minutes' => date( 'i', $default_timestamp ),
508
+ 'hours' => date( 'G', $default_timestamp ),
509
+ 'day_of_week' => date( 'l', $default_timestamp ),
510
+ 'day_of_month' => date( 'j', $default_timestamp ),
511
+ 'now' => time(),
512
+ );
513
+
514
+ $args = wp_parse_args( $times, $default_times );
515
+
516
+ $intervals = get_cron_schedules();
517
+
518
+ // Allow the hours and minutes to be overwritten by a constant
519
+ if ( defined( 'HMBKP_SCHEDULE_TIME' ) && HMBKP_SCHEDULE_TIME ) {
520
+ $hm = HMBKP_SCHEDULE_TIME;
521
+ } else { // The hour and minute that the schedule should start on
522
+ $hm = $args['hours'] . ':' . $args['minutes'] . ':00';
523
+ }
524
+
525
+ switch ( $type ) {
526
+
527
+ case 'hourly' :
528
+ case 'daily' :
529
+ case 'twicedaily':
530
+
531
+ // The next occurance of the specified time
532
+ $schedule_start = $hm;
533
+ break;
534
+
535
+ case 'weekly' :
536
+ case 'fortnightly' :
537
+
538
+ // The next day of the week at the specified time
539
+ $schedule_start = $args['day_of_week'] . ' ' . $hm;
540
+ break;
541
+
542
+ case 'monthly' :
543
+
544
+ // The occurance of the time on the specified day of the month
545
+ $schedule_start = date( 'F', $args['now'] ) . ' ' . $args['day_of_month'] . ' ' . $hm;
546
+
547
+ // If we've already gone past that day this month then we'll need to start next month
548
+ if ( strtotime( $schedule_start, $args['now'] ) <= $args['now'] ) {
549
+ $schedule_start = date( 'F', strtotime( '+ 1 month', $args['now'] ) ) . ' ' . $args['day_of_month'] . ' ' . $hm;
550
+ }
551
+
552
+ // If that's still in the past then we'll need to jump to next year
553
+ if ( strtotime( $schedule_start, $args['now'] ) <= $args['now'] ) {
554
+ $schedule_start = date( 'F', strtotime( '+ 1 month', $args['now'] ) ) . ' ' . $args['day_of_month'] . ' ' . date( 'Y', strtotime( '+ 1 year', $args['now'] ) ) . ' ' . $hm;
555
+ }
556
+
557
+ break;
558
+
559
+ default :
560
+
561
+ return 0;
562
+
563
+ }
564
+
565
+ $timestamp = strtotime( $schedule_start, $args['now'] );
566
+
567
+ // Convert to UTC
568
+ $timestamp -= get_option( 'gmt_offset' ) * 3600;
569
+
570
+ // If the scheduled time already passed then keep adding the interval until we get to a future date
571
+ while ( $timestamp <= $args['now'] ) {
572
+ $timestamp += $intervals[ $type ]['interval'];
573
+ }
574
+
575
+ return $timestamp;
576
+
577
+ }
578
+
579
+ /**
580
+ * Helper function for creating safe action URLs.
581
+ *
582
+ * @param string $action Callback function name.
583
+ * @param array $query_args Additional GET params.
584
+ *
585
+ * @return string
586
+ */
587
+ function admin_action_url( $action, array $query_args = array() ) {
588
+
589
+ $query_args = array_merge( $query_args, array( 'action' => 'hmbkp_' . $action ) );
590
+
591
+ return esc_url( wp_nonce_url( add_query_arg( $query_args, admin_url( 'admin-post.php' ) ), 'hmbkp_' . $action, 'hmbkp-' . $action . '_nonce' ) );
592
+ }
593
+
594
+ /**
595
+ * OS dependant way to pipe stderr to null
596
+ *
597
+ * @return string The exec argument to pipe stderr to null
598
+ */
599
+ function ignore_stderr() {
600
+
601
+ // If we're on Windows
602
+ if ( DIRECTORY_SEPARATOR == '\\' ) {
603
+ return '2>nul';
604
+ }
605
+
606
+ // Or Unix
607
+ return '2>/dev/null';
608
+
609
+ }
610
+
611
+ /**
612
+ * Return the contents of `$directory` as a single depth list ordered by total filesize.
613
+ *
614
+ * Will schedule background threads to recursively calculate the filesize of subdirectories.
615
+ * The total filesize of each directory and subdirectory is cached in a transient for 1 week.
616
+ *
617
+ * @param string $directory The directory to list
618
+ *
619
+ * @todo doesn't really belong in this class, should just be a function
620
+ * @return array returns an array of files ordered by filesize
621
+ */
622
+ function list_directory_by_total_filesize( $directory, Excludes $excludes ) {
623
+
624
+ $files = $files_with_no_size = $empty_files = $files_with_size = $unreadable_files = array();
625
+
626
+ if ( ! is_dir( $directory ) ) {
627
+ return $files;
628
+ }
629
+
630
+ $finder = new \Symfony\Component\Finder\Finder();
631
+ $finder->followLinks();
632
+ $finder->ignoreDotFiles( false );
633
+ $finder->ignoreUnreadableDirs();
634
+ $finder->depth( '== 0' );
635
+
636
+ $site_size = new Site_Size( 'file', $excludes );
637
+
638
+ $files = $finder->in( $directory );
639
+
640
+ foreach ( $files as $entry ) {
641
+
642
+ // Get the total filesize for each file and directory
643
+ $filesize = $site_size->filesize( $entry );
644
+
645
+ if ( $filesize ) {
646
+
647
+ // If there is already a file with exactly the same filesize then let's keep increasing the filesize of this one until we don't have a clash
648
+ while ( array_key_exists( $filesize, $files_with_size ) ) {
649
+ $filesize ++;
650
+ }
651
+
652
+ $files_with_size[ $filesize ] = $entry;
653
+
654
+ } elseif ( 0 === $filesize ) {
655
+ $empty_files[] = $entry;
656
+ } else {
657
+ $files_with_no_size[] = $entry;
658
+ }
659
+ }
660
+
661
+ // Sort files by filesize, largest first
662
+ krsort( $files_with_size );
663
+
664
+ // Add 0 byte files / directories to the bottom
665
+ $files = $files_with_size + array_merge( $empty_files, $unreadable_files );
666
+
667
+ // Add directories that are still calculating to the top
668
+ if ( $files_with_no_size ) {
669
+
670
+ // We have to loop as merging or concatenating the array would re-flow the keys which we don't want because the filesize is stored in the key
671
+ foreach ( $files_with_no_size as $entry ) {
672
+ array_unshift( $files, $entry );
673
+ }
674
+ }
675
+
676
+ return $files;
677
+
678
+ }
functions/interface.php CHANGED
@@ -1,528 +1,523 @@
1
- <?php
2
-
3
- namespace HM\BackUpWordPress;
4
-
5
- /**
6
- * Displays a row in the manage backups table
7
- *
8
- * @param string $file
9
- * @param Scheduled_Backup $schedule
10
- */
11
- function get_backup_row( $file, Scheduled_Backup $schedule ) {
12
-
13
- $encoded_file = urlencode( base64_encode( $file ) );
14
- $offset = get_option( 'gmt_offset' ) * 3600;
15
-
16
- ?>
17
-
18
- <tr class="hmbkp_manage_backups_row">
19
-
20
- <th scope="row">
21
- <?php echo esc_html( date_i18n( get_option( 'date_format' ) . ' - ' . get_option( 'time_format' ), @filemtime( $file ) + $offset ) ); ?>
22
- </th>
23
-
24
- <td class="code">
25
- <?php echo esc_html( size_format( @filesize( $file ) ) ); ?>
26
- </td>
27
-
28
- <td><?php echo esc_html( human_get_type( $file, $schedule ) ); ?></td>
29
-
30
- <td>
31
-
32
- <?php if ( is_path_accessible( Path::get_path() ) ) : ?>
33
- <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'hmbkp_backup_archive' => $encoded_file, 'hmbkp_schedule_id' => $schedule->get_id(), 'action' => 'hmbkp_request_download_backup' ), admin_url( 'admin-post.php' ) ), 'hmbkp_download_backup', 'hmbkp_download_backup_nonce' ) ); ?>" class="download-action"><?php _e( 'Download', 'backupwordpress' ); ?></a> |
34
- <?php endif; ?>
35
-
36
- <a href="<?php echo esc_url( wp_nonce_url(
37
- add_query_arg( array(
38
- 'hmbkp_backup_archive' => $encoded_file,
39
- 'hmbkp_schedule_id' => $schedule->get_id(),
40
- 'action' => 'hmbkp_request_delete_backup',
41
- ),
42
- admin_url( 'admin-post.php' )
43
- ),
44
- 'hmbkp_delete_backup',
45
- 'hmbkp_delete_backup_nonce'
46
- ) ); ?>" class="delete-action">
47
- <?php esc_html_e( 'Delete', 'backupwordpress' ); ?>
48
- </a>
49
-
50
- </td>
51
-
52
- </tr>
53
-
54
- <?php }
55
-
56
- /**
57
- * Displays admin notices for various error / warning conditions.
58
- *
59
- * @return void
60
- */
61
- function admin_notices() {
62
-
63
- $current_screen = get_current_screen();
64
-
65
- if ( ! isset( $current_screen ) ) {
66
- return;
67
- }
68
-
69
- $page = is_multisite() ? HMBKP_ADMIN_PAGE . '-network' : HMBKP_ADMIN_PAGE;
70
- if ( $current_screen->id !== $page ) {
71
- return;
72
- }
73
-
74
- $notices = Notices::get_instance()->get_notices();
75
-
76
- if ( empty( $notices ) ) {
77
- return;
78
- }
79
-
80
- ob_start(); ?>
81
-
82
- <?php if ( ! empty( $notices['backup_errors'] ) ) : ?>
83
-
84
- <div id="hmbkp-warning-backup" class="error notice is-dismissible">
85
- <p>
86
- <strong><?php _e( 'BackUpWordPress detected issues with your last backup.', 'backupwordpress' ); ?></strong>
87
- </p>
88
-
89
- <ul>
90
-
91
- <?php foreach ( $notices['backup_errors'] as $notice ) : ?>
92
- <li><pre><?php echo esc_html( $notice ); ?></pre></li>
93
- <?php endforeach; ?>
94
-
95
- </ul>
96
-
97
- </div>
98
-
99
- <?php endif; ?>
100
-
101
- <?php if ( ! empty( $notices['server_config'] ) ) : ?>
102
-
103
- <div id="hmbkp-warning-server" class="error notice">
104
-
105
- <ul>
106
-
107
- <?php foreach ( $notices['server_config'] as $notice ) : ?>
108
-
109
- <li>
110
- <?php print_whitelist_html(
111
- $notice,
112
- 'strong, b, i, em, code, a'
113
- ); ?>
114
- </li>
115
-
116
- <?php endforeach; ?>
117
-
118
- </ul>
119
-
120
- </div>
121
-
122
- <?php endif; ?>
123
-
124
- <?php $notices = array_filter( $notices );
125
-
126
- if ( ! empty( $notices ) ) : ?>
127
-
128
- <?php foreach ( $notices as $key => $notice_type ) : ?>
129
-
130
- <?php if ( ! ( in_array( $key, array( 'server_config', 'backup_errors' ) ) ) ) : ?>
131
-
132
- <div id="hmbkp-warning-other" class="error notice is-dismissible">
133
-
134
- <?php foreach ( array_unique( $notice_type ) as $msg ) : ?>
135
-
136
- <p><?php echo wp_kses_data( $msg ); ?></p>
137
-
138
- <?php endforeach; ?>
139
-
140
- </div>
141
-
142
- <?php endif; ?>
143
-
144
- <?php endforeach; ?>
145
-
146
- <?php endif; ?>
147
-
148
- <?php echo ob_get_clean();
149
-
150
- }
151
- add_action( 'admin_notices', 'HM\BackUpWordPress\admin_notices' );
152
- add_action( 'network_admin_notices', 'HM\BackUpWordPress\admin_notices' );
153
-
154
- function set_server_config_notices() {
155
-
156
- $notices = Notices::get_instance();
157
- $messages = array();
158
-
159
- if ( Backup_Utilities::is_safe_mode_on() ) {
160
-
161
- $messages[] = sprintf(
162
- /* translators: 1: The `PHP` abbreviation. */
163
- __( '%1$s is running in <a href="http://php.net/manual/en/features.safe-mode.php">Safe Mode</a>, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst <code>Safe Mode</code> is on.', 'backupwordpress' ),
164
- '<code>PHP</code>'
165
- );
166
- }
167
-
168
- if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) {
169
-
170
- // Suppress open_basedir warning https://bugs.php.net/bug.php?id=53041
171
- if ( ! path_in_php_open_basedir( HMBKP_PATH ) ) {
172
-
173
- $messages[] = sprintf(
174
- __( 'Your server has an %1$s restriction in effect and your custom backups directory (%2$s) is not within the allowed path(s): (%3$s).', 'backupwordpress' ),
175
- '<code>open_basedir</code>',
176
- '<code>' . esc_html( HMBKP_PATH ) . '</code>',
177
- '<code>' . esc_html( @ini_get( 'open_basedir' ) ) . '</code>'
178
- );
179
-
180
- } elseif ( ! is_dir( HMBKP_PATH ) ) {
181
-
182
- $messages[] = sprintf(
183
- __( 'Your custom backups directory (%1$s) doesn&apos;t exist, your backups will be saved to %2$s instead.', 'backupwordpress' ),
184
- '<code>' . esc_html( HMBKP_PATH ) . '</code>',
185
- '<code>' . esc_html( Path::get_path() ) . '</code>'
186
- );
187
-
188
- } elseif ( is_dir( HMBKP_PATH ) && ! wp_is_writable( HMBKP_PATH ) ) {
189
-
190
- $messages[] = sprintf(
191
- __( 'Your custom backups directory (%1$s) isn&apos;t writable, new backups will be saved to %2$s instead.', 'backupwordpress' ),
192
- '<code>' . esc_html( HMBKP_PATH ) . '</code>',
193
- '<code>' . esc_html( Path::get_path() ) . '</code>'
194
- );
195
- }
196
- }
197
-
198
- if ( ! is_dir( Path::get_path() ) || is_dir( Path::get_path() ) && ! wp_is_writable( Path::get_path() ) ) {
199
-
200
- if ( isset( $_GET['creation_error'] ) ) {
201
-
202
- $messages[] = sprintf(
203
- /* translators: 1: URL to BackupWordPress docs. */
204
- __( 'We connected to your server successfully but still weren&apos;t able to automatically create the directory. You&apos;ll need to <a href="%1$s">manually specify a valid directory</a>', 'backupwordpress' ),
205
- 'https://bwp.hmn.md/support-center/backupwordpress-faqs/#where'
206
- );
207
-
208
- } else {
209
-
210
- $messages[] = sprintf(
211
- /* translators: 1: Path to backup directory. 2: URL to BackupWordPress docs. */
212
- __( 'We couldn&apos;t create the backups directory (%1$s). You&apos;ll need to <a href="%2$s">manually specify a valid directory</a> or you can have WordPress do it automatically by entering your server details below. This is a one time thing.', 'backupwordpress' ),
213
- '<code>' . esc_html( Path::get_path() ) . '</code>',
214
- 'https://bwp.hmn.md/support-center/backupwordpress-faqs/#where'
215
- );
216
- }
217
- }
218
-
219
- if ( ! is_readable( Path::get_root() ) ) {
220
-
221
- $messages[] = sprintf(
222
- __( 'Your site&apos;s root path (%s) isn&apos;t readable. Please contact support.', 'backupwordpress' ),
223
- '<code>' . Path::get_root() . '</code>'
224
- );
225
- }
226
-
227
- if ( ! Requirement_Mysqldump_Command_Path::test() && ! Requirement_PDO::test() ) {
228
-
229
- $messages[] = sprintf(
230
- /* translators: FYI: specified MySQL features. */
231
- __( 'Your site cannot be backed up because your server doesn&apos;t support %1$s or %2$s. Please contact your host and ask them to enable them.', 'backupwordpress' ),
232
- '<code>mysqldump</code>',
233
- '<code>PDO::mysql</code>'
234
- );
235
- }
236
-
237
- if ( ! Requirement_Zip_Command_Path::test() && ! Requirement_Zip_Archive::test() ) {
238
-
239
- $messages[] = sprintf(
240
- /* translators: FYI: specified zip archiving features. */
241
- __( 'Your site cannot be backed up because your server doesn&apos;t support %1$s or %2$s. Please contact your host and ask them to enable them.', 'backupwordpress' ),
242
- '<code>zip</code>',
243
- '<code>ZipArchive</code>'
244
- );
245
- }
246
-
247
- if ( disk_space_low() ) {
248
-
249
- $messages[] = sprintf(
250
- __( 'Your server only has %s of disk space left which probably isn&apos;t enough to complete a backup. Try deleting some existing backups or other files to free up space.', 'backupwordpress' ),
251
- '<code>' . size_format( disk_free_space( Path::get_path() ) ) . '</code>'
252
- );
253
- }
254
-
255
- if ( count( $messages ) > 0 ) {
256
- $notices->set_notices( 'server_config', $messages, false );
257
- }
258
- }
259
-
260
- add_action( 'admin_init', 'HM\BackUpWordPress\set_server_config_notices' );
261
-
262
- /**
263
- * Hook in an change the plugin description when BackUpWordPress is activated
264
- *
265
- * @param array $plugins
266
- * @return array $plugins
267
- */
268
- function plugin_row( $plugins ) {
269
-
270
- $menu = is_multisite() ? 'Settings' : 'Tools';
271
-
272
- if ( isset( $plugins[ HMBKP_PLUGIN_SLUG . '/backupwordpress.php' ] ) ) {
273
- $plugins[ HMBKP_PLUGIN_SLUG . '/backupwordpress.php' ]['Description'] = str_replace( 'Once activated you\'ll find me under <strong>' . $menu . ' &rarr; Backups</strong>', 'Find me under <strong><a href="' . esc_url( get_settings_url() ) . '">' . $menu . ' &rarr; Backups</a></strong>', $plugins[ HMBKP_PLUGIN_SLUG . '/backupwordpress.php' ]['Description'] );
274
- }
275
-
276
- return $plugins;
277
-
278
- }
279
- add_filter( 'all_plugins', 'HM\BackUpWordPress\plugin_row', 10 );
280
-
281
- /**
282
- * Get the human readable backup type in.
283
- *
284
- * @access public
285
- * @param string $type
286
- * @param Scheduled_Backup $schedule (default: null)
287
- * @return string
288
- */
289
- function human_get_type( $type, Scheduled_Backup $schedule = null ) {
290
-
291
- if ( strpos( $type, 'complete' ) !== false ) {
292
- return __( 'Database and Files', 'backupwordpress' );
293
- }
294
-
295
- if ( strpos( $type, 'file' ) !== false ) {
296
- return __( 'Files', 'backupwordpress' );
297
- }
298
-
299
- if ( strpos( $type, 'database' ) !== false ) {
300
- return __( 'Database', 'backupwordpress' );
301
- }
302
-
303
- if ( ! is_null( $schedule ) ) {
304
- return human_get_type( $schedule->get_type() );
305
- }
306
-
307
- return __( 'Legacy', 'backupwordpress' );
308
-
309
- }
310
-
311
- /**
312
- * Display the row of actions for a schedule
313
- *
314
- * @access public
315
- * @param Scheduled_Backup $schedule
316
- * @return void
317
- */
318
- function schedule_status( Scheduled_Backup $schedule, $echo = true ) {
319
-
320
- $status = new Backup_Status( $schedule->get_id() );
321
-
322
- ob_start(); ?>
323
-
324
- <span class="hmbkp-status"<?php if ( $status->get_status() ) { ?> title="<?php printf( __( 'Started %s ago', 'backupwordpress' ), human_time_diff( $status->get_start_time() ) ); ?>"<?php } ?>>
325
- <?php echo $status->get_status() ? wp_kses_data( $status->get_status() ) : __( 'Starting backup...', 'backupwordpress' ); ?>
326
- <a href="<?php echo admin_action_url( 'request_cancel_backup', array( 'hmbkp_schedule_id' => $schedule->get_id() ) ); ?>"><?php _e( 'cancel', 'backupwordpress' ); ?></a>
327
- </span>
328
-
329
- <?php $output = ob_get_clean();
330
-
331
- if ( ! $echo ) {
332
- return $output;
333
- }
334
-
335
- echo $output;
336
-
337
- }
338
-
339
- function backups_number( Scheduled_Backup $schedule ) {
340
-
341
- $number = count( $schedule->get_backups() );
342
-
343
- if ( 0 === $number ) {
344
- $output = sprintf( __( 'No backups completed', 'backupwordpress' ) );
345
- } else {
346
- $output = sprintf( _nx( 'One backup completed', '%1$s backups completed', $number, 'backups count', 'backupwordpress' ), number_format_i18n( $number ) );
347
- }
348
-
349
- echo apply_filters( 'hmbkp_backups_number', $output, $number );
350
- }
351
-
352
- function translated_schedule_title( $slug, $title ) {
353
-
354
- $titles = array(
355
- 'complete-hourly' => esc_html__( 'Complete Hourly', 'backupwordpress' ),
356
- 'file-hourly' => esc_html__( 'File Hourly', 'backupwordpress' ),
357
- 'database-hourly' => esc_html__( 'Database Hourly', 'backupwordpress' ),
358
- 'complete-twicedaily' => esc_html__( 'Complete Twice Daily', 'backupwordpress' ),
359
- 'file-twicedaily' => esc_html__( 'File Twice Daily', 'backupwordpress' ),
360
- 'database-twicedaily' => esc_html__( 'Database Twice Daily', 'backupwordpress' ),
361
- 'complete-daily' => esc_html__( 'Complete Daily', 'backupwordpress' ),
362
- 'file-daily' => esc_html__( 'File Daily', 'backupwordpress' ),
363
- 'database-daily' => esc_html__( 'Database Daily', 'backupwordpress' ),
364
- 'complete-weekly' => esc_html__( 'Complete Weekly', 'backupwordpress' ),
365
- 'file-weekly' => esc_html__( 'File Weekly', 'backupwordpress' ),
366
- 'database-weekly' => esc_html__( 'Database Weekly', 'backupwordpress' ),
367
- 'complete-fortnightly' => esc_html__( 'Complete Every Two Weeks', 'backupwordpress' ),
368
- 'file-fortnightly' => esc_html__( 'File Every Two Weeks', 'backupwordpress' ),
369
- 'database-fortnightly' => esc_html__( 'Database Every Two Weeks', 'backupwordpress' ),
370
- 'complete-monthly' => esc_html__( 'Complete Monthly', 'backupwordpress' ),
371
- 'file-monthly' => esc_html__( 'File Monthly', 'backupwordpress' ),
372
- 'database-monthly' => esc_html__( 'Database Monthly', 'backupwordpress' ),
373
- 'complete-manually' => esc_html__( 'Complete Manually', 'backupwordpress' ),
374
- 'file-manually' => esc_html__( 'File Manually', 'backupwordpress' ),
375
- 'database-manually' => esc_html__( 'Database Manually', 'backupwordpress' ),
376
- );
377
-
378
- if ( isset( $titles[ $slug ] ) ) {
379
- return $titles[ $slug ];
380
- }
381
-
382
- return $title;
383
-
384
- }
385
-
386
- function get_settings_url( $slug = HMBKP_PLUGIN_SLUG ) {
387
-
388
- $url = is_multisite() ? network_admin_url( 'settings.php?page=' . $slug ) : admin_url( 'tools.php?page=' . $slug );
389
-
390
- schedules::get_instance()->refresh_schedules();
391
-
392
- if ( ! empty( $_REQUEST['hmbkp_schedule_id'] ) && schedules::get_instance()->get_schedule( sanitize_text_field( $_REQUEST['hmbkp_schedule_id'] ) ) ) {
393
- $url = add_query_arg( 'hmbkp_schedule_id', sanitize_text_field( $_REQUEST['hmbkp_schedule_id'] ), $url );
394
- }
395
-
396
- return $url;
397
-
398
- }
399
-
400
- /**
401
- * Add an error message to the array of messages.
402
- *
403
- * @param $error_message
404
- */
405
- function add_settings_error( $error_message ) {
406
-
407
- $hmbkp_settings_errors = get_transient( 'hmbkp_settings_errors' );
408
-
409
- // If it doesnt exist, create.
410
- if ( ! $hmbkp_settings_errors ) {
411
- set_transient( 'hmbkp_settings_errors', (array) $error_message );
412
- } else {
413
- set_transient( 'hmbkp_settings_errors', array_unique( array_merge( $hmbkp_settings_errors, (array) $error_message ) ) );
414
- }
415
-
416
- }
417
-
418
- /**
419
- * Back compat version of add_settings_error
420
- *
421
- * @deprecated 3.4 add_settings_error()
422
- */
423
- function hmbkp_add_settings_error( $error_message ) {
424
- _deprecated_function( __FUNCTION__, '3.4', 'add_settings_error()' );
425
- add_settings_error( $error_message );
426
- }
427
-
428
- /**
429
- * Fetch the form submission errors for display.
430
- *
431
- * @return mixed
432
- */
433
- function get_settings_errors() {
434
- return get_transient( 'hmbkp_settings_errors' );
435
- }
436
-
437
- /**
438
- * Clear all error messages.
439
- *
440
- * @return bool
441
- */
442
- function clear_settings_errors() {
443
- return delete_transient( 'hmbkp_settings_errors' );
444
- }
445
-
446
- function path_in_php_open_basedir( $path, $ini_get = 'ini_get' ) {
447
-
448
- $open_basedir = @call_user_func( $ini_get, 'open_basedir' );
449
-
450
- if ( ! $open_basedir ) {
451
- return true;
452
- }
453
-
454
- $open_basedir_paths = array_map( 'trim', explode( PATH_SEPARATOR, $open_basedir ) );
455
-
456
- if ( ! $open_basedir_paths ) {
457
- return true;
458
- }
459
-
460
- // Is path in the open_basedir allowed paths?
461
- if ( in_array( $path, $open_basedir_paths ) ) {
462
- return true;
463
- }
464
-
465
- // Is path a subdirectory of one of the allowed paths?
466
- foreach ( $open_basedir_paths as $basedir_path ) {
467
- if ( 0 === strpos( $path, $basedir_path ) ) {
468
- return true;
469
- }
470
- }
471
-
472
- return false;
473
-
474
- }
475
-
476
- /**
477
- * Check if two filesizes are of the same size format
478
- *
479
- * E.g. 22 MB and 44 MB are both MB so return true. Whereas
480
- * 22 KB and 12 TB are not so return false.
481
- *
482
- * @param int $size
483
- * @param int $other_size
484
- *
485
- * @return boolean Whether the two filesizes are of the same magnitude
486
- */
487
- function is_same_size_format( $size, $other_size ) {
488
-
489
- if ( ! is_int( $size ) || ! is_int( $other_size ) ) {
490
- return false;
491
- }
492
-
493
- return preg_replace( '/[0-9]+/', '', size_format( $size ) ) === preg_replace( '/[0-9]+/', '', size_format( $other_size ) );
494
- }
495
-
496
- /**
497
- * Check whether the server is low on disk space.
498
- *
499
- * @return bool Whether there's less disk space less than 2 * the entire size of the site.
500
- */
501
- function disk_space_low( $backup_size = false ) {
502
-
503
- $disk_space = @disk_free_space( Path::get_path() );
504
-
505
- if ( ! $disk_space ) {
506
- return false;
507
- }
508
-
509
- if ( ! $backup_size ) {
510
-
511
- $site_size = new Site_Size( 'complete', new Excludes() );
512
-
513
- if ( ! $site_size->is_site_size_cached() ) {
514
- return false;
515
- }
516
-
517
- $backup_size = $site_size->get_site_size() * 2;
518
-
519
- }
520
-
521
- if ( ! is_readable( Path::get_path() ) ) {
522
- return false;
523
- }
524
-
525
- $disk_space = disk_free_space( Path::get_path() );
526
-
527
- return $disk_space && $backup_size >= $disk_space;
528
- }
1
+ <?php
2
+
3
+ namespace HM\BackUpWordPress;
4
+
5
+ /**
6
+ * Displays a row in the manage backups table
7
+ *
8
+ * @param string $file
9
+ * @param Scheduled_Backup $schedule
10
+ */
11
+ function get_backup_row( $file, Scheduled_Backup $schedule ) {
12
+
13
+ $encoded_file = urlencode( base64_encode( $file ) );
14
+ $offset = get_option( 'gmt_offset' ) * 3600;
15
+
16
+ ?>
17
+
18
+ <tr class="hmbkp_manage_backups_row">
19
+
20
+ <th scope="row">
21
+ <?php echo esc_html( date_i18n( get_option( 'date_format' ) . ' - ' . get_option( 'time_format' ), @filemtime( $file ) + $offset ) ); ?>
22
+ </th>
23
+
24
+ <td class="code">
25
+ <?php echo esc_html( size_format( @filesize( $file ) ) ); ?>
26
+ </td>
27
+
28
+ <td><?php echo esc_html( human_get_type( $file, $schedule ) ); ?></td>
29
+
30
+ <td>
31
+
32
+ <?php if ( is_path_accessible( Path::get_path() ) ) : ?>
33
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'hmbkp_backup_archive' => $encoded_file, 'hmbkp_schedule_id' => $schedule->get_id(), 'action' => 'hmbkp_request_download_backup' ), admin_url( 'admin-post.php' ) ), 'hmbkp_download_backup', 'hmbkp_download_backup_nonce' ) ); ?>" class="download-action"><?php _e( 'Download', 'backupwordpress' ); ?></a> |
34
+ <?php endif; ?>
35
+
36
+ <a href="<?php echo esc_url( wp_nonce_url(
37
+ add_query_arg( array(
38
+ 'hmbkp_backup_archive' => $encoded_file,
39
+ 'hmbkp_schedule_id' => $schedule->get_id(),
40
+ 'action' => 'hmbkp_request_delete_backup',
41
+ ),
42
+ admin_url( 'admin-post.php' )
43
+ ),
44
+ 'hmbkp_delete_backup',
45
+ 'hmbkp_delete_backup_nonce'
46
+ ) ); ?>" class="delete-action">
47
+ <?php esc_html_e( 'Delete', 'backupwordpress' ); ?>
48
+ </a>
49
+
50
+ </td>
51
+
52
+ </tr>
53
+
54
+ <?php }
55
+
56
+ /**
57
+ * Displays admin notices for various error / warning conditions.
58
+ *
59
+ * @return void
60
+ */
61
+ function admin_notices() {
62
+
63
+ $current_screen = get_current_screen();
64
+
65
+ if ( ! isset( $current_screen ) ) {
66
+ return;
67
+ }
68
+
69
+ $page = is_multisite() ? HMBKP_ADMIN_PAGE . '-network' : HMBKP_ADMIN_PAGE;
70
+ if ( $current_screen->id !== $page ) {
71
+ return;
72
+ }
73
+
74
+ $notices = Notices::get_instance()->get_notices();
75
+
76
+ if ( empty( $notices ) ) {
77
+ return;
78
+ }
79
+
80
+ ob_start(); ?>
81
+
82
+ <?php if ( ! empty( $notices['backup_errors'] ) ) : ?>
83
+
84
+ <div id="hmbkp-warning-backup" class="error notice is-dismissible">
85
+ <p>
86
+ <strong><?php _e( 'BackUpWordPress detected issues with your last backup.', 'backupwordpress' ); ?></strong>
87
+ </p>
88
+
89
+ <ul>
90
+
91
+ <?php foreach ( $notices['backup_errors'] as $notice ) : ?>
92
+ <li><pre><?php echo esc_html( $notice ); ?></pre></li>
93
+ <?php endforeach; ?>
94
+
95
+ </ul>
96
+
97
+ </div>
98
+
99
+ <?php endif; ?>
100
+
101
+ <?php if ( ! empty( $notices['server_config'] ) ) : ?>
102
+
103
+ <div id="hmbkp-warning-server" class="error notice">
104
+
105
+ <ul>
106
+
107
+ <?php foreach ( $notices['server_config'] as $notice ) : ?>
108
+
109
+ <li>
110
+ <?php print_whitelist_html(
111
+ $notice,
112
+ 'strong, b, i, em, code, a'
113
+ ); ?>
114
+ </li>
115
+
116
+ <?php endforeach; ?>
117
+
118
+ </ul>
119
+
120
+ </div>
121
+
122
+ <?php endif; ?>
123
+
124
+ <?php $notices = array_filter( $notices );
125
+
126
+ if ( ! empty( $notices ) ) : ?>
127
+
128
+ <?php foreach ( $notices as $key => $notice_type ) : ?>
129
+
130
+ <?php if ( ! ( in_array( $key, array( 'server_config', 'backup_errors' ) ) ) ) : ?>
131
+
132
+ <div id="hmbkp-warning-other" class="error notice is-dismissible">
133
+
134
+ <?php foreach ( array_unique( $notice_type ) as $msg ) : ?>
135
+
136
+ <p><?php echo wp_kses_data( $msg ); ?></p>
137
+
138
+ <?php endforeach; ?>
139
+
140
+ </div>
141
+
142
+ <?php endif; ?>
143
+
144
+ <?php endforeach; ?>
145
+
146
+ <?php endif; ?>
147
+
148
+ <?php echo ob_get_clean();
149
+
150
+ }
151
+ add_action( 'admin_notices', 'HM\BackUpWordPress\admin_notices' );
152
+ add_action( 'network_admin_notices', 'HM\BackUpWordPress\admin_notices' );
153
+
154
+ function set_server_config_notices() {
155
+
156
+ $notices = Notices::get_instance();
157
+ $messages = array();
158
+
159
+ if ( Backup_Utilities::is_safe_mode_on() ) {
160
+
161
+ $messages[] = sprintf(
162
+ /* translators: 1: The `PHP` abbreviation. */
163
+ __( '%1$s is running in <a href="http://php.net/manual/en/features.safe-mode.php">Safe Mode</a>, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst <code>Safe Mode</code> is on.', 'backupwordpress' ),
164
+ '<code>PHP</code>'
165
+ );
166
+ }
167
+
168
+ if ( defined( 'HMBKP_PATH' ) && HMBKP_PATH ) {
169
+
170
+ // Suppress open_basedir warning https://bugs.php.net/bug.php?id=53041
171
+ if ( ! path_in_php_open_basedir( HMBKP_PATH ) ) {
172
+
173
+ $messages[] = sprintf(
174
+ __( 'Your server has an %1$s restriction in effect and your custom backups directory (%2$s) is not within the allowed path(s): (%3$s).', 'backupwordpress' ),
175
+ '<code>open_basedir</code>',
176
+ '<code>' . esc_html( HMBKP_PATH ) . '</code>',
177
+ '<code>' . esc_html( @ini_get( 'open_basedir' ) ) . '</code>'
178
+ );
179
+
180
+ } elseif ( ! is_dir( HMBKP_PATH ) ) {
181
+
182
+ $messages[] = sprintf(
183
+ __( 'Your custom backups directory (%1$s) doesn&apos;t exist, your backups will be saved to %2$s instead.', 'backupwordpress' ),
184
+ '<code>' . esc_html( HMBKP_PATH ) . '</code>',
185
+ '<code>' . esc_html( Path::get_path() ) . '</code>'
186
+ );
187
+
188
+ } elseif ( is_dir( HMBKP_PATH ) && ! wp_is_writable( HMBKP_PATH ) ) {
189
+
190
+ $messages[] = sprintf(
191
+ __( 'Your custom backups directory (%1$s) isn&apos;t writable, new backups will be saved to %2$s instead.', 'backupwordpress' ),
192
+ '<code>' . esc_html( HMBKP_PATH ) . '</code>',
193
+ '<code>' . esc_html( Path::get_path() ) . '</code>'
194
+ );
195
+ }
196
+ }
197
+
198
+ if ( ! is_dir( Path::get_path() ) || is_dir( Path::get_path() ) && ! wp_is_writable( Path::get_path() ) ) {
199
+
200
+ if ( isset( $_GET['creation_error'] ) ) {
201
+
202
+ $messages[] = __( 'We connected to your server successfully but still weren&apos;t able to automatically create the directory. You&apos;ll need to manually specify a valid directory', 'backupwordpress' );
203
+
204
+ } else {
205
+
206
+ $messages[] = sprintf(
207
+ /* translators: 1: Path to backup directory.*/
208
+ __( 'We couldn&apos;t create the backups directory (%1$s). You&apos;ll need to manually specify a valid directory or you can have WordPress do it automatically by entering your server details below. This is a one time thing.', 'backupwordpress' ),
209
+ '<code>' . esc_html( Path::get_path() ) . '</code>'
210
+ );
211
+ }
212
+ }
213
+
214
+ if ( ! is_readable( Path::get_root() ) ) {
215
+
216
+ $messages[] = sprintf(
217
+ __( 'Your site&apos;s root path (%s) isn&apos;t readable. Please contact support.', 'backupwordpress' ),
218
+ '<code>' . Path::get_root() . '</code>'
219
+ );
220
+ }
221
+
222
+ if ( ! Requirement_Mysqldump_Command_Path::test() && ! Requirement_PDO::test() ) {
223
+
224
+ $messages[] = sprintf(
225
+ /* translators: FYI: specified MySQL features. */
226
+ __( 'Your site cannot be backed up because your server doesn&apos;t support %1$s or %2$s. Please contact your host and ask them to enable them.', 'backupwordpress' ),
227
+ '<code>mysqldump</code>',
228
+ '<code>PDO::mysql</code>'
229
+ );
230
+ }
231
+
232
+ if ( ! Requirement_Zip_Command_Path::test() && ! Requirement_Zip_Archive::test() ) {
233
+
234
+ $messages[] = sprintf(
235
+ /* translators: FYI: specified zip archiving features. */
236
+ __( 'Your site cannot be backed up because your server doesn&apos;t support %1$s or %2$s. Please contact your host and ask them to enable them.', 'backupwordpress' ),
237
+ '<code>zip</code>',
238
+ '<code>ZipArchive</code>'
239
+ );
240
+ }
241
+
242
+ if ( disk_space_low() ) {
243
+
244
+ $messages[] = sprintf(
245
+ __( 'Your server only has %s of disk space left which probably isn&apos;t enough to complete a backup. Try deleting some existing backups or other files to free up space.', 'backupwordpress' ),
246
+ '<code>' . size_format( disk_free_space( Path::get_path() ) ) . '</code>'
247
+ );
248
+ }
249
+
250
+ if ( count( $messages ) > 0 ) {
251
+ $notices->set_notices( 'server_config', $messages, false );
252
+ }
253
+ }
254
+
255
+ add_action( 'admin_init', 'HM\BackUpWordPress\set_server_config_notices' );
256
+
257
+ /**
258
+ * Hook in an change the plugin description when BackUpWordPress is activated
259
+ *
260
+ * @param array $plugins
261
+ * @return array $plugins
262
+ */
263
+ function plugin_row( $plugins ) {
264
+
265
+ $menu = is_multisite() ? 'Settings' : 'Tools';
266
+
267
+ if ( isset( $plugins[ HMBKP_PLUGIN_SLUG . '/backupwordpress.php' ] ) ) {
268
+ $plugins[ HMBKP_PLUGIN_SLUG . '/backupwordpress.php' ]['Description'] = str_replace( 'Once activated you\'ll find me under <strong>' . $menu . ' &rarr; Backups</strong>', 'Find me under <strong><a href="' . esc_url( get_settings_url() ) . '">' . $menu . ' &rarr; Backups</a></strong>', $plugins[ HMBKP_PLUGIN_SLUG . '/backupwordpress.php' ]['Description'] );
269
+ }
270
+
271
+ return $plugins;
272
+
273
+ }
274
+ add_filter( 'all_plugins', 'HM\BackUpWordPress\plugin_row', 10 );
275
+
276
+ /**
277
+ * Get the human readable backup type in.
278
+ *
279
+ * @access public
280
+ * @param string $type
281
+ * @param Scheduled_Backup $schedule (default: null)
282
+ * @return string
283
+ */
284
+ function human_get_type( $type, Scheduled_Backup $schedule = null ) {
285
+
286
+ if ( strpos( $type, 'complete' ) !== false ) {
287
+ return __( 'Database and Files', 'backupwordpress' );
288
+ }
289
+
290
+ if ( strpos( $type, 'file' ) !== false ) {
291
+ return __( 'Files', 'backupwordpress' );
292
+ }
293
+
294
+ if ( strpos( $type, 'database' ) !== false ) {
295
+ return __( 'Database', 'backupwordpress' );
296
+ }
297
+
298
+ if ( ! is_null( $schedule ) ) {
299
+ return human_get_type( $schedule->get_type() );
300
+ }
301
+
302
+ return __( 'Legacy', 'backupwordpress' );
303
+
304
+ }
305
+
306
+ /**
307
+ * Display the row of actions for a schedule
308
+ *
309
+ * @access public
310
+ * @param Scheduled_Backup $schedule
311
+ * @return void
312
+ */
313
+ function schedule_status( Scheduled_Backup $schedule, $echo = true ) {
314
+
315
+ $status = new Backup_Status( $schedule->get_id() );
316
+
317
+ ob_start(); ?>
318
+
319
+ <span class="hmbkp-status"<?php if ( $status->get_status() ) { ?> title="<?php printf( __( 'Started %s ago', 'backupwordpress' ), human_time_diff( $status->get_start_time() ) ); ?>"<?php } ?>>
320
+ <?php echo $status->get_status() ? wp_kses_data( $status->get_status() ) : __( 'Starting backup...', 'backupwordpress' ); ?>
321
+ <a href="<?php echo admin_action_url( 'request_cancel_backup', array( 'hmbkp_schedule_id' => $schedule->get_id() ) ); ?>"><?php _e( 'cancel', 'backupwordpress' ); ?></a>
322
+ </span>
323
+
324
+ <?php $output = ob_get_clean();
325
+
326
+ if ( ! $echo ) {
327
+ return $output;
328
+ }
329
+
330
+ echo $output;
331
+
332
+ }
333
+
334
+ function backups_number( Scheduled_Backup $schedule ) {
335
+
336
+ $number = count( $schedule->get_backups() );
337
+
338
+ if ( 0 === $number ) {
339
+ $output = sprintf( __( 'No backups completed', 'backupwordpress' ) );
340
+ } else {
341
+ $output = sprintf( _nx( 'One backup completed', '%1$s backups completed', $number, 'backups count', 'backupwordpress' ), number_format_i18n( $number ) );
342
+ }
343
+
344
+ echo apply_filters( 'hmbkp_backups_number', $output, $number );
345
+ }
346
+
347
+ function translated_schedule_title( $slug, $title ) {
348
+
349
+ $titles = array(
350
+ 'complete-hourly' => esc_html__( 'Complete Hourly', 'backupwordpress' ),
351
+ 'file-hourly' => esc_html__( 'File Hourly', 'backupwordpress' ),
352
+ 'database-hourly' => esc_html__( 'Database Hourly', 'backupwordpress' ),
353
+ 'complete-twicedaily' => esc_html__( 'Complete Twice Daily', 'backupwordpress' ),
354
+ 'file-twicedaily' => esc_html__( 'File Twice Daily', 'backupwordpress' ),
355
+ 'database-twicedaily' => esc_html__( 'Database Twice Daily', 'backupwordpress' ),
356
+ 'complete-daily' => esc_html__( 'Complete Daily', 'backupwordpress' ),
357
+ 'file-daily' => esc_html__( 'File Daily', 'backupwordpress' ),
358
+ 'database-daily' => esc_html__( 'Database Daily', 'backupwordpress' ),
359
+ 'complete-weekly' => esc_html__( 'Complete Weekly', 'backupwordpress' ),
360
+ 'file-weekly' => esc_html__( 'File Weekly', 'backupwordpress' ),
361
+ 'database-weekly' => esc_html__( 'Database Weekly', 'backupwordpress' ),
362
+ 'complete-fortnightly' => esc_html__( 'Complete Every Two Weeks', 'backupwordpress' ),
363
+ 'file-fortnightly' => esc_html__( 'File Every Two Weeks', 'backupwordpress' ),
364
+ 'database-fortnightly' => esc_html__( 'Database Every Two Weeks', 'backupwordpress' ),
365
+ 'complete-monthly' => esc_html__( 'Complete Monthly', 'backupwordpress' ),
366
+ 'file-monthly' => esc_html__( 'File Monthly', 'backupwordpress' ),
367
+ 'database-monthly' => esc_html__( 'Database Monthly', 'backupwordpress' ),
368
+ 'complete-manually' => esc_html__( 'Complete Manually', 'backupwordpress' ),
369
+ 'file-manually' => esc_html__( 'File Manually', 'backupwordpress' ),
370
+ 'database-manually' => esc_html__( 'Database Manually', 'backupwordpress' ),
371
+ );
372
+
373
+ if ( isset( $titles[ $slug ] ) ) {
374
+ return $titles[ $slug ];
375
+ }
376
+
377
+ return $title;
378
+
379
+ }
380
+
381
+ function get_settings_url( $slug = HMBKP_PLUGIN_SLUG ) {
382
+
383
+ $url = is_multisite() ? network_admin_url( 'settings.php?page=' . $slug ) : admin_url( 'tools.php?page=' . $slug );
384
+
385
+ schedules::get_instance()->refresh_schedules();
386
+
387
+ if ( ! empty( $_REQUEST['hmbkp_schedule_id'] ) && schedules::get_instance()->get_schedule( sanitize_text_field( $_REQUEST['hmbkp_schedule_id'] ) ) ) {
388
+ $url = add_query_arg( 'hmbkp_schedule_id', sanitize_text_field( $_REQUEST['hmbkp_schedule_id'] ), $url );
389
+ }
390
+
391
+ return $url;
392
+
393
+ }
394
+
395
+ /**
396
+ * Add an error message to the array of messages.
397
+ *
398
+ * @param $error_message
399
+ */
400
+ function add_settings_error( $error_message ) {
401
+
402
+ $hmbkp_settings_errors = get_transient( 'hmbkp_settings_errors' );
403
+
404
+ // If it doesnt exist, create.
405
+ if ( ! $hmbkp_settings_errors ) {
406
+ set_transient( 'hmbkp_settings_errors', (array) $error_message );
407
+ } else {
408
+ set_transient( 'hmbkp_settings_errors', array_unique( array_merge( $hmbkp_settings_errors, (array) $error_message ) ) );
409
+ }
410
+
411
+ }
412
+
413
+ /**
414
+ * Back compat version of add_settings_error
415
+ *
416
+ * @deprecated 3.4 add_settings_error()
417
+ */
418
+ function hmbkp_add_settings_error( $error_message ) {
419
+ _deprecated_function( __FUNCTION__, '3.4', 'add_settings_error()' );
420
+ add_settings_error( $error_message );
421
+ }
422
+
423
+ /**
424
+ * Fetch the form submission errors for display.
425
+ *
426
+ * @return mixed
427
+ */
428
+ function get_settings_errors() {
429
+ return get_transient( 'hmbkp_settings_errors' );
430
+ }
431
+
432
+ /**
433
+ * Clear all error messages.
434
+ *
435
+ * @return bool
436
+ */
437
+ function clear_settings_errors() {
438
+ return delete_transient( 'hmbkp_settings_errors' );
439
+ }
440
+
441
+ function path_in_php_open_basedir( $path, $ini_get = 'ini_get' ) {
442
+
443
+ $open_basedir = @call_user_func( $ini_get, 'open_basedir' );
444
+
445
+ if ( ! $open_basedir ) {
446
+ return true;
447
+ }
448
+
449
+ $open_basedir_paths = array_map( 'trim', explode( PATH_SEPARATOR, $open_basedir ) );
450
+
451
+ if ( ! $open_basedir_paths ) {
452
+ return true;
453
+ }
454
+
455
+ // Is path in the open_basedir allowed paths?
456
+ if ( in_array( $path, $open_basedir_paths ) ) {
457
+ return true;
458
+ }
459
+
460
+ // Is path a subdirectory of one of the allowed paths?
461
+ foreach ( $open_basedir_paths as $basedir_path ) {
462
+ if ( 0 === strpos( $path, $basedir_path ) ) {
463
+ return true;
464
+ }
465
+ }
466
+
467
+ return false;
468
+
469
+ }
470
+
471
+ /**
472
+ * Check if two filesizes are of the same size format
473
+ *
474
+ * E.g. 22 MB and 44 MB are both MB so return true. Whereas
475
+ * 22 KB and 12 TB are not so return false.
476
+ *
477
+ * @param int $size
478
+ * @param int $other_size
479
+ *
480
+ * @return boolean Whether the two filesizes are of the same magnitude
481
+ */
482
+ function is_same_size_format( $size, $other_size ) {
483
+
484
+ if ( ! is_int( $size ) || ! is_int( $other_size ) ) {
485
+ return false;
486
+ }
487
+
488
+ return preg_replace( '/[0-9]+/', '', size_format( $size ) ) === preg_replace( '/[0-9]+/', '', size_format( $other_size ) );
489
+ }
490
+
491
+ /**
492
+ * Check whether the server is low on disk space.
493
+ *
494
+ * @return bool Whether there's less disk space less than 2 * the entire size of the site.
495
+ */
496
+ function disk_space_low( $backup_size = false ) {
497
+
498
+ $disk_space = @disk_free_space( Path::get_path() );
499
+
500
+ if ( ! $disk_space ) {
501
+ return false;
502
+ }
503
+
504
+ if ( ! $backup_size ) {
505
+
506
+ $site_size = new Site_Size( 'complete', new Excludes() );
507
+
508
+ if ( ! $site_size->is_site_size_cached() ) {
509
+ return false;
510
+ }
511
+
512
+ $backup_size = $site_size->get_site_size() * 2;
513
+
514
+ }
515
+
516
+ if ( ! is_readable( Path::get_path() ) ) {
517
+ return false;
518
+ }
519
+
520
+ $disk_space = disk_free_space( Path::get_path() );
521
+
522
+ return $disk_space && $backup_size >= $disk_space;
523
+ }
 
 
 
 
 
languages/backupwordpress-ca_ES.po CHANGED
@@ -1,709 +1,709 @@
1
- # Translation of 2.x in Catalan
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: ca_ES\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr ""
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr ""
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr ""
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr ""
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr ""
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr ""
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr ""
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr ""
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr ""
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr ""
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr ""
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr ""
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr ""
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr ""
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr ""
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr ""
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr ""
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr ""
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr ""
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr ""
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr ""
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr ""
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr ""
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr ""
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr ""
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr ""
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr ""
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr ""
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr ""
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr ""
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr ""
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr ""
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr ""
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr ""
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr ""
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr ""
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr ""
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr ""
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr ""
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr ""
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr ""
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr ""
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr ""
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr ""
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr ""
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr ""
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr ""
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr ""
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr ""
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr ""
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr ""
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr ""
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr ""
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr ""
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr ""
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr ""
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr ""
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr ""
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr ""
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr ""
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr ""
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr ""
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr ""
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr ""
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr ""
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr ""
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr ""
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr ""
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr ""
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr ""
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
-
328
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
329
- msgid "BackUpWordPress has completed a backup of your site %1$s."
330
- msgstr ""
331
-
332
- #: ../classes/class-email.php:169
333
- msgid "The backup file should be attached to this email."
334
- msgstr ""
335
-
336
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
337
- msgid "You can download the backup file by clicking the link below:"
338
- msgstr ""
339
-
340
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
341
- msgid ""
342
- "Kind Regards,\n"
343
- "The Happy BackUpWordPress Backup Emailing Robot"
344
- msgstr ""
345
-
346
- #: ../classes/class-email.php:178
347
- msgid "Unfortunately the backup file was too large to attach to this email."
348
- msgstr ""
349
-
350
- #: ../classes/wp-cli.php:19
351
- msgid "Backup: Dumping database..."
352
- msgstr ""
353
-
354
- #: ../classes/wp-cli.php:23
355
- msgid "Backup: Zipping everything up..."
356
- msgstr ""
357
-
358
- #: ../classes/wp-cli.php:38
359
- msgid "Invalid backup path"
360
- msgstr ""
361
-
362
- #: ../classes/wp-cli.php:43
363
- msgid "Invalid root path"
364
- msgstr ""
365
-
366
- #: ../classes/wp-cli.php:68
367
- msgid "Backup Complete: "
368
- msgstr ""
369
-
370
- #: ../classes/wp-cli.php:71
371
- msgid "Backup Failed"
372
- msgstr ""
373
-
374
- #: ../functions/core.php:229
375
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
376
- msgstr ""
377
-
378
- #: ../functions/interface.php:245
379
- msgid "Legacy"
380
- msgstr ""
381
-
382
- #: ../functions/interface.php:67
383
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
384
- msgstr ""
385
-
386
- #: ../functions/interface.php:54
387
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
388
- msgstr ""
389
-
390
- #: ../functions/core.php:229
391
- msgid "BackUpWordPress has setup your default schedules."
392
- msgstr ""
393
-
394
- #: ../classes/class-email.php:154
395
- msgid "Backup of %s Failed"
396
- msgstr ""
397
-
398
- #: ../classes/class-email.php:69
399
- msgid "Send an email notification to %s"
400
- msgstr ""
401
-
402
- #: ../classes/class-email.php:100
403
- msgid "%s isn't a valid email"
404
- msgstr ""
405
-
406
- #: ../admin/schedule.php:4
407
- msgid "Backups will be compressed and should be smaller than this."
408
- msgstr ""
409
-
410
- #: ../classes/class-email.php:31
411
- msgid "Email notification"
412
- msgstr ""
413
-
414
- #: ../admin/schedule.php:19
415
- msgid "hourly on the hour"
416
- msgstr ""
417
-
418
- #: ../admin/schedule.php:25
419
- msgid "daily at %s"
420
- msgstr ""
421
-
422
- #: ../admin/schedule-form.php:41
423
- msgid "Number of backups to store on this server"
424
- msgstr ""
425
-
426
- #: ../admin/schedule-form.php:7
427
- msgid "Schedule Settings"
428
- msgstr ""
429
-
430
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
431
- msgid "Close"
432
- msgstr ""
433
-
434
- #: ../admin/menu.php:69
435
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
436
- msgstr ""
437
-
438
- #: ../admin/constants.php:23
439
- msgid "The root directory that is backed up. Defaults to %s."
440
- msgstr ""
441
-
442
- #: ../admin/constants.php:20
443
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
444
- msgstr ""
445
-
446
- #: ../admin/constants.php:14
447
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
448
- msgstr ""
449
-
450
- #: ../backupwordpress.php:132
451
- msgid "BackUpWordPress requires WordPress version %s or greater."
452
- msgstr ""
453
-
454
- #: ../backupwordpress.php:170 ../admin/actions.php:487
455
- msgid "Cancel"
456
- msgstr ""
457
-
458
- #: ../admin/constants.php:11
459
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
460
- msgstr ""
461
-
462
- #: ../admin/constants.php:8 ../admin/constants.php:11
463
- #: ../admin/constants.php:14 ../admin/constants.php:17
464
- #: ../admin/constants.php:20 ../admin/constants.php:23
465
- #: ../admin/constants.php:26 ../classes/class-email.php:54
466
- msgid "e.g."
467
- msgstr ""
468
-
469
- #: ../admin/constants.php:3
470
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
471
- msgstr ""
472
-
473
- #: ../admin/actions.php:250 ../admin/actions.php:256
474
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
475
- msgstr ""
476
-
477
- #: ../functions/interface.php:78
478
- msgid "http://php.net/manual/en/features.safe-mode.php"
479
- msgstr ""
480
-
481
- #: ../functions/interface.php:78
482
- msgid "Safe Mode"
483
- msgstr ""
484
-
485
- #: ../functions/interface.php:89
486
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
487
- msgstr ""
488
-
489
- #: ../functions/interface.php:100
490
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
491
- msgstr ""
492
-
493
- #: ../functions/interface.php:261
494
- msgid "cancel"
495
- msgstr ""
496
-
497
- #: ../functions/interface.php:265
498
- msgid "Settings"
499
- msgstr ""
500
-
501
- #: ../functions/interface.php:268
502
- msgid "Excludes"
503
- msgstr ""
504
-
505
- #: ../functions/interface.php:29
506
- msgid "Download"
507
- msgstr ""
508
-
509
- #: ../functions/interface.php:54 ../functions/interface.php:67
510
- msgid "BackUpWordPress is almost ready."
511
- msgstr ""
512
-
513
- #: ../functions/interface.php:111
514
- msgid "BackUpWordPress detected issues with your last backup."
515
- msgstr ""
516
-
517
- #: ../functions/interface.php:234
518
- msgid "Database and Files"
519
- msgstr ""
520
-
521
- #: ../functions/interface.php:240
522
- msgid "Database"
523
- msgstr ""
524
-
525
- #: ../admin/actions.php:250 ../admin/actions.php:256
526
- #: ../functions/interface.php:78 ../functions/interface.php:89
527
- #: ../functions/interface.php:100
528
- msgid "BackUpWordPress has detected a problem."
529
- msgstr ""
530
-
531
- #: ../admin/actions.php:342
532
- msgid "Backup type cannot be empty"
533
- msgstr ""
534
-
535
- #: ../admin/actions.php:345
536
- msgid "Invalid backup type"
537
- msgstr ""
538
-
539
- #: ../admin/actions.php:357
540
- msgid "Schedule cannot be empty"
541
- msgstr ""
542
-
543
- #: ../admin/actions.php:360
544
- msgid "Invalid schedule"
545
- msgstr ""
546
-
547
- #: ../admin/actions.php:375
548
- msgid "Max backups must be a number"
549
- msgstr ""
550
-
551
- #: ../admin/actions.php:481
552
- msgid "%s didn't match any files."
553
- msgstr ""
554
-
555
- #: ../admin/backups.php:40
556
- msgid "add schedule"
557
- msgstr ""
558
-
559
- #: ../admin/backups.php:71
560
- msgid "Size"
561
- msgstr ""
562
-
563
- #: ../admin/backups.php:72
564
- msgid "Type"
565
- msgstr ""
566
-
567
- #: ../admin/backups.php:73
568
- msgid "Actions"
569
- msgstr ""
570
-
571
- #: ../admin/constants.php:3
572
- msgid "The Codex can help"
573
- msgstr ""
574
-
575
- #: ../admin/constants.php:8
576
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
577
- msgstr ""
578
-
579
- #: ../admin/constants.php:11 ../admin/constants.php:14
580
- msgid "database"
581
- msgstr ""
582
-
583
- #: ../admin/constants.php:14
584
- msgid "files"
585
- msgstr ""
586
-
587
- #: ../admin/constants.php:17
588
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
589
- msgstr ""
590
-
591
- #: ../admin/menu.php:10 ../admin/page.php:6
592
- msgid "Manage Backups"
593
- msgstr ""
594
-
595
- #: ../admin/menu.php:10 ../admin/menu.php:34
596
- msgid "Backups"
597
- msgstr ""
598
-
599
- #: ../admin/menu.php:69
600
- msgid "You are not using the latest stable version of BackUpWordPress"
601
- msgstr ""
602
-
603
- #: ../admin/menu.php:77
604
- msgid "FAQ"
605
- msgstr ""
606
-
607
- #: ../admin/constants.php:3 ../admin/menu.php:79
608
- msgid "Constants"
609
- msgstr ""
610
-
611
- #: ../admin/menu.php:82
612
- msgid "For more information:"
613
- msgstr ""
614
-
615
- #: ../admin/menu.php:84
616
- msgid "Support Forums"
617
- msgstr ""
618
-
619
- #: ../admin/menu.php:85
620
- msgid "Help with translation"
621
- msgstr ""
622
-
623
- #: ../admin/page.php:27
624
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
625
- msgstr ""
626
-
627
- #: ../admin/schedule-form-excludes.php:17
628
- msgid "Preview"
629
- msgstr ""
630
-
631
- #: ../admin/schedule-form-excludes.php:29
632
- msgid "Exclude Rules"
633
- msgstr ""
634
-
635
- #: ../admin/schedule-form-excludes.php:52
636
- msgid "Remove"
637
- msgstr ""
638
-
639
- #: ../admin/schedule-form-excludes.php:71
640
- msgid "Excluded"
641
- msgstr ""
642
-
643
- #: ../admin/schedule-form-excludes.php:75
644
- msgid "Included"
645
- msgstr ""
646
-
647
- #: ../admin/schedule-form-excludes.php:79
648
- msgid "Unreadable"
649
- msgstr ""
650
-
651
- #: ../admin/schedule-form-excludes.php:107
652
- msgid "Unreadable files can't be backed up"
653
- msgstr ""
654
-
655
- #: ../admin/schedule-form-excludes.php:113
656
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
657
- msgstr ""
658
-
659
- #: ../admin/schedule-form.php:11
660
- msgid "Backup"
661
- msgstr ""
662
-
663
- #: ../admin/schedule-form.php:14
664
- msgid "Both Database &amp; files"
665
- msgstr ""
666
-
667
- #: ../admin/schedule-form.php:15
668
- msgid "Files only"
669
- msgstr ""
670
-
671
- #: ../admin/schedule-form.php:16
672
- msgid "Database only"
673
- msgstr ""
674
-
675
- #: ../functions/interface.php:237
676
- msgid "Files"
677
- msgstr ""
678
-
679
- #: ../admin/schedule-form-excludes.php:7
680
- msgid "Manage Excludes"
681
- msgstr ""
682
-
683
- #: ../admin/schedule-form.php:23
684
- msgid "Schedule"
685
- msgstr ""
686
-
687
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
688
- msgid "Update"
689
- msgstr ""
690
-
691
- #: ../admin/schedule.php:19
692
- msgid "hourly at %s minutes past the hour"
693
- msgstr ""
694
-
695
- #: ../functions/interface.php:275
696
- msgid "Run now"
697
- msgstr ""
698
-
699
- #: ../functions/interface.php:32 ../functions/interface.php:277
700
- msgid "Delete"
701
- msgstr ""
702
-
703
- #: ../classes/class-email.php:164
704
- msgid "Backup of %s"
705
- msgstr ""
706
-
707
- #: ../functions/core.php:334
708
- msgid "This %s file ensures that other people cannot download your backup files."
709
- msgstr ""
1
+ # Translation of 2.x in Catalan
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: ca_ES\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr ""
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr ""
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr ""
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr ""
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr ""
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr ""
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr ""
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr ""
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr ""
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr ""
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr ""
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr ""
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr ""
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr ""
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr ""
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr ""
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr ""
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr ""
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr ""
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr ""
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr ""
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr ""
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr ""
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr ""
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr ""
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr ""
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr ""
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr ""
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr ""
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr ""
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr ""
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr ""
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr ""
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr ""
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr ""
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr ""
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr ""
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr ""
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr ""
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr ""
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr ""
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr ""
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr ""
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr ""
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr ""
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr ""
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr ""
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr ""
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr ""
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr ""
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr ""
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr ""
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr ""
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr ""
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr ""
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr ""
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr ""
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr ""
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr ""
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr ""
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr ""
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr ""
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr ""
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr ""
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr ""
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr ""
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr ""
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr ""
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr ""
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr ""
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+
328
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
329
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
330
+ msgstr ""
331
+
332
+ #: ../classes/class-email.php:169
333
+ msgid "The backup file should be attached to this email."
334
+ msgstr ""
335
+
336
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
337
+ msgid "You can download the backup file by clicking the link below:"
338
+ msgstr ""
339
+
340
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
341
+ msgid ""
342
+ "Kind Regards,\n"
343
+ "The Happy BackUpWordPress Backup Emailing Robot"
344
+ msgstr ""
345
+
346
+ #: ../classes/class-email.php:178
347
+ msgid "Unfortunately the backup file was too large to attach to this email."
348
+ msgstr ""
349
+
350
+ #: ../classes/wp-cli.php:19
351
+ msgid "Backup: Dumping database..."
352
+ msgstr ""
353
+
354
+ #: ../classes/wp-cli.php:23
355
+ msgid "Backup: Zipping everything up..."
356
+ msgstr ""
357
+
358
+ #: ../classes/wp-cli.php:38
359
+ msgid "Invalid backup path"
360
+ msgstr ""
361
+
362
+ #: ../classes/wp-cli.php:43
363
+ msgid "Invalid root path"
364
+ msgstr ""
365
+
366
+ #: ../classes/wp-cli.php:68
367
+ msgid "Backup Complete: "
368
+ msgstr ""
369
+
370
+ #: ../classes/wp-cli.php:71
371
+ msgid "Backup Failed"
372
+ msgstr ""
373
+
374
+ #: ../functions/core.php:229
375
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
376
+ msgstr ""
377
+
378
+ #: ../functions/interface.php:245
379
+ msgid "Legacy"
380
+ msgstr ""
381
+
382
+ #: ../functions/interface.php:67
383
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
384
+ msgstr ""
385
+
386
+ #: ../functions/interface.php:54
387
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
388
+ msgstr ""
389
+
390
+ #: ../functions/core.php:229
391
+ msgid "BackUpWordPress has setup your default schedules."
392
+ msgstr ""
393
+
394
+ #: ../classes/class-email.php:154
395
+ msgid "Backup of %s Failed"
396
+ msgstr ""
397
+
398
+ #: ../classes/class-email.php:69
399
+ msgid "Send an email notification to %s"
400
+ msgstr ""
401
+
402
+ #: ../classes/class-email.php:100
403
+ msgid "%s isn't a valid email"
404
+ msgstr ""
405
+
406
+ #: ../admin/schedule.php:4
407
+ msgid "Backups will be compressed and should be smaller than this."
408
+ msgstr ""
409
+
410
+ #: ../classes/class-email.php:31
411
+ msgid "Email notification"
412
+ msgstr ""
413
+
414
+ #: ../admin/schedule.php:19
415
+ msgid "hourly on the hour"
416
+ msgstr ""
417
+
418
+ #: ../admin/schedule.php:25
419
+ msgid "daily at %s"
420
+ msgstr ""
421
+
422
+ #: ../admin/schedule-form.php:41
423
+ msgid "Number of backups to store on this server"
424
+ msgstr ""
425
+
426
+ #: ../admin/schedule-form.php:7
427
+ msgid "Schedule Settings"
428
+ msgstr ""
429
+
430
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
431
+ msgid "Close"
432
+ msgstr ""
433
+
434
+ #: ../admin/menu.php:69
435
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
436
+ msgstr ""
437
+
438
+ #: ../admin/constants.php:23
439
+ msgid "The root directory that is backed up. Defaults to %s."
440
+ msgstr ""
441
+
442
+ #: ../admin/constants.php:20
443
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
444
+ msgstr ""
445
+
446
+ #: ../admin/constants.php:14
447
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
448
+ msgstr ""
449
+
450
+ #: ../backupwordpress.php:132
451
+ msgid "BackUpWordPress requires WordPress version %s or greater."
452
+ msgstr ""
453
+
454
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
455
+ msgid "Cancel"
456
+ msgstr ""
457
+
458
+ #: ../admin/constants.php:11
459
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
460
+ msgstr ""
461
+
462
+ #: ../admin/constants.php:8 ../admin/constants.php:11
463
+ #: ../admin/constants.php:14 ../admin/constants.php:17
464
+ #: ../admin/constants.php:20 ../admin/constants.php:23
465
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
466
+ msgid "e.g."
467
+ msgstr ""
468
+
469
+ #: ../admin/constants.php:3
470
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
471
+ msgstr ""
472
+
473
+ #: ../admin/actions.php:250 ../admin/actions.php:256
474
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
475
+ msgstr ""
476
+
477
+ #: ../functions/interface.php:78
478
+ msgid "http://php.net/manual/en/features.safe-mode.php"
479
+ msgstr ""
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "Safe Mode"
483
+ msgstr ""
484
+
485
+ #: ../functions/interface.php:89
486
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
487
+ msgstr ""
488
+
489
+ #: ../functions/interface.php:100
490
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
491
+ msgstr ""
492
+
493
+ #: ../functions/interface.php:261
494
+ msgid "cancel"
495
+ msgstr ""
496
+
497
+ #: ../functions/interface.php:265
498
+ msgid "Settings"
499
+ msgstr ""
500
+
501
+ #: ../functions/interface.php:268
502
+ msgid "Excludes"
503
+ msgstr ""
504
+
505
+ #: ../functions/interface.php:29
506
+ msgid "Download"
507
+ msgstr ""
508
+
509
+ #: ../functions/interface.php:54 ../functions/interface.php:67
510
+ msgid "BackUpWordPress is almost ready."
511
+ msgstr ""
512
+
513
+ #: ../functions/interface.php:111
514
+ msgid "BackUpWordPress detected issues with your last backup."
515
+ msgstr ""
516
+
517
+ #: ../functions/interface.php:234
518
+ msgid "Database and Files"
519
+ msgstr ""
520
+
521
+ #: ../functions/interface.php:240
522
+ msgid "Database"
523
+ msgstr ""
524
+
525
+ #: ../admin/actions.php:250 ../admin/actions.php:256
526
+ #: ../functions/interface.php:78 ../functions/interface.php:89
527
+ #: ../functions/interface.php:100
528
+ msgid "BackUpWordPress has detected a problem."
529
+ msgstr ""
530
+
531
+ #: ../admin/actions.php:342
532
+ msgid "Backup type cannot be empty"
533
+ msgstr ""
534
+
535
+ #: ../admin/actions.php:345
536
+ msgid "Invalid backup type"
537
+ msgstr ""
538
+
539
+ #: ../admin/actions.php:357
540
+ msgid "Schedule cannot be empty"
541
+ msgstr ""
542
+
543
+ #: ../admin/actions.php:360
544
+ msgid "Invalid schedule"
545
+ msgstr ""
546
+
547
+ #: ../admin/actions.php:375
548
+ msgid "Max backups must be a number"
549
+ msgstr ""
550
+
551
+ #: ../admin/actions.php:481
552
+ msgid "%s didn't match any files."
553
+ msgstr ""
554
+
555
+ #: ../admin/backups.php:40
556
+ msgid "add schedule"
557
+ msgstr ""
558
+
559
+ #: ../admin/backups.php:71
560
+ msgid "Size"
561
+ msgstr ""
562
+
563
+ #: ../admin/backups.php:72
564
+ msgid "Type"
565
+ msgstr ""
566
+
567
+ #: ../admin/backups.php:73
568
+ msgid "Actions"
569
+ msgstr ""
570
+
571
+ #: ../admin/constants.php:3
572
+ msgid "The Codex can help"
573
+ msgstr ""
574
+
575
+ #: ../admin/constants.php:8
576
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
577
+ msgstr ""
578
+
579
+ #: ../admin/constants.php:11 ../admin/constants.php:14
580
+ msgid "database"
581
+ msgstr ""
582
+
583
+ #: ../admin/constants.php:14
584
+ msgid "files"
585
+ msgstr ""
586
+
587
+ #: ../admin/constants.php:17
588
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
589
+ msgstr ""
590
+
591
+ #: ../admin/menu.php:10 ../admin/page.php:6
592
+ msgid "Manage Backups"
593
+ msgstr ""
594
+
595
+ #: ../admin/menu.php:10 ../admin/menu.php:34
596
+ msgid "Backups"
597
+ msgstr ""
598
+
599
+ #: ../admin/menu.php:69
600
+ msgid "You are not using the latest stable version of BackUpWordPress"
601
+ msgstr ""
602
+
603
+ #: ../admin/menu.php:77
604
+ msgid "FAQ"
605
+ msgstr ""
606
+
607
+ #: ../admin/constants.php:3 ../admin/menu.php:79
608
+ msgid "Constants"
609
+ msgstr ""
610
+
611
+ #: ../admin/menu.php:82
612
+ msgid "For more information:"
613
+ msgstr ""
614
+
615
+ #: ../admin/menu.php:84
616
+ msgid "Support Forums"
617
+ msgstr ""
618
+
619
+ #: ../admin/menu.php:85
620
+ msgid "Help with translation"
621
+ msgstr ""
622
+
623
+ #: ../admin/page.php:27
624
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
625
+ msgstr ""
626
+
627
+ #: ../admin/schedule-form-excludes.php:17
628
+ msgid "Preview"
629
+ msgstr ""
630
+
631
+ #: ../admin/schedule-form-excludes.php:29
632
+ msgid "Exclude Rules"
633
+ msgstr ""
634
+
635
+ #: ../admin/schedule-form-excludes.php:52
636
+ msgid "Remove"
637
+ msgstr ""
638
+
639
+ #: ../admin/schedule-form-excludes.php:71
640
+ msgid "Excluded"
641
+ msgstr ""
642
+
643
+ #: ../admin/schedule-form-excludes.php:75
644
+ msgid "Included"
645
+ msgstr ""
646
+
647
+ #: ../admin/schedule-form-excludes.php:79
648
+ msgid "Unreadable"
649
+ msgstr ""
650
+
651
+ #: ../admin/schedule-form-excludes.php:107
652
+ msgid "Unreadable files can't be backed up"
653
+ msgstr ""
654
+
655
+ #: ../admin/schedule-form-excludes.php:113
656
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
657
+ msgstr ""
658
+
659
+ #: ../admin/schedule-form.php:11
660
+ msgid "Backup"
661
+ msgstr ""
662
+
663
+ #: ../admin/schedule-form.php:14
664
+ msgid "Both Database &amp; files"
665
+ msgstr ""
666
+
667
+ #: ../admin/schedule-form.php:15
668
+ msgid "Files only"
669
+ msgstr ""
670
+
671
+ #: ../admin/schedule-form.php:16
672
+ msgid "Database only"
673
+ msgstr ""
674
+
675
+ #: ../functions/interface.php:237
676
+ msgid "Files"
677
+ msgstr ""
678
+
679
+ #: ../admin/schedule-form-excludes.php:7
680
+ msgid "Manage Excludes"
681
+ msgstr ""
682
+
683
+ #: ../admin/schedule-form.php:23
684
+ msgid "Schedule"
685
+ msgstr ""
686
+
687
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
688
+ msgid "Update"
689
+ msgstr ""
690
+
691
+ #: ../admin/schedule.php:19
692
+ msgid "hourly at %s minutes past the hour"
693
+ msgstr ""
694
+
695
+ #: ../functions/interface.php:275
696
+ msgid "Run now"
697
+ msgstr ""
698
+
699
+ #: ../functions/interface.php:32 ../functions/interface.php:277
700
+ msgid "Delete"
701
+ msgstr ""
702
+
703
+ #: ../classes/class-email.php:164
704
+ msgid "Backup of %s"
705
+ msgstr ""
706
+
707
+ #: ../functions/core.php:334
708
+ msgid "This %s file ensures that other people cannot download your backup files."
709
+ msgstr ""
languages/backupwordpress-cs_CZ.po CHANGED
@@ -1,713 +1,713 @@
1
- # Translation of 2.x in Czech
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: cs_CZ\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr ""
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr ""
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr ""
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr ""
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr ""
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr ""
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr ""
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr ""
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr ""
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr ""
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr ""
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr ""
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr ""
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr ""
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr ""
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr ""
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr ""
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr ""
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr ""
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr ""
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr "Zálohování skončilo s těmito chybami/varováními, ale je možné je ignorovat."
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr "Zálohování se nezdařilo."
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr "Odeslat oznámení o provedení zálohy a pokud je záloha malá (&lt; %s) tak bude připojena k tomuto emailu. Adresy více příjemců oddělte čárkou."
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr "Maximální velikost souboru se zálohou, která bude připojena k oznamovacímu emailu. Výchozí velikost je %s."
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr "Detaily této chyby můžete poslat emailem na adresu %s a pokusíme se zjistit příčiny."
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr "Jednou za hodinu"
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr "Dvakrát denně"
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr "Jednou denně"
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr "Jednou za týden"
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr "Jednou za čtrnáct dnů"
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr "Jednou měsíčně"
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr "Email na podporu"
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr "Nové pravidlo pro vyjmutí"
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr "Zde je odpověď serveru:"
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr "Pokud potřebujete nápovědu k nastavení, pročtěte si nejčastější otázky klepnutím v pravém horním rohu stránky na Nápověda. "
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr "Spouštím zálohu"
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr "Provádím dump databáze %s"
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr "Ověřuji dump databáze %s"
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr "Vytvářím zip archiv %s"
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr "Ověřuji zip archive %s"
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr "Dokončuji zálohování"
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr "BackUpWordPress nemusí správně fungovat pokud je php spuštěno s %s na "
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr "%1$s je spuštěno v %2$s, kontaktujte poskytovatele stránek a požádejte ho o zrušení. BackUpWordPress nemusí fungovat správně pokud je %3$s aktivní."
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr "Čas, kdy budou zálohy spuštěny. Výchozí je %s."
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr "Opravdu chcete smazat tento plán záloh? Všechny zálohy provedené tímto plánem budou také smazány."
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr "Klepněte na 'Zrušit' pro návrat nebo 'OK' pro smazání."
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr "Opravdu chcete smazat tuto zálohu?"
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr "Opravdu chcete odebrat toto pravidlo výjimek?"
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr "Omezením počtu uložených záloh na serveru dojde ke smazání již existujících záloh. Opravdu chcete akci provést?"
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr "Maximální počet nemůže být prázdný"
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr "Maximální počet musí být větší než 0"
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr "Vyjmout"
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr "výchozí"
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr "nastavené"
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr "Pouze ručně"
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr "nebude to trvat dlouho &hellip;"
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr "zjišťuji velikost všech souborů &hellip;"
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr "Příští záloha bude provedena v %1$s v %2$s"
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr "každých 12 hodin v %1$s &amp; %2$s"
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr "týdně v %1$s v %2$s"
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr "každé dva týdny v %1$s v %2$s"
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr "v %1$s každý měsíc v %2$s"
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr "ručně"
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr "tomto serveru"
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr "na %s neukládat žádné zálohy"
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr "na %2$s ponechat pouze poslední(ch) %1$s záloh(y)"
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr "Zálohovat mých %1$s %2$s %3$s, %4$s. %5$s"
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr "BackupWordPress nebyl schopen provést zálohu vašeho webu %1$s."
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr "Zde je seznam zjištěných problémů:"
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr "Pokud jsou výše uvedené chyby pro vás nesrozumitelné, přepošlete tento email na %3$s a my se pokusíme zjistit kde je problém"
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
- "S pozdravem,\n"
328
- "robot aplikace BackupWordPress "
329
-
330
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
- msgid "BackUpWordPress has completed a backup of your site %1$s."
332
- msgstr "BackupWordPress dokončil zálohu vašeho webu %1$s."
333
-
334
- #: ../classes/class-email.php:169
335
- msgid "The backup file should be attached to this email."
336
- msgstr "Záloha bude připojena jako příloha k tomuto emailu."
337
-
338
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
- msgid "You can download the backup file by clicking the link below:"
340
- msgstr "Zálohu si můžete stáhnout klepnutím na odkaz níže:"
341
-
342
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
- msgid ""
344
- "Kind Regards,\n"
345
- "The Happy BackUpWordPress Backup Emailing Robot"
346
- msgstr ""
347
- "S pozdravem,\n"
348
- "robot aplikace BackupWordPress "
349
-
350
- #: ../classes/class-email.php:178
351
- msgid "Unfortunately the backup file was too large to attach to this email."
352
- msgstr "Bohužel je záloha tak velká, že nemůže být přiložena k emailu."
353
-
354
- #: ../classes/wp-cli.php:19
355
- msgid "Backup: Dumping database..."
356
- msgstr "Záloha: provádím dump databáze..."
357
-
358
- #: ../classes/wp-cli.php:23
359
- msgid "Backup: Zipping everything up..."
360
- msgstr "Záloha: provádím komprimaci..."
361
-
362
- #: ../classes/wp-cli.php:38
363
- msgid "Invalid backup path"
364
- msgstr "Neplatná cesta k zálohám"
365
-
366
- #: ../classes/wp-cli.php:43
367
- msgid "Invalid root path"
368
- msgstr "Neplatná hlavní cesta"
369
-
370
- #: ../classes/wp-cli.php:68
371
- msgid "Backup Complete: "
372
- msgstr "Záloha ukončena:"
373
-
374
- #: ../classes/wp-cli.php:71
375
- msgid "Backup Failed"
376
- msgstr "Záloha selhala"
377
-
378
- #: ../functions/core.php:229
379
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
- msgstr "Ve výchozím nastavení BackUpWordPress provádí denní zálohu vašich souborů a týdně zálohuje jak soubory tak i databázi. Nastavení můžete změnit."
381
-
382
- #: ../functions/interface.php:245
383
- msgid "Legacy"
384
- msgstr ""
385
-
386
- #: ../functions/interface.php:67
387
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
- msgstr "Do adresáře pro zálohy nelze zapisovat, spusťte %1$s nebo %2$s nebo si nastavte oprávnění podle sebe."
389
-
390
- #: ../functions/interface.php:54
391
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
- msgstr "Adresář pro zálohování nelze vytvořit, protože do vašeho adresáře %1$s nelze zapisovat, spusťte %2$s nebo %3$s nebo si jej vytvořte sami."
393
-
394
- #: ../functions/core.php:229
395
- msgid "BackUpWordPress has setup your default schedules."
396
- msgstr "BackUpWordPress nastavil výchozí plán pro zálohování."
397
-
398
- #: ../classes/class-email.php:154
399
- msgid "Backup of %s Failed"
400
- msgstr "Záloha %s selhala"
401
-
402
- #: ../classes/class-email.php:69
403
- msgid "Send an email notification to %s"
404
- msgstr "Odeslat upozornění emailem na %s"
405
-
406
- #: ../classes/class-email.php:100
407
- msgid "%s isn't a valid email"
408
- msgstr "%s není platná emailová adresa"
409
-
410
- #: ../admin/schedule.php:4
411
- msgid "Backups will be compressed and should be smaller than this."
412
- msgstr "Záloha bude komprimována a velikost bude menší než tato."
413
-
414
- #: ../classes/class-email.php:31
415
- msgid "Email notification"
416
- msgstr "Upozornění emailem"
417
-
418
- #: ../admin/schedule.php:19
419
- msgid "hourly on the hour"
420
- msgstr "každou hodinu v celou"
421
-
422
- #: ../admin/schedule.php:25
423
- msgid "daily at %s"
424
- msgstr "denně v %s"
425
-
426
- #: ../admin/schedule-form.php:41
427
- msgid "Number of backups to store on this server"
428
- msgstr "Počet záloh uložených na tomto serveru"
429
-
430
- #: ../admin/schedule-form.php:7
431
- msgid "Schedule Settings"
432
- msgstr "Nastavení plánu záloh"
433
-
434
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
- msgid "Close"
436
- msgstr "Zavřít"
437
-
438
- #: ../admin/menu.php:69
439
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
- msgstr "Informace uvedené níže jsou pro verzi %1$s. Pokud chcete nápovědu k verzi %3$s zobrazte si soubor %2$s."
441
-
442
- #: ../admin/constants.php:23
443
- msgid "The root directory that is backed up. Defaults to %s."
444
- msgstr "Kořenový adresář, který bude zálohován. Výchozí je %s."
445
-
446
- #: ../admin/constants.php:20
447
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
- msgstr ""
449
-
450
- #: ../admin/constants.php:14
451
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
- msgstr "Cesta k %1$s. Pokud je dostupný, bude použit pro komprimaci vašich %2$s a %3$s."
453
-
454
- #: ../backupwordpress.php:132
455
- msgid "BackUpWordPress requires WordPress version %s or greater."
456
- msgstr "BackuWordPress vyžaduje WordPress verze %s nebo vyšší."
457
-
458
- #: ../backupwordpress.php:170 ../admin/actions.php:487
459
- msgid "Cancel"
460
- msgstr "Zrušit"
461
-
462
- #: ../admin/constants.php:11
463
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
- msgstr "Cesta k spustitelnému souboru %1$s. Pokud je dostupný, bude použit pro část %2$s zálohování."
465
-
466
- #: ../admin/constants.php:8 ../admin/constants.php:11
467
- #: ../admin/constants.php:14 ../admin/constants.php:17
468
- #: ../admin/constants.php:20 ../admin/constants.php:23
469
- #: ../admin/constants.php:26 ../classes/class-email.php:54
470
- msgid "e.g."
471
- msgstr "např."
472
-
473
- #: ../admin/constants.php:3
474
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
- msgstr ""
476
-
477
- #: ../admin/actions.php:250 ../admin/actions.php:256
478
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
- msgstr "%1$s vrací odpověď %2$s což může znamena, že cron úloha nebyla správně spuštěna. BackUpWordPress používá wp-cron pro spuštění naplánovaných záloh. Více detailů najdete na %3$s."
480
-
481
- #: ../functions/interface.php:78
482
- msgid "http://php.net/manual/en/features.safe-mode.php"
483
- msgstr "http://php.net/manual/en/features.safe-mode.php"
484
-
485
- #: ../functions/interface.php:78
486
- msgid "Safe Mode"
487
- msgstr "Safe Mode"
488
-
489
- #: ../functions/interface.php:89
490
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
- msgstr "Vámi zvolený adresář pro zálohy %1$s neexistuje a nelze jej vytvořit, zálohy se budou ukládat do %2$s."
492
-
493
- #: ../functions/interface.php:100
494
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
- msgstr "Do vámi zvoleného adresáře pro zálohy %1$s nelze zapisovat, zálohy se budou ukládat do %2$s."
496
-
497
- #: ../functions/interface.php:261
498
- msgid "cancel"
499
- msgstr "zrušit"
500
-
501
- #: ../functions/interface.php:265
502
- msgid "Settings"
503
- msgstr "Nastavení"
504
-
505
- #: ../functions/interface.php:268
506
- msgid "Excludes"
507
- msgstr "Vyjímky"
508
-
509
- #: ../functions/interface.php:29
510
- msgid "Download"
511
- msgstr "Stáhnout"
512
-
513
- #: ../functions/interface.php:54 ../functions/interface.php:67
514
- msgid "BackUpWordPress is almost ready."
515
- msgstr "BackUpWordPress je připraven."
516
-
517
- #: ../functions/interface.php:111
518
- msgid "BackUpWordPress detected issues with your last backup."
519
- msgstr "BackUpWordPress detekoval problém s poslední zálohou."
520
-
521
- #: ../functions/interface.php:234
522
- msgid "Database and Files"
523
- msgstr "Databáze a soubory"
524
-
525
- #: ../functions/interface.php:240
526
- msgid "Database"
527
- msgstr "Databáze"
528
-
529
- #: ../admin/actions.php:250 ../admin/actions.php:256
530
- #: ../functions/interface.php:78 ../functions/interface.php:89
531
- #: ../functions/interface.php:100
532
- msgid "BackUpWordPress has detected a problem."
533
- msgstr "BackUpWordPress detekoval problém."
534
-
535
- #: ../admin/actions.php:342
536
- msgid "Backup type cannot be empty"
537
- msgstr "Typ zálohy nemůže být prázdný"
538
-
539
- #: ../admin/actions.php:345
540
- msgid "Invalid backup type"
541
- msgstr "Neplatný typ zálohy"
542
-
543
- #: ../admin/actions.php:357
544
- msgid "Schedule cannot be empty"
545
- msgstr "Čas zálohy nemůže být prázdný"
546
-
547
- #: ../admin/actions.php:360
548
- msgid "Invalid schedule"
549
- msgstr "Neplatný čas pro zálohu"
550
-
551
- #: ../admin/actions.php:375
552
- msgid "Max backups must be a number"
553
- msgstr "Počet záloh musí být číslo"
554
-
555
- #: ../admin/actions.php:481
556
- msgid "%s didn't match any files."
557
- msgstr "%s nenalezl žádné soubory."
558
-
559
- #: ../admin/backups.php:40
560
- msgid "add schedule"
561
- msgstr "přidat plán zálohy"
562
-
563
- #: ../admin/backups.php:71
564
- msgid "Size"
565
- msgstr "Velikost"
566
-
567
- #: ../admin/backups.php:72
568
- msgid "Type"
569
- msgstr "Typ"
570
-
571
- #: ../admin/backups.php:73
572
- msgid "Actions"
573
- msgstr "Akce"
574
-
575
- #: ../admin/constants.php:3
576
- msgid "The Codex can help"
577
- msgstr "Codex s pomocí"
578
-
579
- #: ../admin/constants.php:8
580
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
- msgstr "Cesta pro uložení souborů se zálohami, výchozí je %s."
582
-
583
- #: ../admin/constants.php:11 ../admin/constants.php:14
584
- msgid "database"
585
- msgstr "databáze"
586
-
587
- #: ../admin/constants.php:14
588
- msgid "files"
589
- msgstr "souborů"
590
-
591
- #: ../admin/constants.php:17
592
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
- msgstr "Čárkou oddělený seznam souborů nebo adresářů, které se nebudou zálohovat, adresář se zálohami je vyjmut automaticky."
594
-
595
- #: ../admin/menu.php:10 ../admin/page.php:6
596
- msgid "Manage Backups"
597
- msgstr "Správa zálohování"
598
-
599
- #: ../admin/menu.php:10 ../admin/menu.php:34
600
- msgid "Backups"
601
- msgstr "Zálohy"
602
-
603
- #: ../admin/menu.php:69
604
- msgid "You are not using the latest stable version of BackUpWordPress"
605
- msgstr "Nepoužíváte poslední stabilní verzi zásuvného modulu BackUpWordPress"
606
-
607
- #: ../admin/menu.php:77
608
- msgid "FAQ"
609
- msgstr "FAQ"
610
-
611
- #: ../admin/constants.php:3 ../admin/menu.php:79
612
- msgid "Constants"
613
- msgstr "Konstanty"
614
-
615
- #: ../admin/menu.php:82
616
- msgid "For more information:"
617
- msgstr "Více informace najdete na:"
618
-
619
- #: ../admin/menu.php:84
620
- msgid "Support Forums"
621
- msgstr "Fórum pro podporu"
622
-
623
- #: ../admin/menu.php:85
624
- msgid "Help with translation"
625
- msgstr "Pomoc s překladem"
626
-
627
- #: ../admin/page.php:27
628
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
- msgstr "Před dalším spuštěním nástroje BackUpWordPress je nutné opravit chyby uvedené výše."
630
-
631
- #: ../admin/schedule-form-excludes.php:17
632
- msgid "Preview"
633
- msgstr "Náhled"
634
-
635
- #: ../admin/schedule-form-excludes.php:29
636
- msgid "Exclude Rules"
637
- msgstr "Pravidla pro vyjmutí"
638
-
639
- #: ../admin/schedule-form-excludes.php:52
640
- msgid "Remove"
641
- msgstr "Odebrat"
642
-
643
- #: ../admin/schedule-form-excludes.php:71
644
- msgid "Excluded"
645
- msgstr "Vyjmuto"
646
-
647
- #: ../admin/schedule-form-excludes.php:75
648
- msgid "Included"
649
- msgstr "Zahrnuto"
650
-
651
- #: ../admin/schedule-form-excludes.php:79
652
- msgid "Unreadable"
653
- msgstr "Nečitelné"
654
-
655
- #: ../admin/schedule-form-excludes.php:107
656
- msgid "Unreadable files can't be backed up"
657
- msgstr "Nečitelné soubory nelze zálohovat"
658
-
659
- #: ../admin/schedule-form-excludes.php:113
660
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
- msgstr "Veilikost webu je %s. Záloha bude komprimována aby se zmenšila velikost."
662
-
663
- #: ../admin/schedule-form.php:11
664
- msgid "Backup"
665
- msgstr "Zálohovat"
666
-
667
- #: ../admin/schedule-form.php:14
668
- msgid "Both Database &amp; files"
669
- msgstr "Databázi i soubory"
670
-
671
- #: ../admin/schedule-form.php:15
672
- msgid "Files only"
673
- msgstr "Pouze soubory"
674
-
675
- #: ../admin/schedule-form.php:16
676
- msgid "Database only"
677
- msgstr "Pouze databázi"
678
-
679
- #: ../functions/interface.php:237
680
- msgid "Files"
681
- msgstr "Soubory"
682
-
683
- #: ../admin/schedule-form-excludes.php:7
684
- msgid "Manage Excludes"
685
- msgstr "Správa vyjímek"
686
-
687
- #: ../admin/schedule-form.php:23
688
- msgid "Schedule"
689
- msgstr "Plán záloh"
690
-
691
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
- msgid "Update"
693
- msgstr "Aktualizovat"
694
-
695
- #: ../admin/schedule.php:19
696
- msgid "hourly at %s minutes past the hour"
697
- msgstr "každou hodinu %s minut po celé"
698
-
699
- #: ../functions/interface.php:275
700
- msgid "Run now"
701
- msgstr "Spustit nyní"
702
-
703
- #: ../functions/interface.php:32 ../functions/interface.php:277
704
- msgid "Delete"
705
- msgstr "Smazat"
706
-
707
- #: ../classes/class-email.php:164
708
- msgid "Backup of %s"
709
- msgstr "Záloha webu %s"
710
-
711
- #: ../functions/core.php:334
712
- msgid "This %s file ensures that other people cannot download your backup files."
713
- msgstr "Soubor %s zajišťuje, že ostatní uživatelé si nemohou stáhnout soubory s vašimi zálohami."
1
+ # Translation of 2.x in Czech
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: cs_CZ\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr ""
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr ""
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr ""
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr ""
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr ""
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr ""
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr ""
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr ""
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr ""
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr ""
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr ""
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr ""
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr ""
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr ""
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr ""
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr ""
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr ""
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr ""
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr ""
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr ""
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr "Zálohování skončilo s těmito chybami/varováními, ale je možné je ignorovat."
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr "Zálohování se nezdařilo."
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr "Odeslat oznámení o provedení zálohy a pokud je záloha malá (&lt; %s) tak bude připojena k tomuto emailu. Adresy více příjemců oddělte čárkou."
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr "Maximální velikost souboru se zálohou, která bude připojena k oznamovacímu emailu. Výchozí velikost je %s."
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr "Detaily této chyby můžete poslat emailem na adresu %s a pokusíme se zjistit příčiny."
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr "Jednou za hodinu"
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr "Dvakrát denně"
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr "Jednou denně"
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr "Jednou za týden"
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr "Jednou za čtrnáct dnů"
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr "Jednou měsíčně"
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr "Email na podporu"
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr "Nové pravidlo pro vyjmutí"
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr "Zde je odpověď serveru:"
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr "Pokud potřebujete nápovědu k nastavení, pročtěte si nejčastější otázky klepnutím v pravém horním rohu stránky na Nápověda. "
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr "Spouštím zálohu"
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr "Provádím dump databáze %s"
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr "Ověřuji dump databáze %s"
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr "Vytvářím zip archiv %s"
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr "Ověřuji zip archive %s"
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr "Dokončuji zálohování"
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr "BackUpWordPress nemusí správně fungovat pokud je php spuštěno s %s na "
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr "%1$s je spuštěno v %2$s, kontaktujte poskytovatele stránek a požádejte ho o zrušení. BackUpWordPress nemusí fungovat správně pokud je %3$s aktivní."
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr "Čas, kdy budou zálohy spuštěny. Výchozí je %s."
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr "Opravdu chcete smazat tento plán záloh? Všechny zálohy provedené tímto plánem budou také smazány."
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr "Klepněte na 'Zrušit' pro návrat nebo 'OK' pro smazání."
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr "Opravdu chcete smazat tuto zálohu?"
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr "Opravdu chcete odebrat toto pravidlo výjimek?"
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr "Omezením počtu uložených záloh na serveru dojde ke smazání již existujících záloh. Opravdu chcete akci provést?"
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr "Maximální počet nemůže být prázdný"
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr "Maximální počet musí být větší než 0"
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr "Vyjmout"
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr "výchozí"
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr "nastavené"
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr "Pouze ručně"
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr "nebude to trvat dlouho &hellip;"
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr "zjišťuji velikost všech souborů &hellip;"
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr "Příští záloha bude provedena v %1$s v %2$s"
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr "každých 12 hodin v %1$s &amp; %2$s"
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr "týdně v %1$s v %2$s"
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr "každé dva týdny v %1$s v %2$s"
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr "v %1$s každý měsíc v %2$s"
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr "ručně"
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr "tomto serveru"
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr "na %s neukládat žádné zálohy"
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr "na %2$s ponechat pouze poslední(ch) %1$s záloh(y)"
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr "Zálohovat mých %1$s %2$s %3$s, %4$s. %5$s"
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr "BackupWordPress nebyl schopen provést zálohu vašeho webu %1$s."
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr "Zde je seznam zjištěných problémů:"
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr "Pokud jsou výše uvedené chyby pro vás nesrozumitelné, přepošlete tento email na %3$s a my se pokusíme zjistit kde je problém"
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+ "S pozdravem,\n"
328
+ "robot aplikace BackupWordPress "
329
+
330
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
332
+ msgstr "BackupWordPress dokončil zálohu vašeho webu %1$s."
333
+
334
+ #: ../classes/class-email.php:169
335
+ msgid "The backup file should be attached to this email."
336
+ msgstr "Záloha bude připojena jako příloha k tomuto emailu."
337
+
338
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
+ msgid "You can download the backup file by clicking the link below:"
340
+ msgstr "Zálohu si můžete stáhnout klepnutím na odkaz níže:"
341
+
342
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
+ msgid ""
344
+ "Kind Regards,\n"
345
+ "The Happy BackUpWordPress Backup Emailing Robot"
346
+ msgstr ""
347
+ "S pozdravem,\n"
348
+ "robot aplikace BackupWordPress "
349
+
350
+ #: ../classes/class-email.php:178
351
+ msgid "Unfortunately the backup file was too large to attach to this email."
352
+ msgstr "Bohužel je záloha tak velká, že nemůže být přiložena k emailu."
353
+
354
+ #: ../classes/wp-cli.php:19
355
+ msgid "Backup: Dumping database..."
356
+ msgstr "Záloha: provádím dump databáze..."
357
+
358
+ #: ../classes/wp-cli.php:23
359
+ msgid "Backup: Zipping everything up..."
360
+ msgstr "Záloha: provádím komprimaci..."
361
+
362
+ #: ../classes/wp-cli.php:38
363
+ msgid "Invalid backup path"
364
+ msgstr "Neplatná cesta k zálohám"
365
+
366
+ #: ../classes/wp-cli.php:43
367
+ msgid "Invalid root path"
368
+ msgstr "Neplatná hlavní cesta"
369
+
370
+ #: ../classes/wp-cli.php:68
371
+ msgid "Backup Complete: "
372
+ msgstr "Záloha ukončena:"
373
+
374
+ #: ../classes/wp-cli.php:71
375
+ msgid "Backup Failed"
376
+ msgstr "Záloha selhala"
377
+
378
+ #: ../functions/core.php:229
379
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
+ msgstr "Ve výchozím nastavení BackUpWordPress provádí denní zálohu vašich souborů a týdně zálohuje jak soubory tak i databázi. Nastavení můžete změnit."
381
+
382
+ #: ../functions/interface.php:245
383
+ msgid "Legacy"
384
+ msgstr ""
385
+
386
+ #: ../functions/interface.php:67
387
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
+ msgstr "Do adresáře pro zálohy nelze zapisovat, spusťte %1$s nebo %2$s nebo si nastavte oprávnění podle sebe."
389
+
390
+ #: ../functions/interface.php:54
391
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
+ msgstr "Adresář pro zálohování nelze vytvořit, protože do vašeho adresáře %1$s nelze zapisovat, spusťte %2$s nebo %3$s nebo si jej vytvořte sami."
393
+
394
+ #: ../functions/core.php:229
395
+ msgid "BackUpWordPress has setup your default schedules."
396
+ msgstr "BackUpWordPress nastavil výchozí plán pro zálohování."
397
+
398
+ #: ../classes/class-email.php:154
399
+ msgid "Backup of %s Failed"
400
+ msgstr "Záloha %s selhala"
401
+
402
+ #: ../classes/class-email.php:69
403
+ msgid "Send an email notification to %s"
404
+ msgstr "Odeslat upozornění emailem na %s"
405
+
406
+ #: ../classes/class-email.php:100
407
+ msgid "%s isn't a valid email"
408
+ msgstr "%s není platná emailová adresa"
409
+
410
+ #: ../admin/schedule.php:4
411
+ msgid "Backups will be compressed and should be smaller than this."
412
+ msgstr "Záloha bude komprimována a velikost bude menší než tato."
413
+
414
+ #: ../classes/class-email.php:31
415
+ msgid "Email notification"
416
+ msgstr "Upozornění emailem"
417
+
418
+ #: ../admin/schedule.php:19
419
+ msgid "hourly on the hour"
420
+ msgstr "každou hodinu v celou"
421
+
422
+ #: ../admin/schedule.php:25
423
+ msgid "daily at %s"
424
+ msgstr "denně v %s"
425
+
426
+ #: ../admin/schedule-form.php:41
427
+ msgid "Number of backups to store on this server"
428
+ msgstr "Počet záloh uložených na tomto serveru"
429
+
430
+ #: ../admin/schedule-form.php:7
431
+ msgid "Schedule Settings"
432
+ msgstr "Nastavení plánu záloh"
433
+
434
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
+ msgid "Close"
436
+ msgstr "Zavřít"
437
+
438
+ #: ../admin/menu.php:69
439
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
+ msgstr "Informace uvedené níže jsou pro verzi %1$s. Pokud chcete nápovědu k verzi %3$s zobrazte si soubor %2$s."
441
+
442
+ #: ../admin/constants.php:23
443
+ msgid "The root directory that is backed up. Defaults to %s."
444
+ msgstr "Kořenový adresář, který bude zálohován. Výchozí je %s."
445
+
446
+ #: ../admin/constants.php:20
447
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
+ msgstr ""
449
+
450
+ #: ../admin/constants.php:14
451
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
+ msgstr "Cesta k %1$s. Pokud je dostupný, bude použit pro komprimaci vašich %2$s a %3$s."
453
+
454
+ #: ../backupwordpress.php:132
455
+ msgid "BackUpWordPress requires WordPress version %s or greater."
456
+ msgstr "BackuWordPress vyžaduje WordPress verze %s nebo vyšší."
457
+
458
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
459
+ msgid "Cancel"
460
+ msgstr "Zrušit"
461
+
462
+ #: ../admin/constants.php:11
463
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
+ msgstr "Cesta k spustitelnému souboru %1$s. Pokud je dostupný, bude použit pro část %2$s zálohování."
465
+
466
+ #: ../admin/constants.php:8 ../admin/constants.php:11
467
+ #: ../admin/constants.php:14 ../admin/constants.php:17
468
+ #: ../admin/constants.php:20 ../admin/constants.php:23
469
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
470
+ msgid "e.g."
471
+ msgstr "např."
472
+
473
+ #: ../admin/constants.php:3
474
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
+ msgstr ""
476
+
477
+ #: ../admin/actions.php:250 ../admin/actions.php:256
478
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
+ msgstr "%1$s vrací odpověď %2$s což může znamena, že cron úloha nebyla správně spuštěna. BackUpWordPress používá wp-cron pro spuštění naplánovaných záloh. Více detailů najdete na %3$s."
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "http://php.net/manual/en/features.safe-mode.php"
483
+ msgstr "http://php.net/manual/en/features.safe-mode.php"
484
+
485
+ #: ../functions/interface.php:78
486
+ msgid "Safe Mode"
487
+ msgstr "Safe Mode"
488
+
489
+ #: ../functions/interface.php:89
490
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
+ msgstr "Vámi zvolený adresář pro zálohy %1$s neexistuje a nelze jej vytvořit, zálohy se budou ukládat do %2$s."
492
+
493
+ #: ../functions/interface.php:100
494
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
+ msgstr "Do vámi zvoleného adresáře pro zálohy %1$s nelze zapisovat, zálohy se budou ukládat do %2$s."
496
+
497
+ #: ../functions/interface.php:261
498
+ msgid "cancel"
499
+ msgstr "zrušit"
500
+
501
+ #: ../functions/interface.php:265
502
+ msgid "Settings"
503
+ msgstr "Nastavení"
504
+
505
+ #: ../functions/interface.php:268
506
+ msgid "Excludes"
507
+ msgstr "Vyjímky"
508
+
509
+ #: ../functions/interface.php:29
510
+ msgid "Download"
511
+ msgstr "Stáhnout"
512
+
513
+ #: ../functions/interface.php:54 ../functions/interface.php:67
514
+ msgid "BackUpWordPress is almost ready."
515
+ msgstr "BackUpWordPress je připraven."
516
+
517
+ #: ../functions/interface.php:111
518
+ msgid "BackUpWordPress detected issues with your last backup."
519
+ msgstr "BackUpWordPress detekoval problém s poslední zálohou."
520
+
521
+ #: ../functions/interface.php:234
522
+ msgid "Database and Files"
523
+ msgstr "Databáze a soubory"
524
+
525
+ #: ../functions/interface.php:240
526
+ msgid "Database"
527
+ msgstr "Databáze"
528
+
529
+ #: ../admin/actions.php:250 ../admin/actions.php:256
530
+ #: ../functions/interface.php:78 ../functions/interface.php:89
531
+ #: ../functions/interface.php:100
532
+ msgid "BackUpWordPress has detected a problem."
533
+ msgstr "BackUpWordPress detekoval problém."
534
+
535
+ #: ../admin/actions.php:342
536
+ msgid "Backup type cannot be empty"
537
+ msgstr "Typ zálohy nemůže být prázdný"
538
+
539
+ #: ../admin/actions.php:345
540
+ msgid "Invalid backup type"
541
+ msgstr "Neplatný typ zálohy"
542
+
543
+ #: ../admin/actions.php:357
544
+ msgid "Schedule cannot be empty"
545
+ msgstr "Čas zálohy nemůže být prázdný"
546
+
547
+ #: ../admin/actions.php:360
548
+ msgid "Invalid schedule"
549
+ msgstr "Neplatný čas pro zálohu"
550
+
551
+ #: ../admin/actions.php:375
552
+ msgid "Max backups must be a number"
553
+ msgstr "Počet záloh musí být číslo"
554
+
555
+ #: ../admin/actions.php:481
556
+ msgid "%s didn't match any files."
557
+ msgstr "%s nenalezl žádné soubory."
558
+
559
+ #: ../admin/backups.php:40
560
+ msgid "add schedule"
561
+ msgstr "přidat plán zálohy"
562
+
563
+ #: ../admin/backups.php:71
564
+ msgid "Size"
565
+ msgstr "Velikost"
566
+
567
+ #: ../admin/backups.php:72
568
+ msgid "Type"
569
+ msgstr "Typ"
570
+
571
+ #: ../admin/backups.php:73
572
+ msgid "Actions"
573
+ msgstr "Akce"
574
+
575
+ #: ../admin/constants.php:3
576
+ msgid "The Codex can help"
577
+ msgstr "Codex s pomocí"
578
+
579
+ #: ../admin/constants.php:8
580
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
+ msgstr "Cesta pro uložení souborů se zálohami, výchozí je %s."
582
+
583
+ #: ../admin/constants.php:11 ../admin/constants.php:14
584
+ msgid "database"
585
+ msgstr "databáze"
586
+
587
+ #: ../admin/constants.php:14
588
+ msgid "files"
589
+ msgstr "souborů"
590
+
591
+ #: ../admin/constants.php:17
592
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
+ msgstr "Čárkou oddělený seznam souborů nebo adresářů, které se nebudou zálohovat, adresář se zálohami je vyjmut automaticky."
594
+
595
+ #: ../admin/menu.php:10 ../admin/page.php:6
596
+ msgid "Manage Backups"
597
+ msgstr "Správa zálohování"
598
+
599
+ #: ../admin/menu.php:10 ../admin/menu.php:34
600
+ msgid "Backups"
601
+ msgstr "Zálohy"
602
+
603
+ #: ../admin/menu.php:69
604
+ msgid "You are not using the latest stable version of BackUpWordPress"
605
+ msgstr "Nepoužíváte poslední stabilní verzi zásuvného modulu BackUpWordPress"
606
+
607
+ #: ../admin/menu.php:77
608
+ msgid "FAQ"
609
+ msgstr "FAQ"
610
+
611
+ #: ../admin/constants.php:3 ../admin/menu.php:79
612
+ msgid "Constants"
613
+ msgstr "Konstanty"
614
+
615
+ #: ../admin/menu.php:82
616
+ msgid "For more information:"
617
+ msgstr "Více informace najdete na:"
618
+
619
+ #: ../admin/menu.php:84
620
+ msgid "Support Forums"
621
+ msgstr "Fórum pro podporu"
622
+
623
+ #: ../admin/menu.php:85
624
+ msgid "Help with translation"
625
+ msgstr "Pomoc s překladem"
626
+
627
+ #: ../admin/page.php:27
628
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
+ msgstr "Před dalším spuštěním nástroje BackUpWordPress je nutné opravit chyby uvedené výše."
630
+
631
+ #: ../admin/schedule-form-excludes.php:17
632
+ msgid "Preview"
633
+ msgstr "Náhled"
634
+
635
+ #: ../admin/schedule-form-excludes.php:29
636
+ msgid "Exclude Rules"
637
+ msgstr "Pravidla pro vyjmutí"
638
+
639
+ #: ../admin/schedule-form-excludes.php:52
640
+ msgid "Remove"
641
+ msgstr "Odebrat"
642
+
643
+ #: ../admin/schedule-form-excludes.php:71
644
+ msgid "Excluded"
645
+ msgstr "Vyjmuto"
646
+
647
+ #: ../admin/schedule-form-excludes.php:75
648
+ msgid "Included"
649
+ msgstr "Zahrnuto"
650
+
651
+ #: ../admin/schedule-form-excludes.php:79
652
+ msgid "Unreadable"
653
+ msgstr "Nečitelné"
654
+
655
+ #: ../admin/schedule-form-excludes.php:107
656
+ msgid "Unreadable files can't be backed up"
657
+ msgstr "Nečitelné soubory nelze zálohovat"
658
+
659
+ #: ../admin/schedule-form-excludes.php:113
660
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
+ msgstr "Veilikost webu je %s. Záloha bude komprimována aby se zmenšila velikost."
662
+
663
+ #: ../admin/schedule-form.php:11
664
+ msgid "Backup"
665
+ msgstr "Zálohovat"
666
+
667
+ #: ../admin/schedule-form.php:14
668
+ msgid "Both Database &amp; files"
669
+ msgstr "Databázi i soubory"
670
+
671
+ #: ../admin/schedule-form.php:15
672
+ msgid "Files only"
673
+ msgstr "Pouze soubory"
674
+
675
+ #: ../admin/schedule-form.php:16
676
+ msgid "Database only"
677
+ msgstr "Pouze databázi"
678
+
679
+ #: ../functions/interface.php:237
680
+ msgid "Files"
681
+ msgstr "Soubory"
682
+
683
+ #: ../admin/schedule-form-excludes.php:7
684
+ msgid "Manage Excludes"
685
+ msgstr "Správa vyjímek"
686
+
687
+ #: ../admin/schedule-form.php:23
688
+ msgid "Schedule"
689
+ msgstr "Plán záloh"
690
+
691
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
+ msgid "Update"
693
+ msgstr "Aktualizovat"
694
+
695
+ #: ../admin/schedule.php:19
696
+ msgid "hourly at %s minutes past the hour"
697
+ msgstr "každou hodinu %s minut po celé"
698
+
699
+ #: ../functions/interface.php:275
700
+ msgid "Run now"
701
+ msgstr "Spustit nyní"
702
+
703
+ #: ../functions/interface.php:32 ../functions/interface.php:277
704
+ msgid "Delete"
705
+ msgstr "Smazat"
706
+
707
+ #: ../classes/class-email.php:164
708
+ msgid "Backup of %s"
709
+ msgstr "Záloha webu %s"
710
+
711
+ #: ../functions/core.php:334
712
+ msgid "This %s file ensures that other people cannot download your backup files."
713
+ msgstr "Soubor %s zajišťuje, že ostatní uživatelé si nemohou stáhnout soubory s vašimi zálohami."
languages/backupwordpress-da_DK.po CHANGED
@@ -1,713 +1,713 @@
1
- # Translation of 2.x in Danish
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: da_DK\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr ""
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr ""
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr ""
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr ""
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr ""
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr ""
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr ""
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr ""
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr ""
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr ""
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr ""
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr ""
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr ""
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr ""
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr ""
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr ""
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr ""
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr ""
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr ""
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr ""
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr ""
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr ""
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr ""
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr ""
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr "Du kan sende detaljer om denne fejl til %s, så de kan undersøge sagen nærmere."
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr "En gang i timen"
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr "To gange dagligt"
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr "En gang dagligt"
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr "En gang om ugen"
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr "En gang hver anden uge"
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr "En gang om måneden"
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr "Send e-mail til support"
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr "Nye eksluderingsregler"
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr "Her er svaret fra serveren:"
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr "Hvis du har brug for hjælp til at få tingene til at virke, så kig i FAQ'en ved at klikke på Hjælp i øverste højre hjørne af denne side."
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr "Starter sikkerhedskopiering"
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr "Gemmer database %s"
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr "Kontroller database-kopi %s"
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr "Opretter zip-arkiv %s"
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr "Kontrollerer zip-arkiv %s"
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr "Afslutter sikkerhedskopiering"
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr "BackUpWordpress virker ikke når php kører med %s slået til"
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr "%1$s kører i %2$s. Kontakt venligst dit webhotel og bed dem slå det fra. BackUpWordPress virker ikke korrekt, mens %3$s er slået til."
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr "Det tidspunkt dine planlagt sikkerhedskopieringer skal foretages på. Standard er %s."
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr "Er du sikker på, at du vil slette denne planlagte sikkerhedskopiering? Alle dens sikkerhedskopier vil også blive slettet."
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr "'Annuller' for at få tilbage, 'OK' for at slette."
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr "Er du sikker på, at du vil slette denne sikkerhedskopi."
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr "Er du sikker på, at du vil fjerne denne ekskluderingsregel?"
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr "Hvis du begrænser antallet af sikkerhedskopier, der gemmes på denne server, vil nogle af de eksisterende sikkerhedskopier blive slettet. Er du sikker på, at det er det, du vil?"
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr "Maksimalt antal sikkerhedskopier kan ikke være tomt."
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr "Maksimalt antal sikkerhedskopier skal være større end 0"
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr "Ekskludér"
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr "standard"
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr "defineret"
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr "Kun manuelt"
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr "det her burde ikke tage så lang tid &hellip;"
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr "Beregner størrelse af dit websted&hellip;"
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr "Den næste sikkerhedskopi bliver taget %1$s klokken %2$s"
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr "hver 12. time klokken %1$s &amp; %2$s"
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr "ugentligt på %1$s klokken %2$s"
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr "Hver anden uge på %1$s klokken %2$s"
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr "Den %1$s. hver måned klokken %2$s"
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr "manuelt"
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr "denne server"
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr "Gem ingen sikkerhedskopier på %s"
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr "gem kun de seneste %1$s sikkerhedskopier på %2$s"
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr "Sikkerhedskopiér min %1$s %2$s %3$s, %4$s. %5$s"
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr "BackUpWordPress kunne ikke sikkerhedskopiere dit websted %1$s."
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr "Her er de fejl, der opstod:"
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr "Hvis fejlene ovenfor ligner volapyk, så send denne e-mail til %3$s, så kigger vi på det."
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
- "Med venlig hilsen\n"
328
- "Den beklagende BackUpWordPress sikkerhedskopi-email-robot"
329
-
330
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
- msgid "BackUpWordPress has completed a backup of your site %1$s."
332
- msgstr "BackUpWordPress har fuldført sikkerhedskopiering af dit websted %1$s."
333
-
334
- #: ../classes/class-email.php:169
335
- msgid "The backup file should be attached to this email."
336
- msgstr "Sikkerhedskopien er vedhæftet denne e-mail."
337
-
338
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
- msgid "You can download the backup file by clicking the link below:"
340
- msgstr "Du kan hente sikkerhedskopien ved at klikke på linket herunder:"
341
-
342
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
- msgid ""
344
- "Kind Regards,\n"
345
- "The Happy BackUpWordPress Backup Emailing Robot"
346
- msgstr ""
347
- "Med venlig hilsen\n"
348
- "Den glade BackupWordPress sikkerhedskopi-email-robot"
349
-
350
- #: ../classes/class-email.php:178
351
- msgid "Unfortunately the backup file was too large to attach to this email."
352
- msgstr "Desværre var sikkerhedskopien for stor til at vedhæfte denne e-mail."
353
-
354
- #: ../classes/wp-cli.php:19
355
- msgid "Backup: Dumping database..."
356
- msgstr "Sikkerhedskopiering: Eksporterer database..."
357
-
358
- #: ../classes/wp-cli.php:23
359
- msgid "Backup: Zipping everything up..."
360
- msgstr "Sikkerhedskopieringen: Pakker det hele i en zip-fil..."
361
-
362
- #: ../classes/wp-cli.php:38
363
- msgid "Invalid backup path"
364
- msgstr "Ugyldig sti til sikkerhedskopi"
365
-
366
- #: ../classes/wp-cli.php:43
367
- msgid "Invalid root path"
368
- msgstr "Ugyldig rodmappe."
369
-
370
- #: ../classes/wp-cli.php:68
371
- msgid "Backup Complete: "
372
- msgstr "Sikkerhedskopiering fuldført:"
373
-
374
- #: ../classes/wp-cli.php:71
375
- msgid "Backup Failed"
376
- msgstr "Sikkerhedskopiering fejlede."
377
-
378
- #: ../functions/core.php:229
379
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
- msgstr "Som udgangspunkt sikkerhedskopierer BackUpWordPress din database dagligt, og din database &amp; dine filer ugentligt. Du kan ændre disse indstillinger."
381
-
382
- #: ../functions/interface.php:245
383
- msgid "Legacy"
384
- msgstr "Tidligere"
385
-
386
- #: ../functions/interface.php:67
387
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
- msgstr "Der kan ikke oprettes filer i mappen til sikkerhedskopier. Kør %1$s eller %2$s eller tildel selv rettigheder."
389
-
390
- #: ../functions/interface.php:54
391
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
- msgstr "Mappen til sikkerhedskopier kan ikke oprettes, fordi mappen %1$s ikke er skrivbar. Kør %2$s eller %3$s eller opret mappen selv."
393
-
394
- #: ../functions/core.php:229
395
- msgid "BackUpWordPress has setup your default schedules."
396
- msgstr "BackUpWordPress har konfigureret din tidsplaner."
397
-
398
- #: ../classes/class-email.php:154
399
- msgid "Backup of %s Failed"
400
- msgstr "Sikkerhedskopiering af %s fejlede."
401
-
402
- #: ../classes/class-email.php:69
403
- msgid "Send an email notification to %s"
404
- msgstr "Send en notifikation via e-mail til %s"
405
-
406
- #: ../classes/class-email.php:100
407
- msgid "%s isn't a valid email"
408
- msgstr "%s er ikke en gyldig e-mail-adresse."
409
-
410
- #: ../admin/schedule.php:4
411
- msgid "Backups will be compressed and should be smaller than this."
412
- msgstr "Sikkerhedskopier komprimeres, så de bør blive mindre end dette."
413
-
414
- #: ../classes/class-email.php:31
415
- msgid "Email notification"
416
- msgstr "Notifikation via e-mail"
417
-
418
- #: ../admin/schedule.php:19
419
- msgid "hourly on the hour"
420
- msgstr "Hver hele time"
421
-
422
- #: ../admin/schedule.php:25
423
- msgid "daily at %s"
424
- msgstr "dagligt klokken %s"
425
-
426
- #: ../admin/schedule-form.php:41
427
- msgid "Number of backups to store on this server"
428
- msgstr "Antal sikkerhedskopier der skal gemmes på denne server"
429
-
430
- #: ../admin/schedule-form.php:7
431
- msgid "Schedule Settings"
432
- msgstr "Indstilling af tidsplan"
433
-
434
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
- msgid "Close"
436
- msgstr "Luk"
437
-
438
- #: ../admin/menu.php:69
439
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
- msgstr "Informationen herunder gælder version %1$s. Kig i filen %2$s for at få hjælp der passer til version %3$s."
441
-
442
- #: ../admin/constants.php:23
443
- msgid "The root directory that is backed up. Defaults to %s."
444
- msgstr "Rodmappen, der skal sikkerhedskopieres. Standard er %s."
445
-
446
- #: ../admin/constants.php:20
447
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
- msgstr "Den egenskab der skal bruges, når %1$s kaldes. Standard er %2$s."
449
-
450
- #: ../admin/constants.php:14
451
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
- msgstr "Stien til kommandofilen for %1$s. Den bliver brugt til at zippe dine %2$s og %3$s, hvis tilgængelig."
453
-
454
- #: ../backupwordpress.php:132
455
- msgid "BackUpWordPress requires WordPress version %s or greater."
456
- msgstr "BackUpWordPress kræver WordPress version %s eller nyere."
457
-
458
- #: ../backupwordpress.php:170 ../admin/actions.php:487
459
- msgid "Cancel"
460
- msgstr "Annuller"
461
-
462
- #: ../admin/constants.php:11
463
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
- msgstr "Stien til din %1$s kommandofil. Den bliver brugt til %2s-delen af sikkerhedskopieringen, hvis tilgængelig."
465
-
466
- #: ../admin/constants.php:8 ../admin/constants.php:11
467
- #: ../admin/constants.php:14 ../admin/constants.php:17
468
- #: ../admin/constants.php:20 ../admin/constants.php:23
469
- #: ../admin/constants.php:26 ../classes/class-email.php:54
470
- msgid "e.g."
471
- msgstr "f. eks."
472
-
473
- #: ../admin/constants.php:3
474
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
- msgstr "Du kan %1$s enhver af følgende %2$s i din %3$s for at angive avancerede insdstillinger. %4$s. Angivne %5$s bliver fremhævet."
476
-
477
- #: ../admin/actions.php:250 ../admin/actions.php:256
478
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
- msgstr "%1$s returnerer svaret %2$s, hvilken kunne betyde, at crob jobs ikke bliver startet rigtigt. BackUpWordPress bruger wp-cron til at foretage planlagte sikkerhedskopieringen. Se %3$s for flere detaljer."
480
-
481
- #: ../functions/interface.php:78
482
- msgid "http://php.net/manual/en/features.safe-mode.php"
483
- msgstr "http://php.net/manual/en/features.safe-mode.php"
484
-
485
- #: ../functions/interface.php:78
486
- msgid "Safe Mode"
487
- msgstr "Fejlsikret tilstand."
488
-
489
- #: ../functions/interface.php:89
490
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
- msgstr "Mappen til sikkerhedskopier, %1$s, eksisterer ikke og kan ikke oprettes. Dine sikkerhedskopier bliver gem i %2$s i stedet."
492
-
493
- #: ../functions/interface.php:100
494
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
- msgstr "Mappen til sikkerhedskopier, %1$s, er ikke skrivbar. Nye sikkerhedskopier bliver gemt i %2$s i stedet."
496
-
497
- #: ../functions/interface.php:261
498
- msgid "cancel"
499
- msgstr "annuller"
500
-
501
- #: ../functions/interface.php:265
502
- msgid "Settings"
503
- msgstr "Indstillinger"
504
-
505
- #: ../functions/interface.php:268
506
- msgid "Excludes"
507
- msgstr "Eksluderinger"
508
-
509
- #: ../functions/interface.php:29
510
- msgid "Download"
511
- msgstr "Hent"
512
-
513
- #: ../functions/interface.php:54 ../functions/interface.php:67
514
- msgid "BackUpWordPress is almost ready."
515
- msgstr "BackUpWordPress er næsten klar."
516
-
517
- #: ../functions/interface.php:111
518
- msgid "BackUpWordPress detected issues with your last backup."
519
- msgstr "BakcUpWordPress har opdaget fejl ved din seneste sikkerhedskopi."
520
-
521
- #: ../functions/interface.php:234
522
- msgid "Database and Files"
523
- msgstr "Database og filer"
524
-
525
- #: ../functions/interface.php:240
526
- msgid "Database"
527
- msgstr "Database"
528
-
529
- #: ../admin/actions.php:250 ../admin/actions.php:256
530
- #: ../functions/interface.php:78 ../functions/interface.php:89
531
- #: ../functions/interface.php:100
532
- msgid "BackUpWordPress has detected a problem."
533
- msgstr "BackUpWordPress har opdaget et problem."
534
-
535
- #: ../admin/actions.php:342
536
- msgid "Backup type cannot be empty"
537
- msgstr "Typen af sikkerhedskopi skal angives."
538
-
539
- #: ../admin/actions.php:345
540
- msgid "Invalid backup type"
541
- msgstr "Ugyldig type af sikkerhedskopi"
542
-
543
- #: ../admin/actions.php:357
544
- msgid "Schedule cannot be empty"
545
- msgstr "Tidsplan skal angives."
546
-
547
- #: ../admin/actions.php:360
548
- msgid "Invalid schedule"
549
- msgstr "Ugyldig tidsplan."
550
-
551
- #: ../admin/actions.php:375
552
- msgid "Max backups must be a number"
553
- msgstr "Maksimalt antal sikkerhedskopier skal angives med et tal"
554
-
555
- #: ../admin/actions.php:481
556
- msgid "%s didn't match any files."
557
- msgstr "%s passer ikke på nogen filer."
558
-
559
- #: ../admin/backups.php:40
560
- msgid "add schedule"
561
- msgstr "tilføj tidsplan"
562
-
563
- #: ../admin/backups.php:71
564
- msgid "Size"
565
- msgstr "Størrelse"
566
-
567
- #: ../admin/backups.php:72
568
- msgid "Type"
569
- msgstr "Type"
570
-
571
- #: ../admin/backups.php:73
572
- msgid "Actions"
573
- msgstr "Handlinger"
574
-
575
- #: ../admin/constants.php:3
576
- msgid "The Codex can help"
577
- msgstr "Codex'et kan hjælpe"
578
-
579
- #: ../admin/constants.php:8
580
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
- msgstr "Stien til den mappe, hvor du vil gemme dine sikkerhedskopier. Standard er %s."
582
-
583
- #: ../admin/constants.php:11 ../admin/constants.php:14
584
- msgid "database"
585
- msgstr "database"
586
-
587
- #: ../admin/constants.php:14
588
- msgid "files"
589
- msgstr "filer"
590
-
591
- #: ../admin/constants.php:17
592
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
- msgstr "Komma-separeret liste af filer eller mapper, der skal ekskluderes. Mappen med sikkerhedskopier bliver automatisk ekskluderet."
594
-
595
- #: ../admin/menu.php:10 ../admin/page.php:6
596
- msgid "Manage Backups"
597
- msgstr "Håndter sikkerhedskopier"
598
-
599
- #: ../admin/menu.php:10 ../admin/menu.php:34
600
- msgid "Backups"
601
- msgstr "Sikkerhedskopier"
602
-
603
- #: ../admin/menu.php:69
604
- msgid "You are not using the latest stable version of BackUpWordPress"
605
- msgstr "Du bruger ikke den nyeste, stabile version af BackUpWordPress"
606
-
607
- #: ../admin/menu.php:77
608
- msgid "FAQ"
609
- msgstr "FAQ"
610
-
611
- #: ../admin/constants.php:3 ../admin/menu.php:79
612
- msgid "Constants"
613
- msgstr "Konstanter"
614
-
615
- #: ../admin/menu.php:82
616
- msgid "For more information:"
617
- msgstr "For yderligere oplysninger"
618
-
619
- #: ../admin/menu.php:84
620
- msgid "Support Forums"
621
- msgstr "Support-forums"
622
-
623
- #: ../admin/menu.php:85
624
- msgid "Help with translation"
625
- msgstr "Hjælp med oversættelse"
626
-
627
- #: ../admin/page.php:27
628
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
- msgstr "Du skal løse de problemer, der er beskrevet ovenfor, før BackUpWordPress kan starte."
630
-
631
- #: ../admin/schedule-form-excludes.php:17
632
- msgid "Preview"
633
- msgstr "Preview"
634
-
635
- #: ../admin/schedule-form-excludes.php:29
636
- msgid "Exclude Rules"
637
- msgstr "Ekskluderingsregler"
638
-
639
- #: ../admin/schedule-form-excludes.php:52
640
- msgid "Remove"
641
- msgstr "Fjern"
642
-
643
- #: ../admin/schedule-form-excludes.php:71
644
- msgid "Excluded"
645
- msgstr "Ekskluderet"
646
-
647
- #: ../admin/schedule-form-excludes.php:75
648
- msgid "Included"
649
- msgstr "Inkluderet"
650
-
651
- #: ../admin/schedule-form-excludes.php:79
652
- msgid "Unreadable"
653
- msgstr "Ikke-læsbar"
654
-
655
- #: ../admin/schedule-form-excludes.php:107
656
- msgid "Unreadable files can't be backed up"
657
- msgstr "Filer, der ikke kan læses, kan ikke sikkerhedskopieres."
658
-
659
- #: ../admin/schedule-form-excludes.php:113
660
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
- msgstr "Dit websted er %s. Sikkerhedskopier komprimeres, og vil derfor blive mindre end det."
662
-
663
- #: ../admin/schedule-form.php:11
664
- msgid "Backup"
665
- msgstr "Sikkerhedskopier"
666
-
667
- #: ../admin/schedule-form.php:14
668
- msgid "Both Database &amp; files"
669
- msgstr "Både database &amp; filer"
670
-
671
- #: ../admin/schedule-form.php:15
672
- msgid "Files only"
673
- msgstr "Kun filer"
674
-
675
- #: ../admin/schedule-form.php:16
676
- msgid "Database only"
677
- msgstr "Kun database"
678
-
679
- #: ../functions/interface.php:237
680
- msgid "Files"
681
- msgstr "Filer"
682
-
683
- #: ../admin/schedule-form-excludes.php:7
684
- msgid "Manage Excludes"
685
- msgstr "Håndter ekskluderinger"
686
-
687
- #: ../admin/schedule-form.php:23
688
- msgid "Schedule"
689
- msgstr "Tidsplan"
690
-
691
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
- msgid "Update"
693
- msgstr "Opdater"
694
-
695
- #: ../admin/schedule.php:19
696
- msgid "hourly at %s minutes past the hour"
697
- msgstr "Hver time klokken %s minutter over hel."
698
-
699
- #: ../functions/interface.php:275
700
- msgid "Run now"
701
- msgstr "Kør nu"
702
-
703
- #: ../functions/interface.php:32 ../functions/interface.php:277
704
- msgid "Delete"
705
- msgstr "Slet"
706
-
707
- #: ../classes/class-email.php:164
708
- msgid "Backup of %s"
709
- msgstr "Sikkerhedskopiering af %s."
710
-
711
- #: ../functions/core.php:334
712
- msgid "This %s file ensures that other people cannot download your backup files."
713
- msgstr "Denne %s fil sikrer, at andre ikke kan hente dine sikkerhedskopier."
1
+ # Translation of 2.x in Danish
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: da_DK\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr ""
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr ""
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr ""
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr ""
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr ""
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr ""
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr ""
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr ""
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr ""
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr ""
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr ""
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr ""
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr ""
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr ""
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr ""
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr ""
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr ""
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr ""
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr ""
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr ""
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr ""
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr ""
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr ""
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr ""
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr "Du kan sende detaljer om denne fejl til %s, så de kan undersøge sagen nærmere."
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr "En gang i timen"
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr "To gange dagligt"
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr "En gang dagligt"
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr "En gang om ugen"
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr "En gang hver anden uge"
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr "En gang om måneden"
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr "Send e-mail til support"
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr "Nye eksluderingsregler"
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr "Her er svaret fra serveren:"
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr "Hvis du har brug for hjælp til at få tingene til at virke, så kig i FAQ'en ved at klikke på Hjælp i øverste højre hjørne af denne side."
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr "Starter sikkerhedskopiering"
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr "Gemmer database %s"
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr "Kontroller database-kopi %s"
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr "Opretter zip-arkiv %s"
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr "Kontrollerer zip-arkiv %s"
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr "Afslutter sikkerhedskopiering"
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr "BackUpWordpress virker ikke når php kører med %s slået til"
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr "%1$s kører i %2$s. Kontakt venligst dit webhotel og bed dem slå det fra. BackUpWordPress virker ikke korrekt, mens %3$s er slået til."
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr "Det tidspunkt dine planlagt sikkerhedskopieringer skal foretages på. Standard er %s."
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr "Er du sikker på, at du vil slette denne planlagte sikkerhedskopiering? Alle dens sikkerhedskopier vil også blive slettet."
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr "'Annuller' for at få tilbage, 'OK' for at slette."
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr "Er du sikker på, at du vil slette denne sikkerhedskopi."
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr "Er du sikker på, at du vil fjerne denne ekskluderingsregel?"
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr "Hvis du begrænser antallet af sikkerhedskopier, der gemmes på denne server, vil nogle af de eksisterende sikkerhedskopier blive slettet. Er du sikker på, at det er det, du vil?"
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr "Maksimalt antal sikkerhedskopier kan ikke være tomt."
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr "Maksimalt antal sikkerhedskopier skal være større end 0"
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr "Ekskludér"
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr "standard"
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr "defineret"
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr "Kun manuelt"
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr "det her burde ikke tage så lang tid &hellip;"
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr "Beregner størrelse af dit websted&hellip;"
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr "Den næste sikkerhedskopi bliver taget %1$s klokken %2$s"
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr "hver 12. time klokken %1$s &amp; %2$s"
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr "ugentligt på %1$s klokken %2$s"
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr "Hver anden uge på %1$s klokken %2$s"
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr "Den %1$s. hver måned klokken %2$s"
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr "manuelt"
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr "denne server"
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr "Gem ingen sikkerhedskopier på %s"
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr "gem kun de seneste %1$s sikkerhedskopier på %2$s"
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr "Sikkerhedskopiér min %1$s %2$s %3$s, %4$s. %5$s"
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr "BackUpWordPress kunne ikke sikkerhedskopiere dit websted %1$s."
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr "Her er de fejl, der opstod:"
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr "Hvis fejlene ovenfor ligner volapyk, så send denne e-mail til %3$s, så kigger vi på det."
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+ "Med venlig hilsen\n"
328
+ "Den beklagende BackUpWordPress sikkerhedskopi-email-robot"
329
+
330
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
332
+ msgstr "BackUpWordPress har fuldført sikkerhedskopiering af dit websted %1$s."
333
+
334
+ #: ../classes/class-email.php:169
335
+ msgid "The backup file should be attached to this email."
336
+ msgstr "Sikkerhedskopien er vedhæftet denne e-mail."
337
+
338
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
+ msgid "You can download the backup file by clicking the link below:"
340
+ msgstr "Du kan hente sikkerhedskopien ved at klikke på linket herunder:"
341
+
342
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
+ msgid ""
344
+ "Kind Regards,\n"
345
+ "The Happy BackUpWordPress Backup Emailing Robot"
346
+ msgstr ""
347
+ "Med venlig hilsen\n"
348
+ "Den glade BackupWordPress sikkerhedskopi-email-robot"
349
+
350
+ #: ../classes/class-email.php:178
351
+ msgid "Unfortunately the backup file was too large to attach to this email."
352
+ msgstr "Desværre var sikkerhedskopien for stor til at vedhæfte denne e-mail."
353
+
354
+ #: ../classes/wp-cli.php:19
355
+ msgid "Backup: Dumping database..."
356
+ msgstr "Sikkerhedskopiering: Eksporterer database..."
357
+
358
+ #: ../classes/wp-cli.php:23
359
+ msgid "Backup: Zipping everything up..."
360
+ msgstr "Sikkerhedskopieringen: Pakker det hele i en zip-fil..."
361
+
362
+ #: ../classes/wp-cli.php:38
363
+ msgid "Invalid backup path"
364
+ msgstr "Ugyldig sti til sikkerhedskopi"
365
+
366
+ #: ../classes/wp-cli.php:43
367
+ msgid "Invalid root path"
368
+ msgstr "Ugyldig rodmappe."
369
+
370
+ #: ../classes/wp-cli.php:68
371
+ msgid "Backup Complete: "
372
+ msgstr "Sikkerhedskopiering fuldført:"
373
+
374
+ #: ../classes/wp-cli.php:71
375
+ msgid "Backup Failed"
376
+ msgstr "Sikkerhedskopiering fejlede."
377
+
378
+ #: ../functions/core.php:229
379
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
+ msgstr "Som udgangspunkt sikkerhedskopierer BackUpWordPress din database dagligt, og din database &amp; dine filer ugentligt. Du kan ændre disse indstillinger."
381
+
382
+ #: ../functions/interface.php:245
383
+ msgid "Legacy"
384
+ msgstr "Tidligere"
385
+
386
+ #: ../functions/interface.php:67
387
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
+ msgstr "Der kan ikke oprettes filer i mappen til sikkerhedskopier. Kør %1$s eller %2$s eller tildel selv rettigheder."
389
+
390
+ #: ../functions/interface.php:54
391
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
+ msgstr "Mappen til sikkerhedskopier kan ikke oprettes, fordi mappen %1$s ikke er skrivbar. Kør %2$s eller %3$s eller opret mappen selv."
393
+
394
+ #: ../functions/core.php:229
395
+ msgid "BackUpWordPress has setup your default schedules."
396
+ msgstr "BackUpWordPress har konfigureret din tidsplaner."
397
+
398
+ #: ../classes/class-email.php:154
399
+ msgid "Backup of %s Failed"
400
+ msgstr "Sikkerhedskopiering af %s fejlede."
401
+
402
+ #: ../classes/class-email.php:69
403
+ msgid "Send an email notification to %s"
404
+ msgstr "Send en notifikation via e-mail til %s"
405
+
406
+ #: ../classes/class-email.php:100
407
+ msgid "%s isn't a valid email"
408
+ msgstr "%s er ikke en gyldig e-mail-adresse."
409
+
410
+ #: ../admin/schedule.php:4
411
+ msgid "Backups will be compressed and should be smaller than this."
412
+ msgstr "Sikkerhedskopier komprimeres, så de bør blive mindre end dette."
413
+
414
+ #: ../classes/class-email.php:31
415
+ msgid "Email notification"
416
+ msgstr "Notifikation via e-mail"
417
+
418
+ #: ../admin/schedule.php:19
419
+ msgid "hourly on the hour"
420
+ msgstr "Hver hele time"
421
+
422
+ #: ../admin/schedule.php:25
423
+ msgid "daily at %s"
424
+ msgstr "dagligt klokken %s"
425
+
426
+ #: ../admin/schedule-form.php:41
427
+ msgid "Number of backups to store on this server"
428
+ msgstr "Antal sikkerhedskopier der skal gemmes på denne server"
429
+
430
+ #: ../admin/schedule-form.php:7
431
+ msgid "Schedule Settings"
432
+ msgstr "Indstilling af tidsplan"
433
+
434
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
+ msgid "Close"
436
+ msgstr "Luk"
437
+
438
+ #: ../admin/menu.php:69
439
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
+ msgstr "Informationen herunder gælder version %1$s. Kig i filen %2$s for at få hjælp der passer til version %3$s."
441
+
442
+ #: ../admin/constants.php:23
443
+ msgid "The root directory that is backed up. Defaults to %s."
444
+ msgstr "Rodmappen, der skal sikkerhedskopieres. Standard er %s."
445
+
446
+ #: ../admin/constants.php:20
447
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
+ msgstr "Den egenskab der skal bruges, når %1$s kaldes. Standard er %2$s."
449
+
450
+ #: ../admin/constants.php:14
451
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
+ msgstr "Stien til kommandofilen for %1$s. Den bliver brugt til at zippe dine %2$s og %3$s, hvis tilgængelig."
453
+
454
+ #: ../backupwordpress.php:132
455
+ msgid "BackUpWordPress requires WordPress version %s or greater."
456
+ msgstr "BackUpWordPress kræver WordPress version %s eller nyere."
457
+
458
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
459
+ msgid "Cancel"
460
+ msgstr "Annuller"
461
+
462
+ #: ../admin/constants.php:11
463
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
+ msgstr "Stien til din %1$s kommandofil. Den bliver brugt til %2s-delen af sikkerhedskopieringen, hvis tilgængelig."
465
+
466
+ #: ../admin/constants.php:8 ../admin/constants.php:11
467
+ #: ../admin/constants.php:14 ../admin/constants.php:17
468
+ #: ../admin/constants.php:20 ../admin/constants.php:23
469
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
470
+ msgid "e.g."
471
+ msgstr "f. eks."
472
+
473
+ #: ../admin/constants.php:3
474
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
+ msgstr "Du kan %1$s enhver af følgende %2$s i din %3$s for at angive avancerede insdstillinger. %4$s. Angivne %5$s bliver fremhævet."
476
+
477
+ #: ../admin/actions.php:250 ../admin/actions.php:256
478
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
+ msgstr "%1$s returnerer svaret %2$s, hvilken kunne betyde, at crob jobs ikke bliver startet rigtigt. BackUpWordPress bruger wp-cron til at foretage planlagte sikkerhedskopieringen. Se %3$s for flere detaljer."
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "http://php.net/manual/en/features.safe-mode.php"
483
+ msgstr "http://php.net/manual/en/features.safe-mode.php"
484
+
485
+ #: ../functions/interface.php:78
486
+ msgid "Safe Mode"
487
+ msgstr "Fejlsikret tilstand."
488
+
489
+ #: ../functions/interface.php:89
490
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
+ msgstr "Mappen til sikkerhedskopier, %1$s, eksisterer ikke og kan ikke oprettes. Dine sikkerhedskopier bliver gem i %2$s i stedet."
492
+
493
+ #: ../functions/interface.php:100
494
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
+ msgstr "Mappen til sikkerhedskopier, %1$s, er ikke skrivbar. Nye sikkerhedskopier bliver gemt i %2$s i stedet."
496
+
497
+ #: ../functions/interface.php:261
498
+ msgid "cancel"
499
+ msgstr "annuller"
500
+
501
+ #: ../functions/interface.php:265
502
+ msgid "Settings"
503
+ msgstr "Indstillinger"
504
+
505
+ #: ../functions/interface.php:268
506
+ msgid "Excludes"
507
+ msgstr "Eksluderinger"
508
+
509
+ #: ../functions/interface.php:29
510
+ msgid "Download"
511
+ msgstr "Hent"
512
+
513
+ #: ../functions/interface.php:54 ../functions/interface.php:67
514
+ msgid "BackUpWordPress is almost ready."
515
+ msgstr "BackUpWordPress er næsten klar."
516
+
517
+ #: ../functions/interface.php:111
518
+ msgid "BackUpWordPress detected issues with your last backup."
519
+ msgstr "BakcUpWordPress har opdaget fejl ved din seneste sikkerhedskopi."
520
+
521
+ #: ../functions/interface.php:234
522
+ msgid "Database and Files"
523
+ msgstr "Database og filer"
524
+
525
+ #: ../functions/interface.php:240
526
+ msgid "Database"
527
+ msgstr "Database"
528
+
529
+ #: ../admin/actions.php:250 ../admin/actions.php:256
530
+ #: ../functions/interface.php:78 ../functions/interface.php:89
531
+ #: ../functions/interface.php:100
532
+ msgid "BackUpWordPress has detected a problem."
533
+ msgstr "BackUpWordPress har opdaget et problem."
534
+
535
+ #: ../admin/actions.php:342
536
+ msgid "Backup type cannot be empty"
537
+ msgstr "Typen af sikkerhedskopi skal angives."
538
+
539
+ #: ../admin/actions.php:345
540
+ msgid "Invalid backup type"
541
+ msgstr "Ugyldig type af sikkerhedskopi"
542
+
543
+ #: ../admin/actions.php:357
544
+ msgid "Schedule cannot be empty"
545
+ msgstr "Tidsplan skal angives."
546
+
547
+ #: ../admin/actions.php:360
548
+ msgid "Invalid schedule"
549
+ msgstr "Ugyldig tidsplan."
550
+
551
+ #: ../admin/actions.php:375
552
+ msgid "Max backups must be a number"
553
+ msgstr "Maksimalt antal sikkerhedskopier skal angives med et tal"
554
+
555
+ #: ../admin/actions.php:481
556
+ msgid "%s didn't match any files."
557
+ msgstr "%s passer ikke på nogen filer."
558
+
559
+ #: ../admin/backups.php:40
560
+ msgid "add schedule"
561
+ msgstr "tilføj tidsplan"
562
+
563
+ #: ../admin/backups.php:71
564
+ msgid "Size"
565
+ msgstr "Størrelse"
566
+
567
+ #: ../admin/backups.php:72
568
+ msgid "Type"
569
+ msgstr "Type"
570
+
571
+ #: ../admin/backups.php:73
572
+ msgid "Actions"
573
+ msgstr "Handlinger"
574
+
575
+ #: ../admin/constants.php:3
576
+ msgid "The Codex can help"
577
+ msgstr "Codex'et kan hjælpe"
578
+
579
+ #: ../admin/constants.php:8
580
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
+ msgstr "Stien til den mappe, hvor du vil gemme dine sikkerhedskopier. Standard er %s."
582
+
583
+ #: ../admin/constants.php:11 ../admin/constants.php:14
584
+ msgid "database"
585
+ msgstr "database"
586
+
587
+ #: ../admin/constants.php:14
588
+ msgid "files"
589
+ msgstr "filer"
590
+
591
+ #: ../admin/constants.php:17
592
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
+ msgstr "Komma-separeret liste af filer eller mapper, der skal ekskluderes. Mappen med sikkerhedskopier bliver automatisk ekskluderet."
594
+
595
+ #: ../admin/menu.php:10 ../admin/page.php:6
596
+ msgid "Manage Backups"
597
+ msgstr "Håndter sikkerhedskopier"
598
+
599
+ #: ../admin/menu.php:10 ../admin/menu.php:34
600
+ msgid "Backups"
601
+ msgstr "Sikkerhedskopier"
602
+
603
+ #: ../admin/menu.php:69
604
+ msgid "You are not using the latest stable version of BackUpWordPress"
605
+ msgstr "Du bruger ikke den nyeste, stabile version af BackUpWordPress"
606
+
607
+ #: ../admin/menu.php:77
608
+ msgid "FAQ"
609
+ msgstr "FAQ"
610
+
611
+ #: ../admin/constants.php:3 ../admin/menu.php:79
612
+ msgid "Constants"
613
+ msgstr "Konstanter"
614
+
615
+ #: ../admin/menu.php:82
616
+ msgid "For more information:"
617
+ msgstr "For yderligere oplysninger"
618
+
619
+ #: ../admin/menu.php:84
620
+ msgid "Support Forums"
621
+ msgstr "Support-forums"
622
+
623
+ #: ../admin/menu.php:85
624
+ msgid "Help with translation"
625
+ msgstr "Hjælp med oversættelse"
626
+
627
+ #: ../admin/page.php:27
628
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
+ msgstr "Du skal løse de problemer, der er beskrevet ovenfor, før BackUpWordPress kan starte."
630
+
631
+ #: ../admin/schedule-form-excludes.php:17
632
+ msgid "Preview"
633
+ msgstr "Preview"
634
+
635
+ #: ../admin/schedule-form-excludes.php:29
636
+ msgid "Exclude Rules"
637
+ msgstr "Ekskluderingsregler"
638
+
639
+ #: ../admin/schedule-form-excludes.php:52
640
+ msgid "Remove"
641
+ msgstr "Fjern"
642
+
643
+ #: ../admin/schedule-form-excludes.php:71
644
+ msgid "Excluded"
645
+ msgstr "Ekskluderet"
646
+
647
+ #: ../admin/schedule-form-excludes.php:75
648
+ msgid "Included"
649
+ msgstr "Inkluderet"
650
+
651
+ #: ../admin/schedule-form-excludes.php:79
652
+ msgid "Unreadable"
653
+ msgstr "Ikke-læsbar"
654
+
655
+ #: ../admin/schedule-form-excludes.php:107
656
+ msgid "Unreadable files can't be backed up"
657
+ msgstr "Filer, der ikke kan læses, kan ikke sikkerhedskopieres."
658
+
659
+ #: ../admin/schedule-form-excludes.php:113
660
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
+ msgstr "Dit websted er %s. Sikkerhedskopier komprimeres, og vil derfor blive mindre end det."
662
+
663
+ #: ../admin/schedule-form.php:11
664
+ msgid "Backup"
665
+ msgstr "Sikkerhedskopier"
666
+
667
+ #: ../admin/schedule-form.php:14
668
+ msgid "Both Database &amp; files"
669
+ msgstr "Både database &amp; filer"
670
+
671
+ #: ../admin/schedule-form.php:15
672
+ msgid "Files only"
673
+ msgstr "Kun filer"
674
+
675
+ #: ../admin/schedule-form.php:16
676
+ msgid "Database only"
677
+ msgstr "Kun database"
678
+
679
+ #: ../functions/interface.php:237
680
+ msgid "Files"
681
+ msgstr "Filer"
682
+
683
+ #: ../admin/schedule-form-excludes.php:7
684
+ msgid "Manage Excludes"
685
+ msgstr "Håndter ekskluderinger"
686
+
687
+ #: ../admin/schedule-form.php:23
688
+ msgid "Schedule"
689
+ msgstr "Tidsplan"
690
+
691
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
+ msgid "Update"
693
+ msgstr "Opdater"
694
+
695
+ #: ../admin/schedule.php:19
696
+ msgid "hourly at %s minutes past the hour"
697
+ msgstr "Hver time klokken %s minutter over hel."
698
+
699
+ #: ../functions/interface.php:275
700
+ msgid "Run now"
701
+ msgstr "Kør nu"
702
+
703
+ #: ../functions/interface.php:32 ../functions/interface.php:277
704
+ msgid "Delete"
705
+ msgstr "Slet"
706
+
707
+ #: ../classes/class-email.php:164
708
+ msgid "Backup of %s"
709
+ msgstr "Sikkerhedskopiering af %s."
710
+
711
+ #: ../functions/core.php:334
712
+ msgid "This %s file ensures that other people cannot download your backup files."
713
+ msgstr "Denne %s fil sikrer, at andre ikke kan hente dine sikkerhedskopier."
languages/backupwordpress-de_DE.po CHANGED
@@ -1,713 +1,713 @@
1
- # Translation of 2.x in German
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: de_DE\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr "BackUpWordPress benötigt die PHP-Version %s oder neuer."
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr "Hier erscheinen deine Backups, sobald sie erstellt wurden."
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr "% Backups durchgeführt"
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr "Keine Backups durchgeführt"
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr "1 Backup durchgeführt"
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr "BackUpWordPress-Support aktivieren"
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr "BackUpWordPress benutzt %s, um Support bereitzustellen. Neben der Möglichkeit, Nachrichten zu senden und zu empfangen, werden auch folgende Serverinformationen bei der Kommunikation übertragen:"
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr "Support kann ab sofort deaktiviert werden, indem BackUpWordPress deaktiviert wird."
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr "Nein, danke"
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr "Ja, ich möchte den Support aktivieren"
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr "Support"
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr "Falls du BackUpWordPress nützlich findest, dann %1$s bewerte es bitte im Plugin-Verzeichnis. %2$s"
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr "Du würdest deine Backups gern an einem sichereren Ort speichern? Unsere %1$Premium-Erweiterungen%2$s ermöglichen automatische Backups zu Dropbox, FTP, Google Drive und mehr."
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr "Erstelle neue Ausnahmen - du kannst mehrere per Komma separieren, z.B. %s"
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr "Ältere Backups werden bei Erreichen dieses Grenzwerts automatisch gelöscht. Dieser Plan wird also maximal %s Backups speichern."
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr "nur das letzte Backup bei %s speichern"
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr "Backup von %1$s %2$s %3$s, %4$s. %5$s Eine Kopie von jedem Backup an %6$s senden."
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr "%s nicht vorhanden"
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr "Dieses Backup wurde nicht anhand dieses Plans erstellt."
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr "Nur Verzeichnisse innerhalb deiner WordPress-Installation können entfernt werden."
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr "Dein Backup wurde fertiggestellt, aber es traten folgende Fehler/Warnungen auf. Möglicherweise kannst du diese ignorieren."
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr "Dein Backup ist fehlgeschlagen."
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr "Erhalte eine E-Mail, wenn ein Backup fertiggestellt wird. Wenn das Backup klein genug (&lt; %s) ist, wird es an die E-Mail angehängt. Trenne mehrere E-Mail-Adressen mit Kommata."
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr "Die maximale Dateigröße, mit welcher dein Backup an E-Mail-Benachrichtigungen angehängt wird. Standardmäßig %s."
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr "Du kannst Fehlerdetails via E-Mail an %s senden, damit diese sich das Problem ansehen können."
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr "Einmal pro Stunde"
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr "Zweimal pro Tag"
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr "Einmal pro Tag"
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr "Einmal pro Woche"
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr "Alle 14 Tage"
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr "Einmal pro Monat"
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr "Sende eine E-Mail an den Support"
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr "Neue Ausnahme/n"
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr "Hier ist die Antwort des Servers:"
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr "Wenn du Hilfe brauchst, die Dinge zum Laufen zu bekommen, besuche die FAQ-Seite, indem du in der rechten oberen Ecke dieser Seite auf Hilfe klickst."
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr "Starte Backup"
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr "Sichere Datenbank %s"
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr "Prüfe die Sicherung der Datenbank %s"
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr "Erstelle ZIP-Archiv %s"
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr "Prüfe ZIP-Archiv %s"
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr "Backup fertigstellen"
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr "BackUpWordPress funktioniert vielleicht nicht, wenn PHP mit %s aktiviert läuft"
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr "%1$s läuft im %2$s, bitte kontaktiere deinen Hoster und bitte ihn dies zu deaktivieren. BackUpWordpress funktioniert vielleicht nicht richtig, während %3$s aktiviert ist."
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr "Die Dauer, über die deine geplanten Aufgaben laufen sollen. Standard: %s."
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr "Bist du sicher, dass dieser Plan gelöscht werden soll? Alle zugehörigen Backups werden mit diesem Schritt auch gelöscht."
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr "'Abbrechen' zum Zurückkehren, 'OK' zum Löschen."
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr "Bist du sicher, dass du dieses Backup löschen möchtest?"
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr "Bist du sicher, dass du diese Ausschlussregel entfernen möchtest?"
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr "Das Verringern der Anzahl der Backups, die auf diesem Server vorgehalten werden, bewirkt, dass einige existierende Backups gelöscht werden. Bist du sicher, dass du dies möchtest?"
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr "Die maximale Anzahl Backups kann nicht leer sein."
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr "Die maximale Anzahl Backups muss größer als 0 sein."
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr "Ausschließen"
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr "standard"
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr "festgelegt"
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr "Nur manuell"
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr "das sollte nicht lange dauern&hellip;"
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr "Wir berechnen die Größe deiner Seite&hellip;"
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr "Das nächste Backup wird am %1$s um %2$s durchgeführt."
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr "alle 12 Stunden um %1$s &amp; %2$s"
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr "wöchentlich am %1$s um %2$s"
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr "zweiwöchentlich am %1$s um %2$s"
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr "am %1$s. jedes Monats um %2$s"
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr "manuell"
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr "diesem Server"
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr "Speichere keine Backups auf %s"
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr "behalte nur die letzten %1$s Backups auf %2$s"
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr "Erstelle ein Backup meiner %1$s %2$s %3$s, %4$s. %5$s"
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr "BackUpWordPress konnte deine Seite %1$s nicht sichern."
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr "Hier sind die Fehler, auf die wir gestoßen sind:"
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr "Wenn dir die Fehlermeldung oben wie ein Marsmensch vorkommt, dann leite diese E-Mail weiter an %3$s und wir schauen und das an."
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
- "Mit freundlichen Grüßen\n"
328
- "Der Untröstliche BackUpWordpress Backup-E-Mail-Roboter "
329
-
330
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
- msgid "BackUpWordPress has completed a backup of your site %1$s."
332
- msgstr "BackUpWordPress hat ein Backup deiner Seite %1$s fertiggestellt."
333
-
334
- #: ../classes/class-email.php:169
335
- msgid "The backup file should be attached to this email."
336
- msgstr "Die Backup-Datei sollte dieser E-Mail angehängt sein."
337
-
338
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
- msgid "You can download the backup file by clicking the link below:"
340
- msgstr "Du kannst die Backup-Datei herunterladen, indem du auf den folgenden Link klickst:"
341
-
342
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
- msgid ""
344
- "Kind Regards,\n"
345
- "The Happy BackUpWordPress Backup Emailing Robot"
346
- msgstr ""
347
- "Mit freundlichen Grüßen\n"
348
- "Der Glückliche BackUpWordPress Backup-E-Mail-Roboter"
349
-
350
- #: ../classes/class-email.php:178
351
- msgid "Unfortunately the backup file was too large to attach to this email."
352
- msgstr "Unglücklicherweise war die Backup-Datei zu groß, um sie dieser E-Mail anzuhängen."
353
-
354
- #: ../classes/wp-cli.php:19
355
- msgid "Backup: Dumping database..."
356
- msgstr "Fertige Backup an: Sichere Datenbank..."
357
-
358
- #: ../classes/wp-cli.php:23
359
- msgid "Backup: Zipping everything up..."
360
- msgstr "Fertige Backup an: Packe alles zusammen..."
361
-
362
- #: ../classes/wp-cli.php:38
363
- msgid "Invalid backup path"
364
- msgstr "Ungültiges Backupverzeichnis"
365
-
366
- #: ../classes/wp-cli.php:43
367
- msgid "Invalid root path"
368
- msgstr "Ungültiges Rootverzeichnis"
369
-
370
- #: ../classes/wp-cli.php:68
371
- msgid "Backup Complete: "
372
- msgstr "Backup fertiggestellt:"
373
-
374
- #: ../classes/wp-cli.php:71
375
- msgid "Backup Failed"
376
- msgstr "Backup fehlgeschlagen"
377
-
378
- #: ../functions/core.php:229
379
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
- msgstr "Standardmäßig führt BackUpWordPress ein tägliches Backup deiner Datenbank und ein wöchentliches Backup deiner Datenbank &amp; Dateien durch. Du kannst diesen Aufgabenplan anpassen."
381
-
382
- #: ../functions/interface.php:245
383
- msgid "Legacy"
384
- msgstr "Bisherig"
385
-
386
- #: ../functions/interface.php:67
387
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
- msgstr "Dein Backup-Verzeichnis ist nicht beschreibbar. Führe %1$s oder %2$s aus oder setze die Berechtigungen selbst."
389
-
390
- #: ../functions/interface.php:54
391
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
- msgstr "Das Backup-Verzeichnis kann nicht erstellt werden, weil dein %1$s-Verzeichnis nicht schreibbar ist. Führe %2$s oder %3$s aus oder erstelle das Verzeichnis selbst."
393
-
394
- #: ../functions/core.php:229
395
- msgid "BackUpWordPress has setup your default schedules."
396
- msgstr "BackUpWordPress hat Standard-Pläne für dich eingerichtet."
397
-
398
- #: ../classes/class-email.php:154
399
- msgid "Backup of %s Failed"
400
- msgstr "Backup von %s fehlgeschlagen"
401
-
402
- #: ../classes/class-email.php:69
403
- msgid "Send an email notification to %s"
404
- msgstr "Sende eine E-Mail-Benachrichtigung an %s"
405
-
406
- #: ../classes/class-email.php:100
407
- msgid "%s isn't a valid email"
408
- msgstr "%s ist keine gültige E-Mail-Adresse"
409
-
410
- #: ../admin/schedule.php:4
411
- msgid "Backups will be compressed and should be smaller than this."
412
- msgstr "Die Backups werden komprimiert und sollten kleiner sein als angegeben."
413
-
414
- #: ../classes/class-email.php:31
415
- msgid "Email notification"
416
- msgstr "E-Mail-Benachrichtigung"
417
-
418
- #: ../admin/schedule.php:19
419
- msgid "hourly on the hour"
420
- msgstr "stündlich zur vollen Stunde"
421
-
422
- #: ../admin/schedule.php:25
423
- msgid "daily at %s"
424
- msgstr "täglich um %s"
425
-
426
- #: ../admin/schedule-form.php:41
427
- msgid "Number of backups to store on this server"
428
- msgstr "Anzahl der Backups, die auf dem Server gespeichert bleiben"
429
-
430
- #: ../admin/schedule-form.php:7
431
- msgid "Schedule Settings"
432
- msgstr "Plan-Einstellungen"
433
-
434
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
- msgid "Close"
436
- msgstr "Schließen"
437
-
438
- #: ../admin/menu.php:69
439
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
- msgstr "Diese Informationen sind für Version %1$s. Sieh dir die %2$s-Datei für Hilfe speziell für Version %3$s an."
441
-
442
- #: ../admin/constants.php:23
443
- msgid "The root directory that is backed up. Defaults to %s."
444
- msgstr "Das Wurzelverzeichnis, das gesichert wird. Standard: %s."
445
-
446
- #: ../admin/constants.php:20
447
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
- msgstr "Die Rolle, die beim Aufrufen von %1$s benutzt wird. Standard: %2$s"
449
-
450
- #: ../admin/constants.php:14
451
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
- msgstr "Der Pfad zur ausführbaren %1$s-Datei. Wird genutzt, um deine %2$s und %3$s als ZIP-Archiv zu komprimieren, wenn verfügbar."
453
-
454
- #: ../backupwordpress.php:132
455
- msgid "BackUpWordPress requires WordPress version %s or greater."
456
- msgstr "BackUpWordPress benötigt WordPress Version %s oder größer."
457
-
458
- #: ../backupwordpress.php:170 ../admin/actions.php:487
459
- msgid "Cancel"
460
- msgstr "Abbrechen"
461
-
462
- #: ../admin/constants.php:11
463
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
- msgstr "Der Pfad zur ausführbaren %1$s-Datei. Wird für den %2$s-Teil des Backups genutzt, wenn verfügbar."
465
-
466
- #: ../admin/constants.php:8 ../admin/constants.php:11
467
- #: ../admin/constants.php:14 ../admin/constants.php:17
468
- #: ../admin/constants.php:20 ../admin/constants.php:23
469
- #: ../admin/constants.php:26 ../classes/class-email.php:54
470
- msgid "e.g."
471
- msgstr "z.B."
472
-
473
- #: ../admin/constants.php:3
474
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
- msgstr "Du kannst jede der folgenden %2$s in deinem %3$s %1$sn, um erweiterte Einstellungen vorzunehmen. %4$s. Definierte %5$s werden hervorgehoben."
476
-
477
- #: ../admin/actions.php:250 ../admin/actions.php:256
478
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
- msgstr "%1$s gibt eine %2$s-Antwort zurück. Das könnte bedeuten, dass deine Cron-Jobs nicht richtig aufgerufen werden. BackUpWordPress benutzt wp-cron, um geplante Backups auszuführen. Sieh dir das %3$s für mehr Details an."
480
-
481
- #: ../functions/interface.php:78
482
- msgid "http://php.net/manual/en/features.safe-mode.php"
483
- msgstr "http://php.net/manual/de/features.safe-mode.php"
484
-
485
- #: ../functions/interface.php:78
486
- msgid "Safe Mode"
487
- msgstr "Safe Mode"
488
-
489
- #: ../functions/interface.php:89
490
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
- msgstr "Dein angepasstes Backup-Verzeichnis %1$s existiert nicht und kann nicht erstellt werden, neue Backups werden stattdessen nach %2$s gespeichert."
492
-
493
- #: ../functions/interface.php:100
494
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
- msgstr "Dein angepasstes Backup-Verzeichnis %1$s ist nicht beschreibbar, neue Backups werden stattdessen nach %2$s gespeichert."
496
-
497
- #: ../functions/interface.php:261
498
- msgid "cancel"
499
- msgstr "abbrechen"
500
-
501
- #: ../functions/interface.php:265
502
- msgid "Settings"
503
- msgstr "Einstellungen"
504
-
505
- #: ../functions/interface.php:268
506
- msgid "Excludes"
507
- msgstr "Ausnahmen"
508
-
509
- #: ../functions/interface.php:29
510
- msgid "Download"
511
- msgstr "Download"
512
-
513
- #: ../functions/interface.php:54 ../functions/interface.php:67
514
- msgid "BackUpWordPress is almost ready."
515
- msgstr "BackUpWordPress ist fast fertig."
516
-
517
- #: ../functions/interface.php:111
518
- msgid "BackUpWordPress detected issues with your last backup."
519
- msgstr "BackUpWordPress hat Probleme bei deinem letzten Backup bemerkt."
520
-
521
- #: ../functions/interface.php:234
522
- msgid "Database and Files"
523
- msgstr "Datenbank und Dateien"
524
-
525
- #: ../functions/interface.php:240
526
- msgid "Database"
527
- msgstr "Datenbank"
528
-
529
- #: ../admin/actions.php:250 ../admin/actions.php:256
530
- #: ../functions/interface.php:78 ../functions/interface.php:89
531
- #: ../functions/interface.php:100
532
- msgid "BackUpWordPress has detected a problem."
533
- msgstr "BackUpWordPress hat ein Problem entdeckt."
534
-
535
- #: ../admin/actions.php:342
536
- msgid "Backup type cannot be empty"
537
- msgstr "Backup-Typ kann nicht leer sein"
538
-
539
- #: ../admin/actions.php:345
540
- msgid "Invalid backup type"
541
- msgstr "Ungültiger Backup-Typ"
542
-
543
- #: ../admin/actions.php:357
544
- msgid "Schedule cannot be empty"
545
- msgstr "Aufgaben können nicht leer sein"
546
-
547
- #: ../admin/actions.php:360
548
- msgid "Invalid schedule"
549
- msgstr "Ungültige Aufgaben"
550
-
551
- #: ../admin/actions.php:375
552
- msgid "Max backups must be a number"
553
- msgstr "Maximale Anzahl der Backups muss eine Zahl sein"
554
-
555
- #: ../admin/actions.php:481
556
- msgid "%s didn't match any files."
557
- msgstr "%s passt auf keine Dateien."
558
-
559
- #: ../admin/backups.php:40
560
- msgid "add schedule"
561
- msgstr "Plan hinzufügen"
562
-
563
- #: ../admin/backups.php:71
564
- msgid "Size"
565
- msgstr "Größe"
566
-
567
- #: ../admin/backups.php:72
568
- msgid "Type"
569
- msgstr "Typ"
570
-
571
- #: ../admin/backups.php:73
572
- msgid "Actions"
573
- msgstr "Aktionen"
574
-
575
- #: ../admin/constants.php:3
576
- msgid "The Codex can help"
577
- msgstr "Der Codex kann helfen"
578
-
579
- #: ../admin/constants.php:8
580
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
- msgstr "Der Pfad zum Verzeichnis, in dem du die Backups speichern möchtest. Standard: %s"
582
-
583
- #: ../admin/constants.php:11 ../admin/constants.php:14
584
- msgid "database"
585
- msgstr "Datenbank"
586
-
587
- #: ../admin/constants.php:14
588
- msgid "files"
589
- msgstr "Dateien"
590
-
591
- #: ../admin/constants.php:17
592
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
- msgstr "Kommagetrennte Liste von Dateien oder Verzeichnissen, die ausgeschlossen werden sollen (das Backup-Verzeichnis ist automatisch ausgeschlossen)."
594
-
595
- #: ../admin/menu.php:10 ../admin/page.php:6
596
- msgid "Manage Backups"
597
- msgstr "Backups verwalten"
598
-
599
- #: ../admin/menu.php:10 ../admin/menu.php:34
600
- msgid "Backups"
601
- msgstr "Backups"
602
-
603
- #: ../admin/menu.php:69
604
- msgid "You are not using the latest stable version of BackUpWordPress"
605
- msgstr "Du benutzt nicht die neueste stabile BackUpWordPress-Version"
606
-
607
- #: ../admin/menu.php:77
608
- msgid "FAQ"
609
- msgstr "FAQ"
610
-
611
- #: ../admin/constants.php:3 ../admin/menu.php:79
612
- msgid "Constants"
613
- msgstr "Konstanten"
614
-
615
- #: ../admin/menu.php:82
616
- msgid "For more information:"
617
- msgstr "Für mehr Informationen:"
618
-
619
- #: ../admin/menu.php:84
620
- msgid "Support Forums"
621
- msgstr "Support-Foren"
622
-
623
- #: ../admin/menu.php:85
624
- msgid "Help with translation"
625
- msgstr "Beim Übersetzen helfen"
626
-
627
- #: ../admin/page.php:27
628
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
- msgstr "Du musst die oben beschriebenen Probleme beheben, bevor BackUpWordPress gestartet werden kann."
630
-
631
- #: ../admin/schedule-form-excludes.php:17
632
- msgid "Preview"
633
- msgstr "Vorschau"
634
-
635
- #: ../admin/schedule-form-excludes.php:29
636
- msgid "Exclude Rules"
637
- msgstr "Ausnahmeregeln"
638
-
639
- #: ../admin/schedule-form-excludes.php:52
640
- msgid "Remove"
641
- msgstr "Entfernen"
642
-
643
- #: ../admin/schedule-form-excludes.php:71
644
- msgid "Excluded"
645
- msgstr "Ausnehmen"
646
-
647
- #: ../admin/schedule-form-excludes.php:75
648
- msgid "Included"
649
- msgstr "Einschließen"
650
-
651
- #: ../admin/schedule-form-excludes.php:79
652
- msgid "Unreadable"
653
- msgstr "Nicht lesbar"
654
-
655
- #: ../admin/schedule-form-excludes.php:107
656
- msgid "Unreadable files can't be backed up"
657
- msgstr "Nicht lesbare Dateien können nicht gesichert werden"
658
-
659
- #: ../admin/schedule-form-excludes.php:113
660
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
- msgstr "Deine Seite ist %s groß. Die Backups werden komprimiert und sollten kleiner sein."
662
-
663
- #: ../admin/schedule-form.php:11
664
- msgid "Backup"
665
- msgstr "Backup"
666
-
667
- #: ../admin/schedule-form.php:14
668
- msgid "Both Database &amp; files"
669
- msgstr "Datenbank &amp; Dateien"
670
-
671
- #: ../admin/schedule-form.php:15
672
- msgid "Files only"
673
- msgstr "Dateien"
674
-
675
- #: ../admin/schedule-form.php:16
676
- msgid "Database only"
677
- msgstr "Datenbank"
678
-
679
- #: ../functions/interface.php:237
680
- msgid "Files"
681
- msgstr "Dateien"
682
-
683
- #: ../admin/schedule-form-excludes.php:7
684
- msgid "Manage Excludes"
685
- msgstr "Ausnahmen verwalten"
686
-
687
- #: ../admin/schedule-form.php:23
688
- msgid "Schedule"
689
- msgstr "Plan"
690
-
691
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
- msgid "Update"
693
- msgstr "Update"
694
-
695
- #: ../admin/schedule.php:19
696
- msgid "hourly at %s minutes past the hour"
697
- msgstr "stündlich, %s Minuten nach der vollen Stunde"
698
-
699
- #: ../functions/interface.php:275
700
- msgid "Run now"
701
- msgstr "Jetzt ausführen"
702
-
703
- #: ../functions/interface.php:32 ../functions/interface.php:277
704
- msgid "Delete"
705
- msgstr "Löschen"
706
-
707
- #: ../classes/class-email.php:164
708
- msgid "Backup of %s"
709
- msgstr "Backup von %s"
710
-
711
- #: ../functions/core.php:334
712
- msgid "This %s file ensures that other people cannot download your backup files."
713
- msgstr "Diese %s-Datei garantiert, dass andere Leute deine Backup-Dateien nicht herunterladen können."
1
+ # Translation of 2.x in German
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: de_DE\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr "BackUpWordPress benötigt die PHP-Version %s oder neuer."
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr "Hier erscheinen deine Backups, sobald sie erstellt wurden."
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr "% Backups durchgeführt"
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr "Keine Backups durchgeführt"
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr "1 Backup durchgeführt"
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr "BackUpWordPress-Support aktivieren"
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr "BackUpWordPress benutzt %s, um Support bereitzustellen. Neben der Möglichkeit, Nachrichten zu senden und zu empfangen, werden auch folgende Serverinformationen bei der Kommunikation übertragen:"
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr "Support kann ab sofort deaktiviert werden, indem BackUpWordPress deaktiviert wird."
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr "Nein, danke"
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr "Ja, ich möchte den Support aktivieren"
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr "Support"
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr "Falls du BackUpWordPress nützlich findest, dann %1$s bewerte es bitte im Plugin-Verzeichnis. %2$s"
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr "Du würdest deine Backups gern an einem sichereren Ort speichern? Unsere %1$Premium-Erweiterungen%2$s ermöglichen automatische Backups zu Dropbox, FTP, Google Drive und mehr."
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr "Erstelle neue Ausnahmen - du kannst mehrere per Komma separieren, z.B. %s"
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr "Ältere Backups werden bei Erreichen dieses Grenzwerts automatisch gelöscht. Dieser Plan wird also maximal %s Backups speichern."
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr "nur das letzte Backup bei %s speichern"
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr "Backup von %1$s %2$s %3$s, %4$s. %5$s Eine Kopie von jedem Backup an %6$s senden."
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr "%s nicht vorhanden"
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr "Dieses Backup wurde nicht anhand dieses Plans erstellt."
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr "Nur Verzeichnisse innerhalb deiner WordPress-Installation können entfernt werden."
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr "Dein Backup wurde fertiggestellt, aber es traten folgende Fehler/Warnungen auf. Möglicherweise kannst du diese ignorieren."
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr "Dein Backup ist fehlgeschlagen."
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr "Erhalte eine E-Mail, wenn ein Backup fertiggestellt wird. Wenn das Backup klein genug (&lt; %s) ist, wird es an die E-Mail angehängt. Trenne mehrere E-Mail-Adressen mit Kommata."
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr "Die maximale Dateigröße, mit welcher dein Backup an E-Mail-Benachrichtigungen angehängt wird. Standardmäßig %s."
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr "Du kannst Fehlerdetails via E-Mail an %s senden, damit diese sich das Problem ansehen können."
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr "Einmal pro Stunde"
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr "Zweimal pro Tag"
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr "Einmal pro Tag"
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr "Einmal pro Woche"
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr "Alle 14 Tage"
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr "Einmal pro Monat"
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr "Sende eine E-Mail an den Support"
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr "Neue Ausnahme/n"
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr "Hier ist die Antwort des Servers:"
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr "Wenn du Hilfe brauchst, die Dinge zum Laufen zu bekommen, besuche die FAQ-Seite, indem du in der rechten oberen Ecke dieser Seite auf Hilfe klickst."
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr "Starte Backup"
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr "Sichere Datenbank %s"
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr "Prüfe die Sicherung der Datenbank %s"
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr "Erstelle ZIP-Archiv %s"
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr "Prüfe ZIP-Archiv %s"
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr "Backup fertigstellen"
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr "BackUpWordPress funktioniert vielleicht nicht, wenn PHP mit %s aktiviert läuft"
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr "%1$s läuft im %2$s, bitte kontaktiere deinen Hoster und bitte ihn dies zu deaktivieren. BackUpWordpress funktioniert vielleicht nicht richtig, während %3$s aktiviert ist."
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr "Die Dauer, über die deine geplanten Aufgaben laufen sollen. Standard: %s."
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr "Bist du sicher, dass dieser Plan gelöscht werden soll? Alle zugehörigen Backups werden mit diesem Schritt auch gelöscht."
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr "'Abbrechen' zum Zurückkehren, 'OK' zum Löschen."
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr "Bist du sicher, dass du dieses Backup löschen möchtest?"
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr "Bist du sicher, dass du diese Ausschlussregel entfernen möchtest?"
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr "Das Verringern der Anzahl der Backups, die auf diesem Server vorgehalten werden, bewirkt, dass einige existierende Backups gelöscht werden. Bist du sicher, dass du dies möchtest?"
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr "Die maximale Anzahl Backups kann nicht leer sein."
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr "Die maximale Anzahl Backups muss größer als 0 sein."
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr "Ausschließen"
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr "standard"
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr "festgelegt"
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr "Nur manuell"
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr "das sollte nicht lange dauern&hellip;"
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr "Wir berechnen die Größe deiner Seite&hellip;"
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr "Das nächste Backup wird am %1$s um %2$s durchgeführt."
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr "alle 12 Stunden um %1$s &amp; %2$s"
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr "wöchentlich am %1$s um %2$s"
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr "zweiwöchentlich am %1$s um %2$s"
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr "am %1$s. jedes Monats um %2$s"
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr "manuell"
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr "diesem Server"
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr "Speichere keine Backups auf %s"
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr "behalte nur die letzten %1$s Backups auf %2$s"
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr "Erstelle ein Backup meiner %1$s %2$s %3$s, %4$s. %5$s"
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr "BackUpWordPress konnte deine Seite %1$s nicht sichern."
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr "Hier sind die Fehler, auf die wir gestoßen sind:"
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr "Wenn dir die Fehlermeldung oben wie ein Marsmensch vorkommt, dann leite diese E-Mail weiter an %3$s und wir schauen und das an."
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+ "Mit freundlichen Grüßen\n"
328
+ "Der Untröstliche BackUpWordpress Backup-E-Mail-Roboter "
329
+
330
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
332
+ msgstr "BackUpWordPress hat ein Backup deiner Seite %1$s fertiggestellt."
333
+
334
+ #: ../classes/class-email.php:169
335
+ msgid "The backup file should be attached to this email."
336
+ msgstr "Die Backup-Datei sollte dieser E-Mail angehängt sein."
337
+
338
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
+ msgid "You can download the backup file by clicking the link below:"
340
+ msgstr "Du kannst die Backup-Datei herunterladen, indem du auf den folgenden Link klickst:"
341
+
342
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
+ msgid ""
344
+ "Kind Regards,\n"
345
+ "The Happy BackUpWordPress Backup Emailing Robot"
346
+ msgstr ""
347
+ "Mit freundlichen Grüßen\n"
348
+ "Der Glückliche BackUpWordPress Backup-E-Mail-Roboter"
349
+
350
+ #: ../classes/class-email.php:178
351
+ msgid "Unfortunately the backup file was too large to attach to this email."
352
+ msgstr "Unglücklicherweise war die Backup-Datei zu groß, um sie dieser E-Mail anzuhängen."
353
+
354
+ #: ../classes/wp-cli.php:19
355
+ msgid "Backup: Dumping database..."
356
+ msgstr "Fertige Backup an: Sichere Datenbank..."
357
+
358
+ #: ../classes/wp-cli.php:23
359
+ msgid "Backup: Zipping everything up..."
360
+ msgstr "Fertige Backup an: Packe alles zusammen..."
361
+
362
+ #: ../classes/wp-cli.php:38
363
+ msgid "Invalid backup path"
364
+ msgstr "Ungültiges Backupverzeichnis"
365
+
366
+ #: ../classes/wp-cli.php:43
367
+ msgid "Invalid root path"
368
+ msgstr "Ungültiges Rootverzeichnis"
369
+
370
+ #: ../classes/wp-cli.php:68
371
+ msgid "Backup Complete: "
372
+ msgstr "Backup fertiggestellt:"
373
+
374
+ #: ../classes/wp-cli.php:71
375
+ msgid "Backup Failed"
376
+ msgstr "Backup fehlgeschlagen"
377
+
378
+ #: ../functions/core.php:229
379
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
+ msgstr "Standardmäßig führt BackUpWordPress ein tägliches Backup deiner Datenbank und ein wöchentliches Backup deiner Datenbank &amp; Dateien durch. Du kannst diesen Aufgabenplan anpassen."
381
+
382
+ #: ../functions/interface.php:245
383
+ msgid "Legacy"
384
+ msgstr "Bisherig"
385
+
386
+ #: ../functions/interface.php:67
387
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
+ msgstr "Dein Backup-Verzeichnis ist nicht beschreibbar. Führe %1$s oder %2$s aus oder setze die Berechtigungen selbst."
389
+
390
+ #: ../functions/interface.php:54
391
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
+ msgstr "Das Backup-Verzeichnis kann nicht erstellt werden, weil dein %1$s-Verzeichnis nicht schreibbar ist. Führe %2$s oder %3$s aus oder erstelle das Verzeichnis selbst."
393
+
394
+ #: ../functions/core.php:229
395
+ msgid "BackUpWordPress has setup your default schedules."
396
+ msgstr "BackUpWordPress hat Standard-Pläne für dich eingerichtet."
397
+
398
+ #: ../classes/class-email.php:154
399
+ msgid "Backup of %s Failed"
400
+ msgstr "Backup von %s fehlgeschlagen"
401
+
402
+ #: ../classes/class-email.php:69
403
+ msgid "Send an email notification to %s"
404
+ msgstr "Sende eine E-Mail-Benachrichtigung an %s"
405
+
406
+ #: ../classes/class-email.php:100
407
+ msgid "%s isn't a valid email"
408
+ msgstr "%s ist keine gültige E-Mail-Adresse"
409
+
410
+ #: ../admin/schedule.php:4
411
+ msgid "Backups will be compressed and should be smaller than this."
412
+ msgstr "Die Backups werden komprimiert und sollten kleiner sein als angegeben."
413
+
414
+ #: ../classes/class-email.php:31
415
+ msgid "Email notification"
416
+ msgstr "E-Mail-Benachrichtigung"
417
+
418
+ #: ../admin/schedule.php:19
419
+ msgid "hourly on the hour"
420
+ msgstr "stündlich zur vollen Stunde"
421
+
422
+ #: ../admin/schedule.php:25
423
+ msgid "daily at %s"
424
+ msgstr "täglich um %s"
425
+
426
+ #: ../admin/schedule-form.php:41
427
+ msgid "Number of backups to store on this server"
428
+ msgstr "Anzahl der Backups, die auf dem Server gespeichert bleiben"
429
+
430
+ #: ../admin/schedule-form.php:7
431
+ msgid "Schedule Settings"
432
+ msgstr "Plan-Einstellungen"
433
+
434
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
+ msgid "Close"
436
+ msgstr "Schließen"
437
+
438
+ #: ../admin/menu.php:69
439
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
+ msgstr "Diese Informationen sind für Version %1$s. Sieh dir die %2$s-Datei für Hilfe speziell für Version %3$s an."
441
+
442
+ #: ../admin/constants.php:23
443
+ msgid "The root directory that is backed up. Defaults to %s."
444
+ msgstr "Das Wurzelverzeichnis, das gesichert wird. Standard: %s."
445
+
446
+ #: ../admin/constants.php:20
447
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
+ msgstr "Die Rolle, die beim Aufrufen von %1$s benutzt wird. Standard: %2$s"
449
+
450
+ #: ../admin/constants.php:14
451
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
+ msgstr "Der Pfad zur ausführbaren %1$s-Datei. Wird genutzt, um deine %2$s und %3$s als ZIP-Archiv zu komprimieren, wenn verfügbar."
453
+
454
+ #: ../backupwordpress.php:132
455
+ msgid "BackUpWordPress requires WordPress version %s or greater."
456
+ msgstr "BackUpWordPress benötigt WordPress Version %s oder größer."
457
+
458
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
459
+ msgid "Cancel"
460
+ msgstr "Abbrechen"
461
+
462
+ #: ../admin/constants.php:11
463
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
+ msgstr "Der Pfad zur ausführbaren %1$s-Datei. Wird für den %2$s-Teil des Backups genutzt, wenn verfügbar."
465
+
466
+ #: ../admin/constants.php:8 ../admin/constants.php:11
467
+ #: ../admin/constants.php:14 ../admin/constants.php:17
468
+ #: ../admin/constants.php:20 ../admin/constants.php:23
469
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
470
+ msgid "e.g."
471
+ msgstr "z.B."
472
+
473
+ #: ../admin/constants.php:3
474
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
+ msgstr "Du kannst jede der folgenden %2$s in deinem %3$s %1$sn, um erweiterte Einstellungen vorzunehmen. %4$s. Definierte %5$s werden hervorgehoben."
476
+
477
+ #: ../admin/actions.php:250 ../admin/actions.php:256
478
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
+ msgstr "%1$s gibt eine %2$s-Antwort zurück. Das könnte bedeuten, dass deine Cron-Jobs nicht richtig aufgerufen werden. BackUpWordPress benutzt wp-cron, um geplante Backups auszuführen. Sieh dir das %3$s für mehr Details an."
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "http://php.net/manual/en/features.safe-mode.php"
483
+ msgstr "http://php.net/manual/de/features.safe-mode.php"
484
+
485
+ #: ../functions/interface.php:78
486
+ msgid "Safe Mode"
487
+ msgstr "Safe Mode"
488
+
489
+ #: ../functions/interface.php:89
490
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
+ msgstr "Dein angepasstes Backup-Verzeichnis %1$s existiert nicht und kann nicht erstellt werden, neue Backups werden stattdessen nach %2$s gespeichert."
492
+
493
+ #: ../functions/interface.php:100
494
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
+ msgstr "Dein angepasstes Backup-Verzeichnis %1$s ist nicht beschreibbar, neue Backups werden stattdessen nach %2$s gespeichert."
496
+
497
+ #: ../functions/interface.php:261
498
+ msgid "cancel"
499
+ msgstr "abbrechen"
500
+
501
+ #: ../functions/interface.php:265
502
+ msgid "Settings"
503
+ msgstr "Einstellungen"
504
+
505
+ #: ../functions/interface.php:268
506
+ msgid "Excludes"
507
+ msgstr "Ausnahmen"
508
+
509
+ #: ../functions/interface.php:29
510
+ msgid "Download"
511
+ msgstr "Download"
512
+
513
+ #: ../functions/interface.php:54 ../functions/interface.php:67
514
+ msgid "BackUpWordPress is almost ready."
515
+ msgstr "BackUpWordPress ist fast fertig."
516
+
517
+ #: ../functions/interface.php:111
518
+ msgid "BackUpWordPress detected issues with your last backup."
519
+ msgstr "BackUpWordPress hat Probleme bei deinem letzten Backup bemerkt."
520
+
521
+ #: ../functions/interface.php:234
522
+ msgid "Database and Files"
523
+ msgstr "Datenbank und Dateien"
524
+
525
+ #: ../functions/interface.php:240
526
+ msgid "Database"
527
+ msgstr "Datenbank"
528
+
529
+ #: ../admin/actions.php:250 ../admin/actions.php:256
530
+ #: ../functions/interface.php:78 ../functions/interface.php:89
531
+ #: ../functions/interface.php:100
532
+ msgid "BackUpWordPress has detected a problem."
533
+ msgstr "BackUpWordPress hat ein Problem entdeckt."
534
+
535
+ #: ../admin/actions.php:342
536
+ msgid "Backup type cannot be empty"
537
+ msgstr "Backup-Typ kann nicht leer sein"
538
+
539
+ #: ../admin/actions.php:345
540
+ msgid "Invalid backup type"
541
+ msgstr "Ungültiger Backup-Typ"
542
+
543
+ #: ../admin/actions.php:357
544
+ msgid "Schedule cannot be empty"
545
+ msgstr "Aufgaben können nicht leer sein"
546
+
547
+ #: ../admin/actions.php:360
548
+ msgid "Invalid schedule"
549
+ msgstr "Ungültige Aufgaben"
550
+
551
+ #: ../admin/actions.php:375
552
+ msgid "Max backups must be a number"
553
+ msgstr "Maximale Anzahl der Backups muss eine Zahl sein"
554
+
555
+ #: ../admin/actions.php:481
556
+ msgid "%s didn't match any files."
557
+ msgstr "%s passt auf keine Dateien."
558
+
559
+ #: ../admin/backups.php:40
560
+ msgid "add schedule"
561
+ msgstr "Plan hinzufügen"
562
+
563
+ #: ../admin/backups.php:71
564
+ msgid "Size"
565
+ msgstr "Größe"
566
+
567
+ #: ../admin/backups.php:72
568
+ msgid "Type"
569
+ msgstr "Typ"
570
+
571
+ #: ../admin/backups.php:73
572
+ msgid "Actions"
573
+ msgstr "Aktionen"
574
+
575
+ #: ../admin/constants.php:3
576
+ msgid "The Codex can help"
577
+ msgstr "Der Codex kann helfen"
578
+
579
+ #: ../admin/constants.php:8
580
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
+ msgstr "Der Pfad zum Verzeichnis, in dem du die Backups speichern möchtest. Standard: %s"
582
+
583
+ #: ../admin/constants.php:11 ../admin/constants.php:14
584
+ msgid "database"
585
+ msgstr "Datenbank"
586
+
587
+ #: ../admin/constants.php:14
588
+ msgid "files"
589
+ msgstr "Dateien"
590
+
591
+ #: ../admin/constants.php:17
592
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
+ msgstr "Kommagetrennte Liste von Dateien oder Verzeichnissen, die ausgeschlossen werden sollen (das Backup-Verzeichnis ist automatisch ausgeschlossen)."
594
+
595
+ #: ../admin/menu.php:10 ../admin/page.php:6
596
+ msgid "Manage Backups"
597
+ msgstr "Backups verwalten"
598
+
599
+ #: ../admin/menu.php:10 ../admin/menu.php:34
600
+ msgid "Backups"
601
+ msgstr "Backups"
602
+
603
+ #: ../admin/menu.php:69
604
+ msgid "You are not using the latest stable version of BackUpWordPress"
605
+ msgstr "Du benutzt nicht die neueste stabile BackUpWordPress-Version"
606
+
607
+ #: ../admin/menu.php:77
608
+ msgid "FAQ"
609
+ msgstr "FAQ"
610
+
611
+ #: ../admin/constants.php:3 ../admin/menu.php:79
612
+ msgid "Constants"
613
+ msgstr "Konstanten"
614
+
615
+ #: ../admin/menu.php:82
616
+ msgid "For more information:"
617
+ msgstr "Für mehr Informationen:"
618
+
619
+ #: ../admin/menu.php:84
620
+ msgid "Support Forums"
621
+ msgstr "Support-Foren"
622
+
623
+ #: ../admin/menu.php:85
624
+ msgid "Help with translation"
625
+ msgstr "Beim Übersetzen helfen"
626
+
627
+ #: ../admin/page.php:27
628
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
+ msgstr "Du musst die oben beschriebenen Probleme beheben, bevor BackUpWordPress gestartet werden kann."
630
+
631
+ #: ../admin/schedule-form-excludes.php:17
632
+ msgid "Preview"
633
+ msgstr "Vorschau"
634
+
635
+ #: ../admin/schedule-form-excludes.php:29
636
+ msgid "Exclude Rules"
637
+ msgstr "Ausnahmeregeln"
638
+
639
+ #: ../admin/schedule-form-excludes.php:52
640
+ msgid "Remove"
641
+ msgstr "Entfernen"
642
+
643
+ #: ../admin/schedule-form-excludes.php:71
644
+ msgid "Excluded"
645
+ msgstr "Ausnehmen"
646
+
647
+ #: ../admin/schedule-form-excludes.php:75
648
+ msgid "Included"
649
+ msgstr "Einschließen"
650
+
651
+ #: ../admin/schedule-form-excludes.php:79
652
+ msgid "Unreadable"
653
+ msgstr "Nicht lesbar"
654
+
655
+ #: ../admin/schedule-form-excludes.php:107
656
+ msgid "Unreadable files can't be backed up"
657
+ msgstr "Nicht lesbare Dateien können nicht gesichert werden"
658
+
659
+ #: ../admin/schedule-form-excludes.php:113
660
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
+ msgstr "Deine Seite ist %s groß. Die Backups werden komprimiert und sollten kleiner sein."
662
+
663
+ #: ../admin/schedule-form.php:11
664
+ msgid "Backup"
665
+ msgstr "Backup"
666
+
667
+ #: ../admin/schedule-form.php:14
668
+ msgid "Both Database &amp; files"
669
+ msgstr "Datenbank &amp; Dateien"
670
+
671
+ #: ../admin/schedule-form.php:15
672
+ msgid "Files only"
673
+ msgstr "Dateien"
674
+
675
+ #: ../admin/schedule-form.php:16
676
+ msgid "Database only"
677
+ msgstr "Datenbank"
678
+
679
+ #: ../functions/interface.php:237
680
+ msgid "Files"
681
+ msgstr "Dateien"
682
+
683
+ #: ../admin/schedule-form-excludes.php:7
684
+ msgid "Manage Excludes"
685
+ msgstr "Ausnahmen verwalten"
686
+
687
+ #: ../admin/schedule-form.php:23
688
+ msgid "Schedule"
689
+ msgstr "Plan"
690
+
691
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
+ msgid "Update"
693
+ msgstr "Update"
694
+
695
+ #: ../admin/schedule.php:19
696
+ msgid "hourly at %s minutes past the hour"
697
+ msgstr "stündlich, %s Minuten nach der vollen Stunde"
698
+
699
+ #: ../functions/interface.php:275
700
+ msgid "Run now"
701
+ msgstr "Jetzt ausführen"
702
+
703
+ #: ../functions/interface.php:32 ../functions/interface.php:277
704
+ msgid "Delete"
705
+ msgstr "Löschen"
706
+
707
+ #: ../classes/class-email.php:164
708
+ msgid "Backup of %s"
709
+ msgstr "Backup von %s"
710
+
711
+ #: ../functions/core.php:334
712
+ msgid "This %s file ensures that other people cannot download your backup files."
713
+ msgstr "Diese %s-Datei garantiert, dass andere Leute deine Backup-Dateien nicht herunterladen können."
languages/backupwordpress-el_GR.po CHANGED
@@ -1,709 +1,709 @@
1
- # Translation of 2.x in Greek
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: el_GR\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr ""
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr ""
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr ""
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr ""
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr ""
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr ""
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr ""
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr ""
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr ""
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr ""
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr ""
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr ""
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr ""
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr ""
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr ""
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr ""
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr ""
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr ""
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr ""
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr ""
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr ""
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr ""
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr ""
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr ""
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr ""
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr ""
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr ""
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr ""
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr ""
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr ""
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr ""
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr ""
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr ""
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr ""
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr ""
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr ""
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr ""
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr ""
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr ""
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr ""
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr ""
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr ""
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr ""
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr ""
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr ""
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr ""
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr ""
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr ""
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr ""
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr ""
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr ""
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr ""
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr ""
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr ""
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr ""
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr ""
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr ""
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr ""
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr ""
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr ""
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr ""
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr ""
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr ""
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr ""
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr ""
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr ""
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr ""
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr ""
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr ""
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr ""
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
-
328
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
329
- msgid "BackUpWordPress has completed a backup of your site %1$s."
330
- msgstr ""
331
-
332
- #: ../classes/class-email.php:169
333
- msgid "The backup file should be attached to this email."
334
- msgstr ""
335
-
336
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
337
- msgid "You can download the backup file by clicking the link below:"
338
- msgstr ""
339
-
340
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
341
- msgid ""
342
- "Kind Regards,\n"
343
- "The Happy BackUpWordPress Backup Emailing Robot"
344
- msgstr ""
345
-
346
- #: ../classes/class-email.php:178
347
- msgid "Unfortunately the backup file was too large to attach to this email."
348
- msgstr ""
349
-
350
- #: ../classes/wp-cli.php:19
351
- msgid "Backup: Dumping database..."
352
- msgstr ""
353
-
354
- #: ../classes/wp-cli.php:23
355
- msgid "Backup: Zipping everything up..."
356
- msgstr ""
357
-
358
- #: ../classes/wp-cli.php:38
359
- msgid "Invalid backup path"
360
- msgstr ""
361
-
362
- #: ../classes/wp-cli.php:43
363
- msgid "Invalid root path"
364
- msgstr ""
365
-
366
- #: ../classes/wp-cli.php:68
367
- msgid "Backup Complete: "
368
- msgstr ""
369
-
370
- #: ../classes/wp-cli.php:71
371
- msgid "Backup Failed"
372
- msgstr ""
373
-
374
- #: ../functions/core.php:229
375
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
376
- msgstr ""
377
-
378
- #: ../functions/interface.php:245
379
- msgid "Legacy"
380
- msgstr ""
381
-
382
- #: ../functions/interface.php:67
383
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
384
- msgstr ""
385
-
386
- #: ../functions/interface.php:54
387
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
388
- msgstr ""
389
-
390
- #: ../functions/core.php:229
391
- msgid "BackUpWordPress has setup your default schedules."
392
- msgstr ""
393
-
394
- #: ../classes/class-email.php:154
395
- msgid "Backup of %s Failed"
396
- msgstr ""
397
-
398
- #: ../classes/class-email.php:69
399
- msgid "Send an email notification to %s"
400
- msgstr ""
401
-
402
- #: ../classes/class-email.php:100
403
- msgid "%s isn't a valid email"
404
- msgstr ""
405
-
406
- #: ../admin/schedule.php:4
407
- msgid "Backups will be compressed and should be smaller than this."
408
- msgstr ""
409
-
410
- #: ../classes/class-email.php:31
411
- msgid "Email notification"
412
- msgstr ""
413
-
414
- #: ../admin/schedule.php:19
415
- msgid "hourly on the hour"
416
- msgstr ""
417
-
418
- #: ../admin/schedule.php:25
419
- msgid "daily at %s"
420
- msgstr ""
421
-
422
- #: ../admin/schedule-form.php:41
423
- msgid "Number of backups to store on this server"
424
- msgstr ""
425
-
426
- #: ../admin/schedule-form.php:7
427
- msgid "Schedule Settings"
428
- msgstr ""
429
-
430
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
431
- msgid "Close"
432
- msgstr ""
433
-
434
- #: ../admin/menu.php:69
435
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
436
- msgstr ""
437
-
438
- #: ../admin/constants.php:23
439
- msgid "The root directory that is backed up. Defaults to %s."
440
- msgstr ""
441
-
442
- #: ../admin/constants.php:20
443
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
444
- msgstr ""
445
-
446
- #: ../admin/constants.php:14
447
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
448
- msgstr ""
449
-
450
- #: ../backupwordpress.php:132
451
- msgid "BackUpWordPress requires WordPress version %s or greater."
452
- msgstr ""
453
-
454
- #: ../backupwordpress.php:170 ../admin/actions.php:487
455
- msgid "Cancel"
456
- msgstr ""
457
-
458
- #: ../admin/constants.php:11
459
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
460
- msgstr ""
461
-
462
- #: ../admin/constants.php:8 ../admin/constants.php:11
463
- #: ../admin/constants.php:14 ../admin/constants.php:17
464
- #: ../admin/constants.php:20 ../admin/constants.php:23
465
- #: ../admin/constants.php:26 ../classes/class-email.php:54
466
- msgid "e.g."
467
- msgstr ""
468
-
469
- #: ../admin/constants.php:3
470
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
471
- msgstr ""
472
-
473
- #: ../admin/actions.php:250 ../admin/actions.php:256
474
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
475
- msgstr ""
476
-
477
- #: ../functions/interface.php:78
478
- msgid "http://php.net/manual/en/features.safe-mode.php"
479
- msgstr ""
480
-
481
- #: ../functions/interface.php:78
482
- msgid "Safe Mode"
483
- msgstr ""
484
-
485
- #: ../functions/interface.php:89
486
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
487
- msgstr ""
488
-
489
- #: ../functions/interface.php:100
490
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
491
- msgstr ""
492
-
493
- #: ../functions/interface.php:261
494
- msgid "cancel"
495
- msgstr ""
496
-
497
- #: ../functions/interface.php:265
498
- msgid "Settings"
499
- msgstr ""
500
-
501
- #: ../functions/interface.php:268
502
- msgid "Excludes"
503
- msgstr ""
504
-
505
- #: ../functions/interface.php:29
506
- msgid "Download"
507
- msgstr ""
508
-
509
- #: ../functions/interface.php:54 ../functions/interface.php:67
510
- msgid "BackUpWordPress is almost ready."
511
- msgstr ""
512
-
513
- #: ../functions/interface.php:111
514
- msgid "BackUpWordPress detected issues with your last backup."
515
- msgstr ""
516
-
517
- #: ../functions/interface.php:234
518
- msgid "Database and Files"
519
- msgstr ""
520
-
521
- #: ../functions/interface.php:240
522
- msgid "Database"
523
- msgstr ""
524
-
525
- #: ../admin/actions.php:250 ../admin/actions.php:256
526
- #: ../functions/interface.php:78 ../functions/interface.php:89
527
- #: ../functions/interface.php:100
528
- msgid "BackUpWordPress has detected a problem."
529
- msgstr ""
530
-
531
- #: ../admin/actions.php:342
532
- msgid "Backup type cannot be empty"
533
- msgstr ""
534
-
535
- #: ../admin/actions.php:345
536
- msgid "Invalid backup type"
537
- msgstr ""
538
-
539
- #: ../admin/actions.php:357
540
- msgid "Schedule cannot be empty"
541
- msgstr ""
542
-
543
- #: ../admin/actions.php:360
544
- msgid "Invalid schedule"
545
- msgstr ""
546
-
547
- #: ../admin/actions.php:375
548
- msgid "Max backups must be a number"
549
- msgstr ""
550
-
551
- #: ../admin/actions.php:481
552
- msgid "%s didn't match any files."
553
- msgstr ""
554
-
555
- #: ../admin/backups.php:40
556
- msgid "add schedule"
557
- msgstr ""
558
-
559
- #: ../admin/backups.php:71
560
- msgid "Size"
561
- msgstr ""
562
-
563
- #: ../admin/backups.php:72
564
- msgid "Type"
565
- msgstr ""
566
-
567
- #: ../admin/backups.php:73
568
- msgid "Actions"
569
- msgstr ""
570
-
571
- #: ../admin/constants.php:3
572
- msgid "The Codex can help"
573
- msgstr ""
574
-
575
- #: ../admin/constants.php:8
576
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
577
- msgstr ""
578
-
579
- #: ../admin/constants.php:11 ../admin/constants.php:14
580
- msgid "database"
581
- msgstr ""
582
-
583
- #: ../admin/constants.php:14
584
- msgid "files"
585
- msgstr ""
586
-
587
- #: ../admin/constants.php:17
588
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
589
- msgstr ""
590
-
591
- #: ../admin/menu.php:10 ../admin/page.php:6
592
- msgid "Manage Backups"
593
- msgstr ""
594
-
595
- #: ../admin/menu.php:10 ../admin/menu.php:34
596
- msgid "Backups"
597
- msgstr ""
598
-
599
- #: ../admin/menu.php:69
600
- msgid "You are not using the latest stable version of BackUpWordPress"
601
- msgstr ""
602
-
603
- #: ../admin/menu.php:77
604
- msgid "FAQ"
605
- msgstr ""
606
-
607
- #: ../admin/constants.php:3 ../admin/menu.php:79
608
- msgid "Constants"
609
- msgstr ""
610
-
611
- #: ../admin/menu.php:82
612
- msgid "For more information:"
613
- msgstr ""
614
-
615
- #: ../admin/menu.php:84
616
- msgid "Support Forums"
617
- msgstr ""
618
-
619
- #: ../admin/menu.php:85
620
- msgid "Help with translation"
621
- msgstr ""
622
-
623
- #: ../admin/page.php:27
624
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
625
- msgstr ""
626
-
627
- #: ../admin/schedule-form-excludes.php:17
628
- msgid "Preview"
629
- msgstr ""
630
-
631
- #: ../admin/schedule-form-excludes.php:29
632
- msgid "Exclude Rules"
633
- msgstr ""
634
-
635
- #: ../admin/schedule-form-excludes.php:52
636
- msgid "Remove"
637
- msgstr ""
638
-
639
- #: ../admin/schedule-form-excludes.php:71
640
- msgid "Excluded"
641
- msgstr ""
642
-
643
- #: ../admin/schedule-form-excludes.php:75
644
- msgid "Included"
645
- msgstr ""
646
-
647
- #: ../admin/schedule-form-excludes.php:79
648
- msgid "Unreadable"
649
- msgstr ""
650
-
651
- #: ../admin/schedule-form-excludes.php:107
652
- msgid "Unreadable files can't be backed up"
653
- msgstr ""
654
-
655
- #: ../admin/schedule-form-excludes.php:113
656
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
657
- msgstr ""
658
-
659
- #: ../admin/schedule-form.php:11
660
- msgid "Backup"
661
- msgstr ""
662
-
663
- #: ../admin/schedule-form.php:14
664
- msgid "Both Database &amp; files"
665
- msgstr ""
666
-
667
- #: ../admin/schedule-form.php:15
668
- msgid "Files only"
669
- msgstr ""
670
-
671
- #: ../admin/schedule-form.php:16
672
- msgid "Database only"
673
- msgstr ""
674
-
675
- #: ../functions/interface.php:237
676
- msgid "Files"
677
- msgstr ""
678
-
679
- #: ../admin/schedule-form-excludes.php:7
680
- msgid "Manage Excludes"
681
- msgstr ""
682
-
683
- #: ../admin/schedule-form.php:23
684
- msgid "Schedule"
685
- msgstr ""
686
-
687
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
688
- msgid "Update"
689
- msgstr ""
690
-
691
- #: ../admin/schedule.php:19
692
- msgid "hourly at %s minutes past the hour"
693
- msgstr ""
694
-
695
- #: ../functions/interface.php:275
696
- msgid "Run now"
697
- msgstr ""
698
-
699
- #: ../functions/interface.php:32 ../functions/interface.php:277
700
- msgid "Delete"
701
- msgstr ""
702
-
703
- #: ../classes/class-email.php:164
704
- msgid "Backup of %s"
705
- msgstr ""
706
-
707
- #: ../functions/core.php:334
708
- msgid "This %s file ensures that other people cannot download your backup files."
709
- msgstr ""
1
+ # Translation of 2.x in Greek
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: el_GR\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr ""
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr ""
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr ""
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr ""
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr ""
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr ""
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr ""
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr ""
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr ""
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr ""
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr ""
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr ""
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr ""
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr ""
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr ""
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr ""
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr ""
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr ""
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr ""
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr ""
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr ""
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr ""
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr ""
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr ""
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr ""
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr ""
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr ""
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr ""
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr ""
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr ""
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr ""
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr ""
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr ""
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr ""
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr ""
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr ""
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr ""
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr ""
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr ""
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr ""
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr ""
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr ""
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr ""
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr ""
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr ""
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr ""
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr ""
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr ""
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr ""
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr ""
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr ""
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr ""
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr ""
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr ""
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr ""
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr ""
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr ""
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr ""
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr ""
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr ""
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr ""
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr ""
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr ""
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr ""
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr ""
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr ""
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr ""
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr ""
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr ""
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr ""
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+
328
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
329
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
330
+ msgstr ""
331
+
332
+ #: ../classes/class-email.php:169
333
+ msgid "The backup file should be attached to this email."
334
+ msgstr ""
335
+
336
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
337
+ msgid "You can download the backup file by clicking the link below:"
338
+ msgstr ""
339
+
340
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
341
+ msgid ""
342
+ "Kind Regards,\n"
343
+ "The Happy BackUpWordPress Backup Emailing Robot"
344
+ msgstr ""
345
+
346
+ #: ../classes/class-email.php:178
347
+ msgid "Unfortunately the backup file was too large to attach to this email."
348
+ msgstr ""
349
+
350
+ #: ../classes/wp-cli.php:19
351
+ msgid "Backup: Dumping database..."
352
+ msgstr ""
353
+
354
+ #: ../classes/wp-cli.php:23
355
+ msgid "Backup: Zipping everything up..."
356
+ msgstr ""
357
+
358
+ #: ../classes/wp-cli.php:38
359
+ msgid "Invalid backup path"
360
+ msgstr ""
361
+
362
+ #: ../classes/wp-cli.php:43
363
+ msgid "Invalid root path"
364
+ msgstr ""
365
+
366
+ #: ../classes/wp-cli.php:68
367
+ msgid "Backup Complete: "
368
+ msgstr ""
369
+
370
+ #: ../classes/wp-cli.php:71
371
+ msgid "Backup Failed"
372
+ msgstr ""
373
+
374
+ #: ../functions/core.php:229
375
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
376
+ msgstr ""
377
+
378
+ #: ../functions/interface.php:245
379
+ msgid "Legacy"
380
+ msgstr ""
381
+
382
+ #: ../functions/interface.php:67
383
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
384
+ msgstr ""
385
+
386
+ #: ../functions/interface.php:54
387
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
388
+ msgstr ""
389
+
390
+ #: ../functions/core.php:229
391
+ msgid "BackUpWordPress has setup your default schedules."
392
+ msgstr ""
393
+
394
+ #: ../classes/class-email.php:154
395
+ msgid "Backup of %s Failed"
396
+ msgstr ""
397
+
398
+ #: ../classes/class-email.php:69
399
+ msgid "Send an email notification to %s"
400
+ msgstr ""
401
+
402
+ #: ../classes/class-email.php:100
403
+ msgid "%s isn't a valid email"
404
+ msgstr ""
405
+
406
+ #: ../admin/schedule.php:4
407
+ msgid "Backups will be compressed and should be smaller than this."
408
+ msgstr ""
409
+
410
+ #: ../classes/class-email.php:31
411
+ msgid "Email notification"
412
+ msgstr ""
413
+
414
+ #: ../admin/schedule.php:19
415
+ msgid "hourly on the hour"
416
+ msgstr ""
417
+
418
+ #: ../admin/schedule.php:25
419
+ msgid "daily at %s"
420
+ msgstr ""
421
+
422
+ #: ../admin/schedule-form.php:41
423
+ msgid "Number of backups to store on this server"
424
+ msgstr ""
425
+
426
+ #: ../admin/schedule-form.php:7
427
+ msgid "Schedule Settings"
428
+ msgstr ""
429
+
430
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
431
+ msgid "Close"
432
+ msgstr ""
433
+
434
+ #: ../admin/menu.php:69
435
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
436
+ msgstr ""
437
+
438
+ #: ../admin/constants.php:23
439
+ msgid "The root directory that is backed up. Defaults to %s."
440
+ msgstr ""
441
+
442
+ #: ../admin/constants.php:20
443
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
444
+ msgstr ""
445
+
446
+ #: ../admin/constants.php:14
447
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
448
+ msgstr ""
449
+
450
+ #: ../backupwordpress.php:132
451
+ msgid "BackUpWordPress requires WordPress version %s or greater."
452
+ msgstr ""
453
+
454
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
455
+ msgid "Cancel"
456
+ msgstr ""
457
+
458
+ #: ../admin/constants.php:11
459
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
460
+ msgstr ""
461
+
462
+ #: ../admin/constants.php:8 ../admin/constants.php:11
463
+ #: ../admin/constants.php:14 ../admin/constants.php:17
464
+ #: ../admin/constants.php:20 ../admin/constants.php:23
465
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
466
+ msgid "e.g."
467
+ msgstr ""
468
+
469
+ #: ../admin/constants.php:3
470
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
471
+ msgstr ""
472
+
473
+ #: ../admin/actions.php:250 ../admin/actions.php:256
474
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
475
+ msgstr ""
476
+
477
+ #: ../functions/interface.php:78
478
+ msgid "http://php.net/manual/en/features.safe-mode.php"
479
+ msgstr ""
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "Safe Mode"
483
+ msgstr ""
484
+
485
+ #: ../functions/interface.php:89
486
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
487
+ msgstr ""
488
+
489
+ #: ../functions/interface.php:100
490
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
491
+ msgstr ""
492
+
493
+ #: ../functions/interface.php:261
494
+ msgid "cancel"
495
+ msgstr ""
496
+
497
+ #: ../functions/interface.php:265
498
+ msgid "Settings"
499
+ msgstr ""
500
+
501
+ #: ../functions/interface.php:268
502
+ msgid "Excludes"
503
+ msgstr ""
504
+
505
+ #: ../functions/interface.php:29
506
+ msgid "Download"
507
+ msgstr ""
508
+
509
+ #: ../functions/interface.php:54 ../functions/interface.php:67
510
+ msgid "BackUpWordPress is almost ready."
511
+ msgstr ""
512
+
513
+ #: ../functions/interface.php:111
514
+ msgid "BackUpWordPress detected issues with your last backup."
515
+ msgstr ""
516
+
517
+ #: ../functions/interface.php:234
518
+ msgid "Database and Files"
519
+ msgstr ""
520
+
521
+ #: ../functions/interface.php:240
522
+ msgid "Database"
523
+ msgstr ""
524
+
525
+ #: ../admin/actions.php:250 ../admin/actions.php:256
526
+ #: ../functions/interface.php:78 ../functions/interface.php:89
527
+ #: ../functions/interface.php:100
528
+ msgid "BackUpWordPress has detected a problem."
529
+ msgstr ""
530
+
531
+ #: ../admin/actions.php:342
532
+ msgid "Backup type cannot be empty"
533
+ msgstr ""
534
+
535
+ #: ../admin/actions.php:345
536
+ msgid "Invalid backup type"
537
+ msgstr ""
538
+
539
+ #: ../admin/actions.php:357
540
+ msgid "Schedule cannot be empty"
541
+ msgstr ""
542
+
543
+ #: ../admin/actions.php:360
544
+ msgid "Invalid schedule"
545
+ msgstr ""
546
+
547
+ #: ../admin/actions.php:375
548
+ msgid "Max backups must be a number"
549
+ msgstr ""
550
+
551
+ #: ../admin/actions.php:481
552
+ msgid "%s didn't match any files."
553
+ msgstr ""
554
+
555
+ #: ../admin/backups.php:40
556
+ msgid "add schedule"
557
+ msgstr ""
558
+
559
+ #: ../admin/backups.php:71
560
+ msgid "Size"
561
+ msgstr ""
562
+
563
+ #: ../admin/backups.php:72
564
+ msgid "Type"
565
+ msgstr ""
566
+
567
+ #: ../admin/backups.php:73
568
+ msgid "Actions"
569
+ msgstr ""
570
+
571
+ #: ../admin/constants.php:3
572
+ msgid "The Codex can help"
573
+ msgstr ""
574
+
575
+ #: ../admin/constants.php:8
576
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
577
+ msgstr ""
578
+
579
+ #: ../admin/constants.php:11 ../admin/constants.php:14
580
+ msgid "database"
581
+ msgstr ""
582
+
583
+ #: ../admin/constants.php:14
584
+ msgid "files"
585
+ msgstr ""
586
+
587
+ #: ../admin/constants.php:17
588
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
589
+ msgstr ""
590
+
591
+ #: ../admin/menu.php:10 ../admin/page.php:6
592
+ msgid "Manage Backups"
593
+ msgstr ""
594
+
595
+ #: ../admin/menu.php:10 ../admin/menu.php:34
596
+ msgid "Backups"
597
+ msgstr ""
598
+
599
+ #: ../admin/menu.php:69
600
+ msgid "You are not using the latest stable version of BackUpWordPress"
601
+ msgstr ""
602
+
603
+ #: ../admin/menu.php:77
604
+ msgid "FAQ"
605
+ msgstr ""
606
+
607
+ #: ../admin/constants.php:3 ../admin/menu.php:79
608
+ msgid "Constants"
609
+ msgstr ""
610
+
611
+ #: ../admin/menu.php:82
612
+ msgid "For more information:"
613
+ msgstr ""
614
+
615
+ #: ../admin/menu.php:84
616
+ msgid "Support Forums"
617
+ msgstr ""
618
+
619
+ #: ../admin/menu.php:85
620
+ msgid "Help with translation"
621
+ msgstr ""
622
+
623
+ #: ../admin/page.php:27
624
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
625
+ msgstr ""
626
+
627
+ #: ../admin/schedule-form-excludes.php:17
628
+ msgid "Preview"
629
+ msgstr ""
630
+
631
+ #: ../admin/schedule-form-excludes.php:29
632
+ msgid "Exclude Rules"
633
+ msgstr ""
634
+
635
+ #: ../admin/schedule-form-excludes.php:52
636
+ msgid "Remove"
637
+ msgstr ""
638
+
639
+ #: ../admin/schedule-form-excludes.php:71
640
+ msgid "Excluded"
641
+ msgstr ""
642
+
643
+ #: ../admin/schedule-form-excludes.php:75
644
+ msgid "Included"
645
+ msgstr ""
646
+
647
+ #: ../admin/schedule-form-excludes.php:79
648
+ msgid "Unreadable"
649
+ msgstr ""
650
+
651
+ #: ../admin/schedule-form-excludes.php:107
652
+ msgid "Unreadable files can't be backed up"
653
+ msgstr ""
654
+
655
+ #: ../admin/schedule-form-excludes.php:113
656
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
657
+ msgstr ""
658
+
659
+ #: ../admin/schedule-form.php:11
660
+ msgid "Backup"
661
+ msgstr ""
662
+
663
+ #: ../admin/schedule-form.php:14
664
+ msgid "Both Database &amp; files"
665
+ msgstr ""
666
+
667
+ #: ../admin/schedule-form.php:15
668
+ msgid "Files only"
669
+ msgstr ""
670
+
671
+ #: ../admin/schedule-form.php:16
672
+ msgid "Database only"
673
+ msgstr ""
674
+
675
+ #: ../functions/interface.php:237
676
+ msgid "Files"
677
+ msgstr ""
678
+
679
+ #: ../admin/schedule-form-excludes.php:7
680
+ msgid "Manage Excludes"
681
+ msgstr ""
682
+
683
+ #: ../admin/schedule-form.php:23
684
+ msgid "Schedule"
685
+ msgstr ""
686
+
687
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
688
+ msgid "Update"
689
+ msgstr ""
690
+
691
+ #: ../admin/schedule.php:19
692
+ msgid "hourly at %s minutes past the hour"
693
+ msgstr ""
694
+
695
+ #: ../functions/interface.php:275
696
+ msgid "Run now"
697
+ msgstr ""
698
+
699
+ #: ../functions/interface.php:32 ../functions/interface.php:277
700
+ msgid "Delete"
701
+ msgstr ""
702
+
703
+ #: ../classes/class-email.php:164
704
+ msgid "Backup of %s"
705
+ msgstr ""
706
+
707
+ #: ../functions/core.php:334
708
+ msgid "This %s file ensures that other people cannot download your backup files."
709
+ msgstr ""
languages/backupwordpress-en_AU.po CHANGED
@@ -1,1211 +1,1211 @@
1
- # Copyright (C) 2015 Human Made Limited
2
- # This file is distributed under the GPL-2.0+.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: BackUpWordPress Backup Plugin 3.2.6\n"
6
- "POT-Creation-Date: 2015-07-13 12:44+0930\n"
7
- "MIME-Version: 1.0\n"
8
- "Content-Type: text/plain; charset=UTF-8\n"
9
- "Content-Transfer-Encoding: 8bit\n"
10
- "PO-Revision-Date: 2015-07-13 13:39+0930\n"
11
- "Last-Translator: ucavus\n"
12
- "Language-Team: ucavus\n"
13
- "X-Generator: Poedit 1.8.2\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "Language: en_AU\n"
16
-
17
- #: admin/actions.php:191
18
- msgid "The schedule ID was not provided. Aborting."
19
- msgstr ""
20
-
21
- #: admin/actions.php:241
22
- msgid "Backup type cannot be empty"
23
- msgstr ""
24
-
25
- #: admin/actions.php:245
26
- msgid "Invalid backup type"
27
- msgstr ""
28
-
29
- #: admin/actions.php:259
30
- msgid "Schedule cannot be empty"
31
- msgstr ""
32
-
33
- #: admin/actions.php:263
34
- msgid "Invalid schedule"
35
- msgstr ""
36
-
37
- #: admin/actions.php:277
38
- msgid "Day of the week must be a valid lowercase day name"
39
- msgstr ""
40
-
41
- #: admin/actions.php:296
42
- msgid "Day of month must be between 1 and 31"
43
- msgstr ""
44
-
45
- #: admin/actions.php:315
46
- msgid "Hours must be between 0 and 23"
47
- msgstr ""
48
-
49
- #: admin/actions.php:334
50
- msgid "Minutes must be between 0 and 59"
51
- msgstr ""
52
-
53
- #: admin/actions.php:348
54
- msgid "Max backups can't be empty"
55
- msgstr ""
56
-
57
- #: admin/actions.php:352
58
- msgid "Max backups must be a number"
59
- msgstr ""
60
-
61
- #: admin/actions.php:356
62
- msgid "Max backups must be greater than 0"
63
- msgstr ""
64
-
65
- #: admin/actions.php:708 admin/actions.php:714
66
- msgid "BackUpWordPress has detected a problem."
67
- msgstr ""
68
-
69
- #: admin/actions.php:708 admin/actions.php:714
70
- msgid ""
71
- "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
72
- "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
73
- "See the %3$s for more details."
74
- msgstr ""
75
-
76
- #: admin/backups-table.php:8 admin/schedule-form-excludes.php:105
77
- msgid "Size"
78
- msgstr ""
79
-
80
- #: admin/backups-table.php:9 admin/schedule-form-excludes.php:107
81
- msgid "Type"
82
- msgstr ""
83
-
84
- #: admin/backups-table.php:10
85
- msgid "Actions"
86
- msgstr ""
87
-
88
- #: admin/backups-table.php:35
89
- msgid "This is where your backups will appear once you have some."
90
- msgstr ""
91
-
92
- #: admin/backups.php:22
93
- msgid "add schedule"
94
- msgstr ""
95
-
96
- #: admin/backups.php:26
97
- msgid "Support"
98
- msgstr ""
99
-
100
- #: admin/backups.php:32
101
- msgid "Enable Support"
102
- msgstr ""
103
-
104
- #: admin/constants.php:3
105
- msgid ""
106
- "You can %1$s any of the following %2$s in your %3$s to control advanced "
107
- "settings. %4$s. Defined %5$s will be highlighted."
108
- msgstr ""
109
-
110
- #: admin/constants.php:3 admin/menu.php:82
111
- msgid "Constants"
112
- msgstr ""
113
-
114
- #: admin/constants.php:3
115
- msgid "The Codex can help"
116
- msgstr ""
117
-
118
- #: admin/constants.php:14 admin/constants.php:30 admin/constants.php:46
119
- #: admin/constants.php:62 admin/constants.php:78 admin/constants.php:94
120
- #: admin/constants.php:110 classes/class-email-service.php:60
121
- msgid "You've set it to: %s"
122
- msgstr ""
123
-
124
- #: admin/constants.php:17
125
- msgid ""
126
- "The path to folder you would like to store your backup files in, defaults to "
127
- "%s."
128
- msgstr ""
129
-
130
- #: admin/constants.php:17 admin/constants.php:33 admin/constants.php:49
131
- #: admin/constants.php:65 admin/constants.php:81 admin/constants.php:97
132
- #: admin/constants.php:113 classes/class-email-service.php:63
133
- msgid "e.g."
134
- msgstr ""
135
-
136
- #: admin/constants.php:33
137
- msgid ""
138
- "The path to your %1$s executable. Will be used for the %2$s part of the back "
139
- "up if available."
140
- msgstr ""
141
-
142
- #: admin/constants.php:33 admin/constants.php:49
143
- msgid "database"
144
- msgstr ""
145
-
146
- #: admin/constants.php:49
147
- msgid ""
148
- "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s "
149
- "if available."
150
- msgstr ""
151
-
152
- #: admin/constants.php:49
153
- msgid "files"
154
- msgstr ""
155
-
156
- #: admin/constants.php:65
157
- msgid ""
158
- "Comma separated list of files or directories to exclude, the backups "
159
- "directory is automatically excluded."
160
- msgstr ""
161
-
162
- #: admin/constants.php:81
163
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
164
- msgstr ""
165
-
166
- #: admin/constants.php:97
167
- msgid "The root directory that is backed up. Defaults to %s."
168
- msgstr ""
169
-
170
- #: admin/constants.php:113
171
- msgid "The time that your schedules should run. Defaults to %s."
172
- msgstr ""
173
-
174
- #: admin/enable-support.php:3
175
- msgid "Enable BackUpWordPress Support"
176
- msgstr ""
177
-
178
- #: admin/enable-support.php:5
179
- msgid ""
180
- "BackUpWordPress uses %s to provide support. In addition to allowing you to "
181
- "send and receive messages we also send the following server information "
182
- "along with your requests:"
183
- msgstr ""
184
-
185
- #: admin/enable-support.php:58
186
- msgid "You can disable support in the future by deactivating BackUpWordPress."
187
- msgstr ""
188
-
189
- #: admin/enable-support.php:60
190
- msgid "No thanks"
191
- msgstr ""
192
-
193
- #: admin/enable-support.php:61
194
- msgid "Yes I want to enable support"
195
- msgstr ""
196
-
197
- #: admin/faq.php:2
198
- msgid "Where does BackUpWordPress store the backup files?"
199
- msgstr ""
200
-
201
- #: admin/faq.php:4
202
- msgid ""
203
- "Backups are stored on your server in <code>/wp-content/backups</code>, you "
204
- "can change the directory."
205
- msgstr ""
206
-
207
- #: admin/faq.php:6
208
- msgid ""
209
- "Important: By default BackUpWordPress backs up everything in your site root "
210
- "as well as your database, this includes any non WordPress folders that "
211
- "happen to be in your site root. This does mean that your backup directory "
212
- "can get quite large."
213
- msgstr ""
214
-
215
- #: admin/faq.php:8
216
- msgid "What if I want to back up my site to another destination?"
217
- msgstr ""
218
-
219
- #: admin/faq.php:10
220
- msgid ""
221
- "BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, "
222
- "Azure, DreamObjects and FTP/SFTP. Check it out here: <a href=\"http://bwp."
223
- "hmn.md/?utm_source=wordpress-org&utm_medium=plugin-"
224
- "page&utm_campaign=freeplugin\" title=\"BackUpWordPress Homepage\" target="
225
- "\"_blank\">https://bwp.hmn.md</a>"
226
- msgstr ""
227
-
228
- #: admin/faq.php:12
229
- msgid "How do I restore my site from a backup?"
230
- msgstr ""
231
-
232
- #: admin/faq.php:14
233
- msgid ""
234
- "You need to download the latest backup file either by clicking download on "
235
- "the backups page or via <code>FTP</code>. <code>Unzip</code> the files and "
236
- "upload all the files to your server overwriting your site. You can then "
237
- "import the database using your hosts database management tool (likely "
238
- "<code>phpMyAdmin</code>)."
239
- msgstr ""
240
-
241
- #: admin/faq.php:16
242
- msgid ""
243
- "See this guide for more details - <a href=\"https://bwp.hmn.md/support-"
244
- "center/restore-backup/\" title=\"Go to support center\" target=\"_blank"
245
- "\">How to restore from backup</a>."
246
- msgstr ""
247
-
248
- #: admin/faq.php:18
249
- msgid "Does BackUpWordPress back up the backups directory?"
250
- msgstr ""
251
-
252
- #: admin/faq.php:20
253
- msgid "No."
254
- msgstr ""
255
-
256
- #: admin/faq.php:22
257
- msgid "I'm not receiving my backups by email?"
258
- msgstr ""
259
-
260
- #: admin/faq.php:24
261
- msgid ""
262
- "Most servers have a filesize limit on email attachments, it's generally "
263
- "about 10mb. If your backup file is over that limit it won't be sent attached "
264
- "to the email, instead you should receive an email with a link to download "
265
- "the backup, if you aren't even receiving that then you likely have a mail "
266
- "issue on your server that you'll need to contact your host about."
267
- msgstr ""
268
-
269
- #: admin/faq.php:26
270
- msgid "How many backups are stored by default?"
271
- msgstr ""
272
-
273
- #: admin/faq.php:28
274
- msgid "BackUpWordPress stores the last 10 backups by default."
275
- msgstr ""
276
-
277
- #: admin/faq.php:30
278
- msgid "How long should a backup take?"
279
- msgstr ""
280
-
281
- #: admin/faq.php:32
282
- msgid ""
283
- "Unless your site is very large (many gigabytes) it should only take a few "
284
- "minutes to perform a back up, if your back up has been running for longer "
285
- "than an hour it's safe to assume that something has gone wrong, try de-"
286
- "activating and re-activating the plugin, if it keeps happening, contact "
287
- "support."
288
- msgstr ""
289
-
290
- #: admin/faq.php:34
291
- msgid "What do I do if I get the wp-cron error message?"
292
- msgstr ""
293
-
294
- #: admin/faq.php:36
295
- msgid ""
296
- "The issue is that your <code>wp-cron.php</code> is not returning a "
297
- "<code>200</code> response when hit with a HTTP request originating from your "
298
- "own server, it could be several things, in most cases, it's an issue with "
299
- "the server / site."
300
- msgstr ""
301
-
302
- #: admin/faq.php:38
303
- msgid "There are some things you can test to confirm this is the issue."
304
- msgstr ""
305
-
306
- #: admin/faq.php:40
307
- msgid "Are scheduled posts working? (They use wp-cron as well ). "
308
- msgstr ""
309
-
310
- #: admin/faq.php:42
311
- msgid ""
312
- "Are you hosted on Heart Internet? (wp-cron may not be supported by Heart "
313
- "Internet, see below for work-around)."
314
- msgstr ""
315
-
316
- #: admin/faq.php:44
317
- msgid "If you click manual backup does it work?"
318
- msgstr ""
319
-
320
- #: admin/faq.php:46
321
- msgid ""
322
- "Try adding <code>define( 'ALTERNATE_WP_CRON', true );</code> to your "
323
- "<code>wp-config.php</code>, do automatic backups work?"
324
- msgstr ""
325
-
326
- #: admin/faq.php:48
327
- msgid ""
328
- "Is your site private (I.E. is it behind some kind of authentication, "
329
- "maintenance plugin, .htaccess) if so wp-cron won't work until you remove it, "
330
- "if you are and you temporarily remove the authentication, do backups start "
331
- "working?"
332
- msgstr ""
333
-
334
- #: admin/faq.php:50
335
- msgid ""
336
- "Report the results to our support team for further help. To do this, either "
337
- "enable suport from your Admin Dashboard (recommended), or email support@hmn."
338
- "md"
339
- msgstr ""
340
-
341
- #: admin/faq.php:52
342
- msgid "How to get BackUpWordPress working in Heart Internet"
343
- msgstr ""
344
-
345
- #: admin/faq.php:54
346
- msgid ""
347
- "The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/"
348
- "php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the "
349
- "space between php5 and the location of the file). The file <code>wp-cron."
350
- "php</code> <code>chmod</code> must be set to <code>711</code>."
351
- msgstr ""
352
-
353
- #: admin/faq.php:56
354
- msgid "My backups seem to be failing?"
355
- msgstr ""
356
-
357
- #: admin/faq.php:58
358
- msgid ""
359
- "If your backups are failing - it's commonly caused by lack of available "
360
- "resources on your server. The easiest way to establish this to exclude some "
361
- "[of] or your entire uploades folder, running a backup an if that succeeds. "
362
- "If so, we know it's probably a server issue. If not, report the results to "
363
- "our support team for further help. To do this, either enable suport from "
364
- "your Admin Dashboard (recommended), or email support@hmn.md"
365
- msgstr ""
366
-
367
- #: admin/menu.php:13 admin/menu.php:17
368
- msgid "Manage Backups"
369
- msgstr ""
370
-
371
- #: admin/menu.php:13 admin/menu.php:17 admin/menu.php:46
372
- msgid "Backups"
373
- msgstr ""
374
-
375
- #: admin/menu.php:77
376
- msgid "FAQ"
377
- msgstr ""
378
-
379
- #: admin/menu.php:95
380
- msgid "Server Info"
381
- msgstr ""
382
-
383
- #: admin/menu.php:102
384
- msgid "For more information:"
385
- msgstr ""
386
-
387
- #: admin/menu.php:104
388
- msgid "Support Forums"
389
- msgstr ""
390
-
391
- #: admin/menu.php:105
392
- msgid "Help with translation"
393
- msgstr ""
394
-
395
- #: admin/page.php:7
396
- msgid ""
397
- "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin "
398
- "directory%2$s."
399
- msgstr ""
400
-
401
- #: admin/schedule-form-excludes.php:6
402
- msgid "Currently Excluded"
403
- msgstr ""
404
-
405
- #: admin/schedule-form-excludes.php:9
406
- msgid ""
407
- "We automatically detect and ignore common <abbr title=\"Version Control "
408
- "Systems\">VCS</abbr> folders and other backup plugin folders."
409
- msgstr ""
410
-
411
- #: admin/schedule-form-excludes.php:44
412
- msgid "Default rule"
413
- msgstr ""
414
-
415
- #: admin/schedule-form-excludes.php:48
416
- msgid "Defined in wp-config.php"
417
- msgstr ""
418
-
419
- #: admin/schedule-form-excludes.php:55
420
- msgid "Stop excluding"
421
- msgstr ""
422
-
423
- #: admin/schedule-form-excludes.php:71
424
- msgid "Directory Listing"
425
- msgstr ""
426
-
427
- #: admin/schedule-form-excludes.php:73
428
- msgid ""
429
- "Here's a directory listing of all files on your site, you can browse through "
430
- "and exclude files or folders that you don't want included in your backup."
431
- msgstr ""
432
-
433
- #: admin/schedule-form-excludes.php:104
434
- msgid "Name"
435
- msgstr ""
436
-
437
- #: admin/schedule-form-excludes.php:106
438
- msgid "Permissions"
439
- msgstr ""
440
-
441
- #: admin/schedule-form-excludes.php:108
442
- msgid "Status"
443
- msgstr ""
444
-
445
- #: admin/schedule-form-excludes.php:168 admin/schedule-form-excludes.php:284
446
- msgid "Refresh"
447
- msgstr ""
448
-
449
- #: admin/schedule-form-excludes.php:185 admin/schedule-form-excludes.php:308
450
- msgid "Symlink"
451
- msgstr ""
452
-
453
- #: admin/schedule-form-excludes.php:189 admin/schedule-form-excludes.php:312
454
- msgid "Folder"
455
- msgstr ""
456
-
457
- #: admin/schedule-form-excludes.php:282
458
- msgid "Recalculate the size of this directory"
459
- msgstr ""
460
-
461
- #: admin/schedule-form-excludes.php:316
462
- msgid "File"
463
- msgstr ""
464
-
465
- #: admin/schedule-form-excludes.php:327
466
- msgid "Unreadable files won't be backed up."
467
- msgstr ""
468
-
469
- #: admin/schedule-form-excludes.php:327
470
- msgid "Unreadable"
471
- msgstr ""
472
-
473
- #: admin/schedule-form-excludes.php:331
474
- msgid "Excluded"
475
- msgstr ""
476
-
477
- #: admin/schedule-form-excludes.php:347
478
- msgid "Exclude &rarr;"
479
- msgstr ""
480
-
481
- #: admin/schedule-form-excludes.php:365 admin/schedule-form.php:192
482
- #: admin/schedule-settings.php:88
483
- msgid "Done"
484
- msgstr ""
485
-
486
- #: admin/schedule-form.php:1 admin/schedule-settings.php:9
487
- msgid "Settings"
488
- msgstr ""
489
-
490
- #: admin/schedule-form.php:36
491
- msgid "Backup"
492
- msgstr ""
493
-
494
- #: admin/schedule-form.php:43
495
- msgid "Both Database &amp; files"
496
- msgstr ""
497
-
498
- #: admin/schedule-form.php:45
499
- msgid "Files only"
500
- msgstr ""
501
-
502
- #: admin/schedule-form.php:47
503
- msgid "Database only"
504
- msgstr ""
505
-
506
- #: admin/schedule-form.php:58
507
- msgid "Schedule"
508
- msgstr ""
509
-
510
- #: admin/schedule-form.php:65
511
- msgid "Manual Only"
512
- msgstr ""
513
-
514
- #: admin/schedule-form.php:92
515
- msgid "Start Day"
516
- msgstr ""
517
-
518
- #: admin/schedule-form.php:100
519
- msgid "Monday"
520
- msgstr ""
521
-
522
- #: admin/schedule-form.php:101
523
- msgid "Tuesday"
524
- msgstr ""
525
-
526
- #: admin/schedule-form.php:102
527
- msgid "Wednesday"
528
- msgstr ""
529
-
530
- #: admin/schedule-form.php:103
531
- msgid "Thursday"
532
- msgstr ""
533
-
534
- #: admin/schedule-form.php:104
535
- msgid "Friday"
536
- msgstr ""
537
-
538
- #: admin/schedule-form.php:105
539
- msgid "Saturday"
540
- msgstr ""
541
-
542
- #: admin/schedule-form.php:106
543
- msgid "Sunday"
544
- msgstr ""
545
-
546
- #: admin/schedule-form.php:124
547
- msgid "Start Day of Month"
548
- msgstr ""
549
-
550
- #: admin/schedule-form.php:136
551
- msgid "Start Time"
552
- msgstr ""
553
-
554
- #: admin/schedule-form.php:145
555
- msgid "Hours"
556
- msgstr ""
557
-
558
- #: admin/schedule-form.php:149
559
- msgid "Minutes"
560
- msgstr ""
561
-
562
- #: admin/schedule-form.php:152
563
- msgid "Please use 24 hour format for hours"
564
- msgstr ""
565
-
566
- #: admin/schedule-form.php:153
567
- msgid "The second backup will run 12 hours after the first"
568
- msgstr ""
569
-
570
- #: admin/schedule-form.php:162
571
- msgid "Number of backups to store on this server"
572
- msgstr ""
573
-
574
- #: admin/schedule-form.php:171
575
- msgid "Past this limit older backups will be deleted automatically."
576
- msgstr ""
577
-
578
- #: admin/schedule-form.php:174
579
- msgid "This schedule will store a maximum of %s of backups."
580
- msgstr ""
581
-
582
- #: admin/schedule-sentence.php:11
583
- msgid "The next backup will be on %1$s at %2$s %3$s"
584
- msgstr ""
585
-
586
- #: admin/schedule-sentence.php:18
587
- msgid "hourly on the hour"
588
- msgstr ""
589
-
590
- #: admin/schedule-sentence.php:18
591
- msgid "hourly at %s minutes past the hour"
592
- msgstr ""
593
-
594
- #: admin/schedule-sentence.php:24
595
- msgid "daily at %s"
596
- msgstr ""
597
-
598
- #: admin/schedule-sentence.php:35
599
- msgid "every 12 hours at %1$s &amp; %2$s"
600
- msgstr ""
601
-
602
- #: admin/schedule-sentence.php:41
603
- msgid "weekly on %1$s at %2$s"
604
- msgstr ""
605
-
606
- #: admin/schedule-sentence.php:47
607
- msgid "biweekly on %1$s at %2$s"
608
- msgstr "fortnightly on %1$s at %2$s"
609
-
610
- #: admin/schedule-sentence.php:53
611
- msgid "on the %1$s of each month at %2$s"
612
- msgstr ""
613
-
614
- #: admin/schedule-sentence.php:59 admin/schedule-sentence.php:65
615
- msgid "manually"
616
- msgstr ""
617
-
618
- #: admin/schedule-sentence.php:70
619
- msgid "this server"
620
- msgstr ""
621
-
622
- #: admin/schedule-sentence.php:78
623
- msgid "store the most recent backup in %s"
624
- msgstr ""
625
-
626
- #: admin/schedule-sentence.php:84
627
- msgid "don't store any backups in on this server"
628
- msgstr ""
629
-
630
- #: admin/schedule-sentence.php:90
631
- msgid "store the last %1$s backups in %2$s"
632
- msgstr ""
633
-
634
- #: admin/schedule-sentence.php:123
635
- msgid "%s. "
636
- msgstr ""
637
-
638
- #: admin/schedule-sentence.php:127
639
- msgid "Send a copy of each backup to %s."
640
- msgstr ""
641
-
642
- #: admin/schedule-sentence.php:158
643
- msgid "Backups will be compressed and should be smaller than this."
644
- msgstr ""
645
-
646
- #: admin/schedule-sentence.php:162
647
- msgid "this shouldn't take long&hellip;"
648
- msgstr ""
649
-
650
- #: admin/schedule-sentence.php:162
651
- msgid "calculating the size of your backup&hellip;"
652
- msgstr ""
653
-
654
- #: admin/schedule-settings.php:7
655
- msgid "Run now"
656
- msgstr ""
657
-
658
- #: admin/schedule-settings.php:15
659
- msgid "Excludes"
660
- msgstr ""
661
-
662
- #: admin/schedule-settings.php:27 functions/interface.php:34
663
- msgid "Delete"
664
- msgstr ""
665
-
666
- #: admin/server-info.php:43
667
- msgid "%1$s - %2$s"
668
- msgstr ""
669
-
670
- #: admin/upsell.php:3
671
- msgid "Backup to"
672
- msgstr ""
673
-
674
- #: admin/upsell.php:18
675
- msgid ""
676
- "%1$sor buy the %2$sDeveloper Bundle%3$s now for only &dollar;99 (all "
677
- "Destinations &amp; Unlimited Sites)%4$s"
678
- msgstr ""
679
-
680
- #: backupwordpress.php:53
681
- msgid ""
682
- "BackUpWordPress will not work on this site. ( PHP Version %s is unsupported )"
683
- msgstr ""
684
-
685
- #: backupwordpress.php:53
686
- msgid "BackUpWordPress Error"
687
- msgstr ""
688
-
689
- #: classes/class-backup.php:388
690
- msgid "archive filename must be a non empty string"
691
- msgstr ""
692
-
693
- #: classes/class-backup.php:392
694
- msgid "invalid file extension for archive filename <code>%s</code>"
695
- msgstr ""
696
-
697
- #: classes/class-backup.php:433
698
- msgid "database dump filename must be a non empty string"
699
- msgstr ""
700
-
701
- #: classes/class-backup.php:437
702
- msgid "invalid file extension for database dump filename <code>%s</code>"
703
- msgstr ""
704
-
705
- #: classes/class-backup.php:471
706
- msgid "Invalid root path <code>%s</code> must be a valid directory path"
707
- msgstr ""
708
-
709
- #: classes/class-backup.php:497
710
- msgid ""
711
- "Invalid existing archive filepath <code>%s</code> must be a non empty "
712
- "(string)"
713
- msgstr ""
714
-
715
- #: classes/class-backup.php:552
716
- msgid ""
717
- "Invalid backup type <code>%s</code> must be one of (string) file, database "
718
- "or complete"
719
- msgstr ""
720
-
721
- #: classes/class-backup.php:1926
722
- msgid "Could not connect to mysql"
723
- msgstr ""
724
-
725
- #: classes/class-backupwordpress-wp-cli-command.php:50
726
- msgid "Backup: Dumping database..."
727
- msgstr ""
728
-
729
- #: classes/class-backupwordpress-wp-cli-command.php:54
730
- msgid "Backup: Zipping everything up..."
731
- msgstr ""
732
-
733
- #: classes/class-backupwordpress-wp-cli-command.php:70
734
- msgid "Invalid backup path"
735
- msgstr ""
736
-
737
- #: classes/class-backupwordpress-wp-cli-command.php:75
738
- msgid "Invalid root path"
739
- msgstr ""
740
-
741
- #: classes/class-backupwordpress-wp-cli-command.php:106
742
- msgid "Backup Complete: "
743
- msgstr ""
744
-
745
- #: classes/class-backupwordpress-wp-cli-command.php:108
746
- msgid "Backup Failed"
747
- msgstr ""
748
-
749
- #: classes/class-email-service.php:28
750
- msgid "Email notification"
751
- msgstr ""
752
-
753
- #: classes/class-email-service.php:34
754
- msgid ""
755
- "Receive a notification email when a backup completes, if the backup is small "
756
- "enough (&lt; %s) then it will be attached to the email. Separate multiple "
757
- "email addresses with a comma."
758
- msgstr ""
759
-
760
- #: classes/class-email-service.php:63
761
- msgid ""
762
- "The maximum filesize of your backup that will be attached to your "
763
- "notification emails . Defaults to %s."
764
- msgstr ""
765
-
766
- #: classes/class-email-service.php:82
767
- msgid "Send an email notification to %s"
768
- msgstr ""
769
-
770
- #: classes/class-email-service.php:117
771
- msgid "%s isn't a valid email"
772
- msgstr ""
773
-
774
- #: classes/class-email-service.php:179 classes/class-webhook-service.php:59
775
- msgid "Backup of %s Failed"
776
- msgstr ""
777
-
778
- #: classes/class-email-service.php:181
779
- msgid "BackUpWordPress was unable to backup your site %1$s."
780
- msgstr ""
781
-
782
- #: classes/class-email-service.php:181
783
- msgid "Here are the errors that we're encountered:"
784
- msgstr ""
785
-
786
- #: classes/class-email-service.php:181
787
- msgid ""
788
- "If the errors above look like Martian, forward this email to %3$s and we'll "
789
- "take a look"
790
- msgstr ""
791
-
792
- #: classes/class-email-service.php:181
793
- msgid ""
794
- "Kind Regards,\n"
795
- "The Apologetic BackUpWordPress Backup Emailing Robot"
796
- msgstr ""
797
-
798
- #: classes/class-email-service.php:189
799
- msgid "Backup of %s"
800
- msgstr ""
801
-
802
- #: classes/class-email-service.php:194 classes/class-email-service.php:203
803
- msgid "BackUpWordPress has completed a backup of your site %1$s."
804
- msgstr ""
805
-
806
- #: classes/class-email-service.php:194
807
- msgid "The backup file should be attached to this email."
808
- msgstr ""
809
-
810
- #: classes/class-email-service.php:194 classes/class-email-service.php:203
811
- msgid "You can download the backup file by clicking the link below:"
812
- msgstr ""
813
-
814
- #: classes/class-email-service.php:194 classes/class-email-service.php:203
815
- msgid ""
816
- "Kind Regards,\n"
817
- "The Happy BackUpWordPress Backup Emailing Robot"
818
- msgstr ""
819
-
820
- #: classes/class-email-service.php:203
821
- msgid "Unfortunately the backup file was too large to attach to this email."
822
- msgstr ""
823
-
824
- #: classes/class-path.php:249
825
- msgid ""
826
- "This %s file ensures that other people cannot download your backup files."
827
- msgstr ""
828
-
829
- #: classes/class-plugin.php:214
830
- msgid "Update"
831
- msgstr ""
832
-
833
- #: classes/class-plugin.php:215
834
- msgid "Cancel"
835
- msgstr ""
836
-
837
- #: classes/class-plugin.php:216
838
- msgid ""
839
- "Are you sure you want to delete this schedule? All of it's backups will also "
840
- "be deleted."
841
- msgstr ""
842
-
843
- #: classes/class-plugin.php:216 classes/class-plugin.php:217
844
- #: classes/class-plugin.php:218 classes/class-plugin.php:219
845
- msgid "'Cancel' to go back, 'OK' to delete."
846
- msgstr ""
847
-
848
- #: classes/class-plugin.php:217
849
- msgid "Are you sure you want to delete this backup?"
850
- msgstr ""
851
-
852
- #: classes/class-plugin.php:218
853
- msgid "Are you sure you want to remove this exclude rule?"
854
- msgstr ""
855
-
856
- #: classes/class-plugin.php:219
857
- msgid ""
858
- "Reducing the number of backups that are stored on this server will cause "
859
- "some of your existing backups to be deleted, are you sure that's what you "
860
- "want?"
861
- msgstr ""
862
-
863
- #: classes/class-schedule.php:151
864
- msgid "Invalid Option Name"
865
- msgstr ""
866
-
867
- #: classes/class-schedule.php:264
868
- msgid "Argument 1 for %s must be a valid integer"
869
- msgstr ""
870
-
871
- #: classes/class-schedule.php:612
872
- msgid "Argument 1 for %s must be a valid future timestamp"
873
- msgstr ""
874
-
875
- #: classes/class-schedule.php:649
876
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
877
- msgstr ""
878
-
879
- #: classes/class-schedule.php:778 functions/interface.php:267
880
- msgid "Starting Backup"
881
- msgstr ""
882
-
883
- #: classes/class-schedule.php:865
884
- msgid "Error writing to file. (%s)"
885
- msgstr ""
886
-
887
- #: classes/class-schedule.php:916
888
- msgid "Dumping Database %s"
889
- msgstr ""
890
-
891
- #: classes/class-schedule.php:921
892
- msgid "Verifying Database Dump %s"
893
- msgstr ""
894
-
895
- #: classes/class-schedule.php:926
896
- msgid "Creating zip archive %s"
897
- msgstr ""
898
-
899
- #: classes/class-schedule.php:931
900
- msgid "Verifying Zip Archive %s"
901
- msgstr ""
902
-
903
- #: classes/class-schedule.php:936
904
- msgid "Finishing Backup"
905
- msgstr ""
906
-
907
- #: classes/class-schedule.php:987
908
- msgid "An unexpected error occured"
909
- msgstr ""
910
-
911
- #. translators: min=minute
912
- #: classes/class-schedule.php:1050
913
- msgid "%s min"
914
- msgid_plural "%s mins"
915
- msgstr[0] ""
916
- msgstr[1] ""
917
-
918
- #: classes/class-schedule.php:1060
919
- msgid "%s hour"
920
- msgid_plural "%s hours"
921
- msgstr[0] ""
922
- msgstr[1] ""
923
-
924
- #: classes/class-schedule.php:1122
925
- msgid "Argument 1 for %s must be a non empty string"
926
- msgstr ""
927
-
928
- #: classes/class-schedule.php:1127
929
- msgid "%s doesn't exist"
930
- msgstr ""
931
-
932
- #: classes/class-schedule.php:1132
933
- msgid "That backup wasn't created by this schedule"
934
- msgstr ""
935
-
936
- #: classes/class-services.php:80
937
- msgid "Argument 1 for %s must be a valid filepath"
938
- msgstr ""
939
-
940
- #: classes/class-services.php:96
941
- msgid "Argument 1 for %s must be a registered service"
942
- msgstr ""
943
-
944
- #: classes/class-services.php:114 classes/deprecated.php:81
945
- msgid "Argument 1 for %s must be a valid class"
946
- msgstr ""
947
-
948
- #: classes/class-setup.php:34
949
- msgid "BackUpWordPress"
950
- msgstr ""
951
-
952
- #: classes/class-setup.php:170
953
- msgid ""
954
- "BackUpWordPress requires PHP version %1$s or later and WordPress version "
955
- "%2$s or later to run. It has not been activated. %3$s%4$s%5$sLearn more%6$s"
956
- msgstr ""
957
-
958
- #: classes/class-webhook-service.php:103
959
- msgid "Error: %s"
960
- msgstr ""
961
-
962
- #: functions/core.php:326
963
- msgid "BackUpWordPress has setup your default schedules."
964
- msgstr ""
965
-
966
- #: functions/core.php:326
967
- msgid ""
968
- "By default BackUpWordPress performs a daily backup of your database and a "
969
- "weekly backup of your database &amp; files. You can modify these schedules."
970
- msgstr ""
971
-
972
- #: functions/core.php:341
973
- msgid "Once Hourly"
974
- msgstr ""
975
-
976
- #: functions/core.php:342
977
- msgid "Twice Daily"
978
- msgstr ""
979
-
980
- #: functions/core.php:343
981
- msgid "Once Daily"
982
- msgstr ""
983
-
984
- #: functions/core.php:344
985
- msgid "Once Weekly"
986
- msgstr ""
987
-
988
- #: functions/core.php:345
989
- msgid "Once Biweekly"
990
- msgstr "Once Fortnightly"
991
-
992
- #: functions/core.php:346
993
- msgid "Once Monthly"
994
- msgstr ""
995
-
996
- #: functions/core.php:364
997
- msgid "You can only delete directories inside your WordPress installation"
998
- msgstr ""
999
-
1000
- #: functions/interface.php:31
1001
- msgid "Download"
1002
- msgstr ""
1003
-
1004
- #: functions/interface.php:68
1005
- msgid "BackUpWordPress detected issues with your last backup."
1006
- msgstr ""
1007
-
1008
- #: functions/interface.php:70
1009
- msgid "Dismiss"
1010
- msgstr ""
1011
-
1012
- #: functions/interface.php:136
1013
- msgid ""
1014
- "The backups directory can't be created because your %1$s directory isn't "
1015
- "writable, run %2$s or %3$s or create the folder yourself."
1016
- msgstr ""
1017
-
1018
- #: functions/interface.php:140
1019
- msgid ""
1020
- "Your backups directory isn't writable, run %1$s or %2$s or set the "
1021
- "permissions yourself."
1022
- msgstr ""
1023
-
1024
- #: functions/interface.php:144
1025
- msgid ""
1026
- "%1$s is running in %2$s, please contact your host and ask them to disable "
1027
- "it. BackUpWordPress may not work correctly whilst %3$s is on."
1028
- msgstr ""
1029
-
1030
- #: functions/interface.php:144
1031
- msgid "http://php.net/manual/en/features.safe-mode.php"
1032
- msgstr ""
1033
-
1034
- #: functions/interface.php:144
1035
- msgid "Safe Mode"
1036
- msgstr ""
1037
-
1038
- #: functions/interface.php:152
1039
- msgid "Your custom path does not exist"
1040
- msgstr ""
1041
-
1042
- #: functions/interface.php:156
1043
- msgid ""
1044
- "Your custom path is unreachable due to a restriction set in your PHP "
1045
- "configuration (open_basedir)"
1046
- msgstr ""
1047
-
1048
- #: functions/interface.php:161
1049
- msgid ""
1050
- "Your custom backups directory %1$s doesn't exist and can't be created, your "
1051
- "backups will be saved to %2$s instead."
1052
- msgstr ""
1053
-
1054
- #: functions/interface.php:165
1055
- msgid ""
1056
- "Your custom backups directory %1$s isn't writable, new backups will be saved "
1057
- "to %2$s instead."
1058
- msgstr ""
1059
-
1060
- #: functions/interface.php:174
1061
- msgid "Your site root path %s isn't readable."
1062
- msgstr ""
1063
-
1064
- #: functions/interface.php:236
1065
- msgid "Database and Files"
1066
- msgstr ""
1067
-
1068
- #: functions/interface.php:240
1069
- msgid "Files"
1070
- msgstr ""
1071
-
1072
- #: functions/interface.php:244
1073
- msgid "Database"
1074
- msgstr ""
1075
-
1076
- #: functions/interface.php:251
1077
- msgid "Legacy"
1078
- msgstr ""
1079
-
1080
- #: functions/interface.php:266
1081
- msgid "Started %s ago"
1082
- msgstr ""
1083
-
1084
- #: functions/interface.php:268
1085
- msgid "cancel"
1086
- msgstr ""
1087
-
1088
- #: functions/interface.php:316
1089
- msgid "No backups completed"
1090
- msgstr ""
1091
-
1092
- #: functions/interface.php:327
1093
- msgid "Complete Hourly"
1094
- msgstr ""
1095
-
1096
- #: functions/interface.php:328
1097
- msgid "File Hourly"
1098
- msgstr ""
1099
-
1100
- #: functions/interface.php:329
1101
- msgid "Database Hourly"
1102
- msgstr ""
1103
-
1104
- #: functions/interface.php:330
1105
- msgid "Complete Twicedaily"
1106
- msgstr ""
1107
-
1108
- #: functions/interface.php:331
1109
- msgid "File Twicedaily"
1110
- msgstr ""
1111
-
1112
- #: functions/interface.php:332
1113
- msgid "Database Twicedaily"
1114
- msgstr ""
1115
-
1116
- #: functions/interface.php:333
1117
- msgid "Complete Daily"
1118
- msgstr ""
1119
-
1120
- #: functions/interface.php:334
1121
- msgid "File Daily"
1122
- msgstr ""
1123
-
1124
- #: functions/interface.php:335
1125
- msgid "Database Daily"
1126
- msgstr ""
1127
-
1128
- #: functions/interface.php:336
1129
- msgid "Complete Weekly"
1130
- msgstr ""
1131
-
1132
- #: functions/interface.php:337
1133
- msgid "File Weekly"
1134
- msgstr ""
1135
-
1136
- #: functions/interface.php:338
1137
- msgid "Database Weekly"
1138
- msgstr ""
1139
-
1140
- #: functions/interface.php:339
1141
- msgid "Complete Biweekly"
1142
- msgstr "Complete Fortnightly"
1143
-
1144
- #: functions/interface.php:340
1145
- msgid "File Biweekly"
1146
- msgstr "File Fortnightly"
1147
-
1148
- #: functions/interface.php:341
1149
- msgid "Database Biweekly"
1150
- msgstr "Database Fortnightly"
1151
-
1152
- #: functions/interface.php:342
1153
- msgid "Complete Monthly"
1154
- msgstr ""
1155
-
1156
- #: functions/interface.php:343
1157
- msgid "File Monthly"
1158
- msgstr ""
1159
-
1160
- #: functions/interface.php:344
1161
- msgid "Database Monthly"
1162
- msgstr ""
1163
-
1164
- #: functions/interface.php:345
1165
- msgid "Complete Manually"
1166
- msgstr ""
1167
-
1168
- #: functions/interface.php:346
1169
- msgid "File Manually"
1170
- msgstr ""
1171
-
1172
- #: functions/interface.php:347
1173
- msgid "Database Manually"
1174
- msgstr ""
1175
-
1176
- #. Plugin Name of the plugin/theme
1177
- msgid "BackUpWordPress Backup Plugin"
1178
- msgstr ""
1179
-
1180
- #. Plugin URI of the plugin/theme
1181
- msgid "http://bwp.hmn.md/"
1182
- msgstr ""
1183
-
1184
- #. Description of the plugin/theme
1185
- msgid ""
1186
- "Simple automated backups of your WordPress powered website. Once activated "
1187
- "you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, "
1188
- "you'll find me under the Network Settings menu."
1189
- msgstr ""
1190
-
1191
- #. Author of the plugin/theme
1192
- msgid "Human Made Limited"
1193
- msgstr ""
1194
-
1195
- #. Author URI of the plugin/theme
1196
- msgid "http://hmn.md/"
1197
- msgstr ""
1198
-
1199
- #: admin/schedule-sentence.php:120
1200
- msgctxt ""
1201
- "1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to "
1202
- "store"
1203
- msgid "Backup my %1$s %2$s %3$s, %4$s."
1204
- msgstr ""
1205
-
1206
- #: functions/interface.php:318
1207
- msgctxt "backups count"
1208
- msgid "One backup completed"
1209
- msgid_plural "%1$s backups completed"
1210
- msgstr[0] ""
1211
- msgstr[1] ""
1
+ # Copyright (C) 2015 Human Made Limited
2
+ # This file is distributed under the GPL-2.0+.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: BackUpWordPress Backup Plugin 3.2.6\n"
6
+ "POT-Creation-Date: 2015-07-13 12:44+0930\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "PO-Revision-Date: 2015-07-13 13:39+0930\n"
11
+ "Last-Translator: ucavus\n"
12
+ "Language-Team: ucavus\n"
13
+ "X-Generator: Poedit 1.8.2\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "Language: en_AU\n"
16
+
17
+ #: admin/actions.php:191
18
+ msgid "The schedule ID was not provided. Aborting."
19
+ msgstr ""
20
+
21
+ #: admin/actions.php:241
22
+ msgid "Backup type cannot be empty"
23
+ msgstr ""
24
+
25
+ #: admin/actions.php:245
26
+ msgid "Invalid backup type"
27
+ msgstr ""
28
+
29
+ #: admin/actions.php:259
30
+ msgid "Schedule cannot be empty"
31
+ msgstr ""
32
+
33
+ #: admin/actions.php:263
34
+ msgid "Invalid schedule"
35
+ msgstr ""
36
+
37
+ #: admin/actions.php:277
38
+ msgid "Day of the week must be a valid lowercase day name"
39
+ msgstr ""
40
+
41
+ #: admin/actions.php:296
42
+ msgid "Day of month must be between 1 and 31"
43
+ msgstr ""
44
+
45
+ #: admin/actions.php:315
46
+ msgid "Hours must be between 0 and 23"
47
+ msgstr ""
48
+
49
+ #: admin/actions.php:334
50
+ msgid "Minutes must be between 0 and 59"
51
+ msgstr ""
52
+
53
+ #: admin/actions.php:348
54
+ msgid "Max backups can't be empty"
55
+ msgstr ""
56
+
57
+ #: admin/actions.php:352
58
+ msgid "Max backups must be a number"
59
+ msgstr ""
60
+
61
+ #: admin/actions.php:356
62
+ msgid "Max backups must be greater than 0"
63
+ msgstr ""
64
+
65
+ #: admin/actions.php:708 admin/actions.php:714
66
+ msgid "BackUpWordPress has detected a problem."
67
+ msgstr ""
68
+
69
+ #: admin/actions.php:708 admin/actions.php:714
70
+ msgid ""
71
+ "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
72
+ "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
73
+ "See the %3$s for more details."
74
+ msgstr ""
75
+
76
+ #: admin/backups-table.php:8 admin/schedule-form-excludes.php:105
77
+ msgid "Size"
78
+ msgstr ""
79
+
80
+ #: admin/backups-table.php:9 admin/schedule-form-excludes.php:107
81
+ msgid "Type"
82
+ msgstr ""
83
+
84
+ #: admin/backups-table.php:10
85
+ msgid "Actions"
86
+ msgstr ""
87
+
88
+ #: admin/backups-table.php:35
89
+ msgid "This is where your backups will appear once you have some."
90
+ msgstr ""
91
+
92
+ #: admin/backups.php:22
93
+ msgid "add schedule"
94
+ msgstr ""
95
+
96
+ #: admin/backups.php:26
97
+ msgid "Support"
98
+ msgstr ""
99
+
100
+ #: admin/backups.php:32
101
+ msgid "Enable Support"
102
+ msgstr ""
103
+
104
+ #: admin/constants.php:3
105
+ msgid ""
106
+ "You can %1$s any of the following %2$s in your %3$s to control advanced "
107
+ "settings. %4$s. Defined %5$s will be highlighted."
108
+ msgstr ""
109
+
110
+ #: admin/constants.php:3 admin/menu.php:82
111
+ msgid "Constants"
112
+ msgstr ""
113
+
114
+ #: admin/constants.php:3
115
+ msgid "The Codex can help"
116
+ msgstr ""
117
+
118
+ #: admin/constants.php:14 admin/constants.php:30 admin/constants.php:46
119
+ #: admin/constants.php:62 admin/constants.php:78 admin/constants.php:94
120
+ #: admin/constants.php:110 classes/class-email-service.php:60
121
+ msgid "You've set it to: %s"
122
+ msgstr ""
123
+
124
+ #: admin/constants.php:17
125
+ msgid ""
126
+ "The path to folder you would like to store your backup files in, defaults to "
127
+ "%s."
128
+ msgstr ""
129
+
130
+ #: admin/constants.php:17 admin/constants.php:33 admin/constants.php:49
131
+ #: admin/constants.php:65 admin/constants.php:81 admin/constants.php:97
132
+ #: admin/constants.php:113 classes/class-email-service.php:63
133
+ msgid "e.g."
134
+ msgstr ""
135
+
136
+ #: admin/constants.php:33
137
+ msgid ""
138
+ "The path to your %1$s executable. Will be used for the %2$s part of the back "
139
+ "up if available."
140
+ msgstr ""
141
+
142
+ #: admin/constants.php:33 admin/constants.php:49
143
+ msgid "database"
144
+ msgstr ""
145
+
146
+ #: admin/constants.php:49
147
+ msgid ""
148
+ "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s "
149
+ "if available."
150
+ msgstr ""
151
+
152
+ #: admin/constants.php:49
153
+ msgid "files"
154
+ msgstr ""
155
+
156
+ #: admin/constants.php:65
157
+ msgid ""
158
+ "Comma separated list of files or directories to exclude, the backups "
159
+ "directory is automatically excluded."
160
+ msgstr ""
161
+
162
+ #: admin/constants.php:81
163
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
164
+ msgstr ""
165
+
166
+ #: admin/constants.php:97
167
+ msgid "The root directory that is backed up. Defaults to %s."
168
+ msgstr ""
169
+
170
+ #: admin/constants.php:113
171
+ msgid "The time that your schedules should run. Defaults to %s."
172
+ msgstr ""
173
+
174
+ #: admin/enable-support.php:3
175
+ msgid "Enable BackUpWordPress Support"
176
+ msgstr ""
177
+
178
+ #: admin/enable-support.php:5
179
+ msgid ""
180
+ "BackUpWordPress uses %s to provide support. In addition to allowing you to "
181
+ "send and receive messages we also send the following server information "
182
+ "along with your requests:"
183
+ msgstr ""
184
+
185
+ #: admin/enable-support.php:58
186
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
187
+ msgstr ""
188
+
189
+ #: admin/enable-support.php:60
190
+ msgid "No thanks"
191
+ msgstr ""
192
+
193
+ #: admin/enable-support.php:61
194
+ msgid "Yes I want to enable support"
195
+ msgstr ""
196
+
197
+ #: admin/faq.php:2
198
+ msgid "Where does BackUpWordPress store the backup files?"
199
+ msgstr ""
200
+
201
+ #: admin/faq.php:4
202
+ msgid ""
203
+ "Backups are stored on your server in <code>/wp-content/backups</code>, you "
204
+ "can change the directory."
205
+ msgstr ""
206
+
207
+ #: admin/faq.php:6
208
+ msgid ""
209
+ "Important: By default BackUpWordPress backs up everything in your site root "
210
+ "as well as your database, this includes any non WordPress folders that "
211
+ "happen to be in your site root. This does mean that your backup directory "
212
+ "can get quite large."
213
+ msgstr ""
214
+
215
+ #: admin/faq.php:8
216
+ msgid "What if I want to back up my site to another destination?"
217
+ msgstr ""
218
+
219
+ #: admin/faq.php:10
220
+ msgid ""
221
+ "BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, "
222
+ "Azure, DreamObjects and FTP/SFTP. Check it out here: <a href=\"http://bwp."
223
+ "hmn.md/?utm_source=wordpress-org&utm_medium=plugin-"
224
+ "page&utm_campaign=freeplugin\" title=\"BackUpWordPress Homepage\" target="
225
+ "\"_blank\">https://bwp.hmn.md</a>"
226
+ msgstr ""
227
+
228
+ #: admin/faq.php:12
229
+ msgid "How do I restore my site from a backup?"
230
+ msgstr ""
231
+
232
+ #: admin/faq.php:14
233
+ msgid ""
234
+ "You need to download the latest backup file either by clicking download on "
235
+ "the backups page or via <code>FTP</code>. <code>Unzip</code> the files and "
236
+ "upload all the files to your server overwriting your site. You can then "
237
+ "import the database using your hosts database management tool (likely "
238
+ "<code>phpMyAdmin</code>)."
239
+ msgstr ""
240
+
241
+ #: admin/faq.php:16
242
+ msgid ""
243
+ "See this guide for more details - <a href=\"https://bwp.hmn.md/support-"
244
+ "center/restore-backup/\" title=\"Go to support center\" target=\"_blank"
245
+ "\">How to restore from backup</a>."
246
+ msgstr ""
247
+
248
+ #: admin/faq.php:18
249
+ msgid "Does BackUpWordPress back up the backups directory?"
250
+ msgstr ""
251
+
252
+ #: admin/faq.php:20
253
+ msgid "No."
254
+ msgstr ""
255
+
256
+ #: admin/faq.php:22
257
+ msgid "I'm not receiving my backups by email?"
258
+ msgstr ""
259
+
260
+ #: admin/faq.php:24
261
+ msgid ""
262
+ "Most servers have a filesize limit on email attachments, it's generally "
263
+ "about 10mb. If your backup file is over that limit it won't be sent attached "
264
+ "to the email, instead you should receive an email with a link to download "
265
+ "the backup, if you aren't even receiving that then you likely have a mail "
266
+ "issue on your server that you'll need to contact your host about."
267
+ msgstr ""
268
+
269
+ #: admin/faq.php:26
270
+ msgid "How many backups are stored by default?"
271
+ msgstr ""
272
+
273
+ #: admin/faq.php:28
274
+ msgid "BackUpWordPress stores the last 10 backups by default."
275
+ msgstr ""
276
+
277
+ #: admin/faq.php:30
278
+ msgid "How long should a backup take?"
279
+ msgstr ""
280
+
281
+ #: admin/faq.php:32
282
+ msgid ""
283
+ "Unless your site is very large (many gigabytes) it should only take a few "
284
+ "minutes to perform a back up, if your back up has been running for longer "
285
+ "than an hour it's safe to assume that something has gone wrong, try de-"
286
+ "activating and re-activating the plugin, if it keeps happening, contact "
287
+ "support."
288
+ msgstr ""
289
+
290
+ #: admin/faq.php:34
291
+ msgid "What do I do if I get the wp-cron error message?"
292
+ msgstr ""
293
+
294
+ #: admin/faq.php:36
295
+ msgid ""
296
+ "The issue is that your <code>wp-cron.php</code> is not returning a "
297
+ "<code>200</code> response when hit with a HTTP request originating from your "
298
+ "own server, it could be several things, in most cases, it's an issue with "
299
+ "the server / site."
300
+ msgstr ""
301
+
302
+ #: admin/faq.php:38
303
+ msgid "There are some things you can test to confirm this is the issue."
304
+ msgstr ""
305
+
306
+ #: admin/faq.php:40
307
+ msgid "Are scheduled posts working? (They use wp-cron as well ). "
308
+ msgstr ""
309
+
310
+ #: admin/faq.php:42
311
+ msgid ""
312
+ "Are you hosted on Heart Internet? (wp-cron may not be supported by Heart "
313
+ "Internet, see below for work-around)."
314
+ msgstr ""
315
+
316
+ #: admin/faq.php:44
317
+ msgid "If you click manual backup does it work?"
318
+ msgstr ""
319
+
320
+ #: admin/faq.php:46
321
+ msgid ""
322
+ "Try adding <code>define( 'ALTERNATE_WP_CRON', true );</code> to your "
323
+ "<code>wp-config.php</code>, do automatic backups work?"
324
+ msgstr ""
325
+
326
+ #: admin/faq.php:48
327
+ msgid ""
328
+ "Is your site private (I.E. is it behind some kind of authentication, "
329
+ "maintenance plugin, .htaccess) if so wp-cron won't work until you remove it, "
330
+ "if you are and you temporarily remove the authentication, do backups start "
331
+ "working?"
332
+ msgstr ""
333
+
334
+ #: admin/faq.php:50
335
+ msgid ""
336
+ "Report the results to our support team for further help. To do this, either "
337
+ "enable suport from your Admin Dashboard (recommended), or email support@hmn."
338
+ "md"
339
+ msgstr ""
340
+
341
+ #: admin/faq.php:52
342
+ msgid "How to get BackUpWordPress working in Heart Internet"
343
+ msgstr ""
344
+
345
+ #: admin/faq.php:54
346
+ msgid ""
347
+ "The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/"
348
+ "php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the "
349
+ "space between php5 and the location of the file). The file <code>wp-cron."
350
+ "php</code> <code>chmod</code> must be set to <code>711</code>."
351
+ msgstr ""
352
+
353
+ #: admin/faq.php:56
354
+ msgid "My backups seem to be failing?"
355
+ msgstr ""
356
+
357
+ #: admin/faq.php:58
358
+ msgid ""
359
+ "If your backups are failing - it's commonly caused by lack of available "
360
+ "resources on your server. The easiest way to establish this to exclude some "
361
+ "[of] or your entire uploades folder, running a backup an if that succeeds. "
362
+ "If so, we know it's probably a server issue. If not, report the results to "
363
+ "our support team for further help. To do this, either enable suport from "
364
+ "your Admin Dashboard (recommended), or email support@hmn.md"
365
+ msgstr ""
366
+
367
+ #: admin/menu.php:13 admin/menu.php:17
368
+ msgid "Manage Backups"
369
+ msgstr ""
370
+
371
+ #: admin/menu.php:13 admin/menu.php:17 admin/menu.php:46
372
+ msgid "Backups"
373
+ msgstr ""
374
+
375
+ #: admin/menu.php:77
376
+ msgid "FAQ"
377
+ msgstr ""
378
+
379
+ #: admin/menu.php:95
380
+ msgid "Server Info"
381
+ msgstr ""
382
+
383
+ #: admin/menu.php:102
384
+ msgid "For more information:"
385
+ msgstr ""
386
+
387
+ #: admin/menu.php:104
388
+ msgid "Support Forums"
389
+ msgstr ""
390
+
391
+ #: admin/menu.php:105
392
+ msgid "Help with translation"
393
+ msgstr ""
394
+
395
+ #: admin/page.php:7
396
+ msgid ""
397
+ "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin "
398
+ "directory%2$s."
399
+ msgstr ""
400
+
401
+ #: admin/schedule-form-excludes.php:6
402
+ msgid "Currently Excluded"
403
+ msgstr ""
404
+
405
+ #: admin/schedule-form-excludes.php:9
406
+ msgid ""
407
+ "We automatically detect and ignore common <abbr title=\"Version Control "
408
+ "Systems\">VCS</abbr> folders and other backup plugin folders."
409
+ msgstr ""
410
+
411
+ #: admin/schedule-form-excludes.php:44
412
+ msgid "Default rule"
413
+ msgstr ""
414
+
415
+ #: admin/schedule-form-excludes.php:48
416
+ msgid "Defined in wp-config.php"
417
+ msgstr ""
418
+
419
+ #: admin/schedule-form-excludes.php:55
420
+ msgid "Stop excluding"
421
+ msgstr ""
422
+
423
+ #: admin/schedule-form-excludes.php:71
424
+ msgid "Directory Listing"
425
+ msgstr ""
426
+
427
+ #: admin/schedule-form-excludes.php:73
428
+ msgid ""
429
+ "Here's a directory listing of all files on your site, you can browse through "
430
+ "and exclude files or folders that you don't want included in your backup."
431
+ msgstr ""
432
+
433
+ #: admin/schedule-form-excludes.php:104
434
+ msgid "Name"
435
+ msgstr ""
436
+
437
+ #: admin/schedule-form-excludes.php:106
438
+ msgid "Permissions"
439
+ msgstr ""
440
+
441
+ #: admin/schedule-form-excludes.php:108
442
+ msgid "Status"
443
+ msgstr ""
444
+
445
+ #: admin/schedule-form-excludes.php:168 admin/schedule-form-excludes.php:284
446
+ msgid "Refresh"
447
+ msgstr ""
448
+
449
+ #: admin/schedule-form-excludes.php:185 admin/schedule-form-excludes.php:308
450
+ msgid "Symlink"
451
+ msgstr ""
452
+
453
+ #: admin/schedule-form-excludes.php:189 admin/schedule-form-excludes.php:312
454
+ msgid "Folder"
455
+ msgstr ""
456
+
457
+ #: admin/schedule-form-excludes.php:282
458
+ msgid "Recalculate the size of this directory"
459
+ msgstr ""
460
+
461
+ #: admin/schedule-form-excludes.php:316
462
+ msgid "File"
463
+ msgstr ""
464
+
465
+ #: admin/schedule-form-excludes.php:327
466
+ msgid "Unreadable files won't be backed up."
467
+ msgstr ""
468
+
469
+ #: admin/schedule-form-excludes.php:327
470
+ msgid "Unreadable"
471
+ msgstr ""
472
+
473
+ #: admin/schedule-form-excludes.php:331
474
+ msgid "Excluded"
475
+ msgstr ""
476
+
477
+ #: admin/schedule-form-excludes.php:347
478
+ msgid "Exclude &rarr;"
479
+ msgstr ""
480
+
481
+ #: admin/schedule-form-excludes.php:365 admin/schedule-form.php:192
482
+ #: admin/schedule-settings.php:88
483
+ msgid "Done"
484
+ msgstr ""
485
+
486
+ #: admin/schedule-form.php:1 admin/schedule-settings.php:9
487
+ msgid "Settings"
488
+ msgstr ""
489
+
490
+ #: admin/schedule-form.php:36
491
+ msgid "Backup"
492
+ msgstr ""
493
+
494
+ #: admin/schedule-form.php:43
495
+ msgid "Both Database &amp; files"
496
+ msgstr ""
497
+
498
+ #: admin/schedule-form.php:45
499
+ msgid "Files only"
500
+ msgstr ""
501
+
502
+ #: admin/schedule-form.php:47
503
+ msgid "Database only"
504
+ msgstr ""
505
+
506
+ #: admin/schedule-form.php:58
507
+ msgid "Schedule"
508
+ msgstr ""
509
+
510
+ #: admin/schedule-form.php:65
511
+ msgid "Manual Only"
512
+ msgstr ""
513
+
514
+ #: admin/schedule-form.php:92
515
+ msgid "Start Day"
516
+ msgstr ""
517
+
518
+ #: admin/schedule-form.php:100
519
+ msgid "Monday"
520
+ msgstr ""
521
+
522
+ #: admin/schedule-form.php:101
523
+ msgid "Tuesday"
524
+ msgstr ""
525
+
526
+ #: admin/schedule-form.php:102
527
+ msgid "Wednesday"
528
+ msgstr ""
529
+
530
+ #: admin/schedule-form.php:103
531
+ msgid "Thursday"
532
+ msgstr ""
533
+
534
+ #: admin/schedule-form.php:104
535
+ msgid "Friday"
536
+ msgstr ""
537
+
538
+ #: admin/schedule-form.php:105
539
+ msgid "Saturday"
540
+ msgstr ""
541
+
542
+ #: admin/schedule-form.php:106
543
+ msgid "Sunday"
544
+ msgstr ""
545
+
546
+ #: admin/schedule-form.php:124
547
+ msgid "Start Day of Month"
548
+ msgstr ""
549
+
550
+ #: admin/schedule-form.php:136
551
+ msgid "Start Time"
552
+ msgstr ""
553
+
554
+ #: admin/schedule-form.php:145
555
+ msgid "Hours"
556
+ msgstr ""
557
+
558
+ #: admin/schedule-form.php:149
559
+ msgid "Minutes"
560
+ msgstr ""
561
+
562
+ #: admin/schedule-form.php:152
563
+ msgid "Please use 24 hour format for hours"
564
+ msgstr ""
565
+
566
+ #: admin/schedule-form.php:153
567
+ msgid "The second backup will run 12 hours after the first"
568
+ msgstr ""
569
+
570
+ #: admin/schedule-form.php:162
571
+ msgid "Number of backups to store on this server"
572
+ msgstr ""
573
+
574
+ #: admin/schedule-form.php:171
575
+ msgid "Past this limit older backups will be deleted automatically."
576
+ msgstr ""
577
+
578
+ #: admin/schedule-form.php:174
579
+ msgid "This schedule will store a maximum of %s of backups."
580
+ msgstr ""
581
+
582
+ #: admin/schedule-sentence.php:11
583
+ msgid "The next backup will be on %1$s at %2$s %3$s"
584
+ msgstr ""
585
+
586
+ #: admin/schedule-sentence.php:18
587
+ msgid "hourly on the hour"
588
+ msgstr ""
589
+
590
+ #: admin/schedule-sentence.php:18
591
+ msgid "hourly at %s minutes past the hour"
592
+ msgstr ""
593
+
594
+ #: admin/schedule-sentence.php:24
595
+ msgid "daily at %s"
596
+ msgstr ""
597
+
598
+ #: admin/schedule-sentence.php:35
599
+ msgid "every 12 hours at %1$s &amp; %2$s"
600
+ msgstr ""
601
+
602
+ #: admin/schedule-sentence.php:41
603
+ msgid "weekly on %1$s at %2$s"
604
+ msgstr ""
605
+
606
+ #: admin/schedule-sentence.php:47
607
+ msgid "biweekly on %1$s at %2$s"
608
+ msgstr "fortnightly on %1$s at %2$s"
609
+
610
+ #: admin/schedule-sentence.php:53
611
+ msgid "on the %1$s of each month at %2$s"
612
+ msgstr ""
613
+
614
+ #: admin/schedule-sentence.php:59 admin/schedule-sentence.php:65
615
+ msgid "manually"
616
+ msgstr ""
617
+
618
+ #: admin/schedule-sentence.php:70
619
+ msgid "this server"
620
+ msgstr ""
621
+
622
+ #: admin/schedule-sentence.php:78
623
+ msgid "store the most recent backup in %s"
624
+ msgstr ""
625
+
626
+ #: admin/schedule-sentence.php:84
627
+ msgid "don't store any backups in on this server"
628
+ msgstr ""
629
+
630
+ #: admin/schedule-sentence.php:90
631
+ msgid "store the last %1$s backups in %2$s"
632
+ msgstr ""
633
+
634
+ #: admin/schedule-sentence.php:123
635
+ msgid "%s. "
636
+ msgstr ""
637
+
638
+ #: admin/schedule-sentence.php:127
639
+ msgid "Send a copy of each backup to %s."
640
+ msgstr ""
641
+
642
+ #: admin/schedule-sentence.php:158
643
+ msgid "Backups will be compressed and should be smaller than this."
644
+ msgstr ""
645
+
646
+ #: admin/schedule-sentence.php:162
647
+ msgid "this shouldn't take long&hellip;"
648
+ msgstr ""
649
+
650
+ #: admin/schedule-sentence.php:162
651
+ msgid "calculating the size of your backup&hellip;"
652
+ msgstr ""
653
+
654
+ #: admin/schedule-settings.php:7
655
+ msgid "Run now"
656
+ msgstr ""
657
+
658
+ #: admin/schedule-settings.php:15
659
+ msgid "Excludes"
660
+ msgstr ""
661
+
662
+ #: admin/schedule-settings.php:27 functions/interface.php:34
663
+ msgid "Delete"
664
+ msgstr ""
665
+
666
+ #: admin/server-info.php:43
667
+ msgid "%1$s - %2$s"
668
+ msgstr ""
669
+
670
+ #: admin/upsell.php:3
671
+ msgid "Backup to"
672
+ msgstr ""
673
+
674
+ #: admin/upsell.php:18
675
+ msgid ""
676
+ "%1$sor buy the %2$sDeveloper Bundle%3$s now for only &dollar;99 (all "
677
+ "Destinations &amp; Unlimited Sites)%4$s"
678
+ msgstr ""
679
+
680
+ #: backupwordpress.php:53
681
+ msgid ""
682
+ "BackUpWordPress will not work on this site. ( PHP Version %s is unsupported )"
683
+ msgstr ""
684
+
685
+ #: backupwordpress.php:53
686
+ msgid "BackUpWordPress Error"
687
+ msgstr ""
688
+
689
+ #: classes/class-backup.php:388
690
+ msgid "archive filename must be a non empty string"
691
+ msgstr ""
692
+
693
+ #: classes/class-backup.php:392
694
+ msgid "invalid file extension for archive filename <code>%s</code>"
695
+ msgstr ""
696
+
697
+ #: classes/class-backup.php:433
698
+ msgid "database dump filename must be a non empty string"
699
+ msgstr ""
700
+
701
+ #: classes/class-backup.php:437
702
+ msgid "invalid file extension for database dump filename <code>%s</code>"
703
+ msgstr ""
704
+
705
+ #: classes/class-backup.php:471
706
+ msgid "Invalid root path <code>%s</code> must be a valid directory path"
707
+ msgstr ""
708
+
709
+ #: classes/class-backup.php:497
710
+ msgid ""
711
+ "Invalid existing archive filepath <code>%s</code> must be a non empty "
712
+ "(string)"
713
+ msgstr ""
714
+
715
+ #: classes/class-backup.php:552
716
+ msgid ""
717
+ "Invalid backup type <code>%s</code> must be one of (string) file, database "
718
+ "or complete"
719
+ msgstr ""
720
+
721
+ #: classes/class-backup.php:1926
722
+ msgid "Could not connect to mysql"
723
+ msgstr ""
724
+
725
+ #: classes/class-backupwordpress-wp-cli-command.php:50
726
+ msgid "Backup: Dumping database..."
727
+ msgstr ""
728
+
729
+ #: classes/class-backupwordpress-wp-cli-command.php:54
730
+ msgid "Backup: Zipping everything up..."
731
+ msgstr ""
732
+
733
+ #: classes/class-backupwordpress-wp-cli-command.php:70
734
+ msgid "Invalid backup path"
735
+ msgstr ""
736
+
737
+ #: classes/class-backupwordpress-wp-cli-command.php:75
738
+ msgid "Invalid root path"
739
+ msgstr ""
740
+
741
+ #: classes/class-backupwordpress-wp-cli-command.php:106
742
+ msgid "Backup Complete: "
743
+ msgstr ""
744
+
745
+ #: classes/class-backupwordpress-wp-cli-command.php:108
746
+ msgid "Backup Failed"
747
+ msgstr ""
748
+
749
+ #: classes/class-email-service.php:28
750
+ msgid "Email notification"
751
+ msgstr ""
752
+
753
+ #: classes/class-email-service.php:34
754
+ msgid ""
755
+ "Receive a notification email when a backup completes, if the backup is small "
756
+ "enough (&lt; %s) then it will be attached to the email. Separate multiple "
757
+ "email addresses with a comma."
758
+ msgstr ""
759
+
760
+ #: classes/class-email-service.php:63
761
+ msgid ""
762
+ "The maximum filesize of your backup that will be attached to your "
763
+ "notification emails . Defaults to %s."
764
+ msgstr ""
765
+
766
+ #: classes/class-email-service.php:82
767
+ msgid "Send an email notification to %s"
768
+ msgstr ""
769
+
770
+ #: classes/class-email-service.php:117
771
+ msgid "%s isn't a valid email"
772
+ msgstr ""
773
+
774
+ #: classes/class-email-service.php:179 classes/class-webhook-service.php:59
775
+ msgid "Backup of %s Failed"
776
+ msgstr ""
777
+
778
+ #: classes/class-email-service.php:181
779
+ msgid "BackUpWordPress was unable to backup your site %1$s."
780
+ msgstr ""
781
+
782
+ #: classes/class-email-service.php:181
783
+ msgid "Here are the errors that we're encountered:"
784
+ msgstr ""
785
+
786
+ #: classes/class-email-service.php:181
787
+ msgid ""
788
+ "If the errors above look like Martian, forward this email to %3$s and we'll "
789
+ "take a look"
790
+ msgstr ""
791
+
792
+ #: classes/class-email-service.php:181
793
+ msgid ""
794
+ "Kind Regards,\n"
795
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
796
+ msgstr ""
797
+
798
+ #: classes/class-email-service.php:189
799
+ msgid "Backup of %s"
800
+ msgstr ""
801
+
802
+ #: classes/class-email-service.php:194 classes/class-email-service.php:203
803
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
804
+ msgstr ""
805
+
806
+ #: classes/class-email-service.php:194
807
+ msgid "The backup file should be attached to this email."
808
+ msgstr ""
809
+
810
+ #: classes/class-email-service.php:194 classes/class-email-service.php:203
811
+ msgid "You can download the backup file by clicking the link below:"
812
+ msgstr ""
813
+
814
+ #: classes/class-email-service.php:194 classes/class-email-service.php:203
815
+ msgid ""
816
+ "Kind Regards,\n"
817
+ "The Happy BackUpWordPress Backup Emailing Robot"
818
+ msgstr ""
819
+
820
+ #: classes/class-email-service.php:203
821
+ msgid "Unfortunately the backup file was too large to attach to this email."
822
+ msgstr ""
823
+
824
+ #: classes/class-path.php:249
825
+ msgid ""
826
+ "This %s file ensures that other people cannot download your backup files."
827
+ msgstr ""
828
+
829
+ #: classes/class-plugin.php:214
830
+ msgid "Update"
831
+ msgstr ""
832
+
833
+ #: classes/class-plugin.php:215
834
+ msgid "Cancel"
835
+ msgstr ""
836
+
837
+ #: classes/class-plugin.php:216
838
+ msgid ""
839
+ "Are you sure you want to delete this schedule? All of it's backups will also "
840
+ "be deleted."
841
+ msgstr ""
842
+
843
+ #: classes/class-plugin.php:216 classes/class-plugin.php:217
844
+ #: classes/class-plugin.php:218 classes/class-plugin.php:219
845
+ msgid "'Cancel' to go back, 'OK' to delete."
846
+ msgstr ""
847
+
848
+ #: classes/class-plugin.php:217
849
+ msgid "Are you sure you want to delete this backup?"
850
+ msgstr ""
851
+
852
+ #: classes/class-plugin.php:218
853
+ msgid "Are you sure you want to remove this exclude rule?"
854
+ msgstr ""
855
+
856
+ #: classes/class-plugin.php:219
857
+ msgid ""
858
+ "Reducing the number of backups that are stored on this server will cause "
859
+ "some of your existing backups to be deleted, are you sure that's what you "
860
+ "want?"
861
+ msgstr ""
862
+
863
+ #: classes/class-schedule.php:151
864
+ msgid "Invalid Option Name"
865
+ msgstr ""
866
+
867
+ #: classes/class-schedule.php:264
868
+ msgid "Argument 1 for %s must be a valid integer"
869
+ msgstr ""
870
+
871
+ #: classes/class-schedule.php:612
872
+ msgid "Argument 1 for %s must be a valid future timestamp"
873
+ msgstr ""
874
+
875
+ #: classes/class-schedule.php:649
876
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
877
+ msgstr ""
878
+
879
+ #: classes/class-schedule.php:778 functions/interface.php:267
880
+ msgid "Starting Backup"
881
+ msgstr ""
882
+
883
+ #: classes/class-schedule.php:865
884
+ msgid "Error writing to file. (%s)"
885
+ msgstr ""
886
+
887
+ #: classes/class-schedule.php:916
888
+ msgid "Dumping Database %s"
889
+ msgstr ""
890
+
891
+ #: classes/class-schedule.php:921
892
+ msgid "Verifying Database Dump %s"
893
+ msgstr ""
894
+
895
+ #: classes/class-schedule.php:926
896
+ msgid "Creating zip archive %s"
897
+ msgstr ""
898
+
899
+ #: classes/class-schedule.php:931
900
+ msgid "Verifying Zip Archive %s"
901
+ msgstr ""
902
+
903
+ #: classes/class-schedule.php:936
904
+ msgid "Finishing Backup"
905
+ msgstr ""
906
+
907
+ #: classes/class-schedule.php:987
908
+ msgid "An unexpected error occured"
909
+ msgstr ""
910
+
911
+ #. translators: min=minute
912
+ #: classes/class-schedule.php:1050
913
+ msgid "%s min"
914
+ msgid_plural "%s mins"
915
+ msgstr[0] ""
916
+ msgstr[1] ""
917
+
918
+ #: classes/class-schedule.php:1060
919
+ msgid "%s hour"
920
+ msgid_plural "%s hours"
921
+ msgstr[0] ""
922
+ msgstr[1] ""
923
+
924
+ #: classes/class-schedule.php:1122
925
+ msgid "Argument 1 for %s must be a non empty string"
926
+ msgstr ""
927
+
928
+ #: classes/class-schedule.php:1127
929
+ msgid "%s doesn't exist"
930
+ msgstr ""
931
+
932
+ #: classes/class-schedule.php:1132
933
+ msgid "That backup wasn't created by this schedule"
934
+ msgstr ""
935
+
936
+ #: classes/class-services.php:80
937
+ msgid "Argument 1 for %s must be a valid filepath"
938
+ msgstr ""
939
+
940
+ #: classes/class-services.php:96
941
+ msgid "Argument 1 for %s must be a registered service"
942
+ msgstr ""
943
+
944
+ #: classes/class-services.php:114 classes/deprecated.php:81
945
+ msgid "Argument 1 for %s must be a valid class"
946
+ msgstr ""
947
+
948
+ #: classes/class-setup.php:34
949
+ msgid "BackUpWordPress"
950
+ msgstr ""
951
+
952
+ #: classes/class-setup.php:170
953
+ msgid ""
954
+ "BackUpWordPress requires PHP version %1$s or later and WordPress version "
955
+ "%2$s or later to run. It has not been activated. %3$s%4$s%5$sLearn more%6$s"
956
+ msgstr ""
957
+
958
+ #: classes/class-webhook-service.php:103
959
+ msgid "Error: %s"
960
+ msgstr ""
961
+
962
+ #: functions/core.php:326
963
+ msgid "BackUpWordPress has setup your default schedules."
964
+ msgstr ""
965
+
966
+ #: functions/core.php:326
967
+ msgid ""
968
+ "By default BackUpWordPress performs a daily backup of your database and a "
969
+ "weekly backup of your database &amp; files. You can modify these schedules."
970
+ msgstr ""
971
+
972
+ #: functions/core.php:341
973
+ msgid "Once Hourly"
974
+ msgstr ""
975
+
976
+ #: functions/core.php:342
977
+ msgid "Twice Daily"
978
+ msgstr ""
979
+
980
+ #: functions/core.php:343
981
+ msgid "Once Daily"
982
+ msgstr ""
983
+
984
+ #: functions/core.php:344
985
+ msgid "Once Weekly"
986
+ msgstr ""
987
+
988
+ #: functions/core.php:345
989
+ msgid "Once Biweekly"
990
+ msgstr "Once Fortnightly"
991
+
992
+ #: functions/core.php:346
993
+ msgid "Once Monthly"
994
+ msgstr ""
995
+
996
+ #: functions/core.php:364
997
+ msgid "You can only delete directories inside your WordPress installation"
998
+ msgstr ""
999
+
1000
+ #: functions/interface.php:31
1001
+ msgid "Download"
1002
+ msgstr ""
1003
+
1004
+ #: functions/interface.php:68
1005
+ msgid "BackUpWordPress detected issues with your last backup."
1006
+ msgstr ""
1007
+
1008
+ #: functions/interface.php:70
1009
+ msgid "Dismiss"
1010
+ msgstr ""
1011
+
1012
+ #: functions/interface.php:136
1013
+ msgid ""
1014
+ "The backups directory can't be created because your %1$s directory isn't "
1015
+ "writable, run %2$s or %3$s or create the folder yourself."
1016
+ msgstr ""
1017
+
1018
+ #: functions/interface.php:140
1019
+ msgid ""
1020
+ "Your backups directory isn't writable, run %1$s or %2$s or set the "
1021
+ "permissions yourself."
1022
+ msgstr ""
1023
+
1024
+ #: functions/interface.php:144
1025
+ msgid ""
1026
+ "%1$s is running in %2$s, please contact your host and ask them to disable "
1027
+ "it. BackUpWordPress may not work correctly whilst %3$s is on."
1028
+ msgstr ""
1029
+
1030
+ #: functions/interface.php:144
1031
+ msgid "http://php.net/manual/en/features.safe-mode.php"
1032
+ msgstr ""
1033
+
1034
+ #: functions/interface.php:144
1035
+ msgid "Safe Mode"
1036
+ msgstr ""
1037
+
1038
+ #: functions/interface.php:152
1039
+ msgid "Your custom path does not exist"
1040
+ msgstr ""
1041
+
1042
+ #: functions/interface.php:156
1043
+ msgid ""
1044
+ "Your custom path is unreachable due to a restriction set in your PHP "
1045
+ "configuration (open_basedir)"
1046
+ msgstr ""
1047
+
1048
+ #: functions/interface.php:161
1049
+ msgid ""
1050
+ "Your custom backups directory %1$s doesn't exist and can't be created, your "
1051
+ "backups will be saved to %2$s instead."
1052
+ msgstr ""
1053
+
1054
+ #: functions/interface.php:165
1055
+ msgid ""
1056
+ "Your custom backups directory %1$s isn't writable, new backups will be saved "
1057
+ "to %2$s instead."
1058
+ msgstr ""
1059
+
1060
+ #: functions/interface.php:174
1061
+ msgid "Your site root path %s isn't readable."
1062
+ msgstr ""
1063
+
1064
+ #: functions/interface.php:236
1065
+ msgid "Database and Files"
1066
+ msgstr ""
1067
+
1068
+ #: functions/interface.php:240
1069
+ msgid "Files"
1070
+ msgstr ""
1071
+
1072
+ #: functions/interface.php:244
1073
+ msgid "Database"
1074
+ msgstr ""
1075
+
1076
+ #: functions/interface.php:251
1077
+ msgid "Legacy"
1078
+ msgstr ""
1079
+
1080
+ #: functions/interface.php:266
1081
+ msgid "Started %s ago"
1082
+ msgstr ""
1083
+
1084
+ #: functions/interface.php:268
1085
+ msgid "cancel"
1086
+ msgstr ""
1087
+
1088
+ #: functions/interface.php:316
1089
+ msgid "No backups completed"
1090
+ msgstr ""
1091
+
1092
+ #: functions/interface.php:327
1093
+ msgid "Complete Hourly"
1094
+ msgstr ""
1095
+
1096
+ #: functions/interface.php:328
1097
+ msgid "File Hourly"
1098
+ msgstr ""
1099
+
1100
+ #: functions/interface.php:329
1101
+ msgid "Database Hourly"
1102
+ msgstr ""
1103
+
1104
+ #: functions/interface.php:330
1105
+ msgid "Complete Twicedaily"
1106
+ msgstr ""
1107
+
1108
+ #: functions/interface.php:331
1109
+ msgid "File Twicedaily"
1110
+ msgstr ""
1111
+
1112
+ #: functions/interface.php:332
1113
+ msgid "Database Twicedaily"
1114
+ msgstr ""
1115
+
1116
+ #: functions/interface.php:333
1117
+ msgid "Complete Daily"
1118
+ msgstr ""
1119
+
1120
+ #: functions/interface.php:334
1121
+ msgid "File Daily"
1122
+ msgstr ""
1123
+
1124
+ #: functions/interface.php:335
1125
+ msgid "Database Daily"
1126
+ msgstr ""
1127
+
1128
+ #: functions/interface.php:336
1129
+ msgid "Complete Weekly"
1130
+ msgstr ""
1131
+
1132
+ #: functions/interface.php:337
1133
+ msgid "File Weekly"
1134
+ msgstr ""
1135
+
1136
+ #: functions/interface.php:338
1137
+ msgid "Database Weekly"
1138
+ msgstr ""
1139
+
1140
+ #: functions/interface.php:339
1141
+ msgid "Complete Biweekly"
1142
+ msgstr "Complete Fortnightly"
1143
+
1144
+ #: functions/interface.php:340
1145
+ msgid "File Biweekly"
1146
+ msgstr "File Fortnightly"
1147
+
1148
+ #: functions/interface.php:341
1149
+ msgid "Database Biweekly"
1150
+ msgstr "Database Fortnightly"
1151
+
1152
+ #: functions/interface.php:342
1153
+ msgid "Complete Monthly"
1154
+ msgstr ""
1155
+
1156
+ #: functions/interface.php:343
1157
+ msgid "File Monthly"
1158
+ msgstr ""
1159
+
1160
+ #: functions/interface.php:344
1161
+ msgid "Database Monthly"
1162
+ msgstr ""
1163
+
1164
+ #: functions/interface.php:345
1165
+ msgid "Complete Manually"
1166
+ msgstr ""
1167
+
1168
+ #: functions/interface.php:346
1169
+ msgid "File Manually"
1170
+ msgstr ""
1171
+
1172
+ #: functions/interface.php:347
1173
+ msgid "Database Manually"
1174
+ msgstr ""
1175
+
1176
+ #. Plugin Name of the plugin/theme
1177
+ msgid "BackUpWordPress Backup Plugin"
1178
+ msgstr ""
1179
+
1180
+ #. Plugin URI of the plugin/theme
1181
+ msgid "http://bwp.hmn.md/"
1182
+ msgstr ""
1183
+
1184
+ #. Description of the plugin/theme
1185
+ msgid ""
1186
+ "Simple automated backups of your WordPress powered website. Once activated "
1187
+ "you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, "
1188
+ "you'll find me under the Network Settings menu."
1189
+ msgstr ""
1190
+
1191
+ #. Author of the plugin/theme
1192
+ msgid "Human Made Limited"
1193
+ msgstr ""
1194
+
1195
+ #. Author URI of the plugin/theme
1196
+ msgid "http://hmn.md/"
1197
+ msgstr ""
1198
+
1199
+ #: admin/schedule-sentence.php:120
1200
+ msgctxt ""
1201
+ "1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to "
1202
+ "store"
1203
+ msgid "Backup my %1$s %2$s %3$s, %4$s."
1204
+ msgstr ""
1205
+
1206
+ #: functions/interface.php:318
1207
+ msgctxt "backups count"
1208
+ msgid "One backup completed"
1209
+ msgid_plural "%1$s backups completed"
1210
+ msgstr[0] ""
1211
+ msgstr[1] ""
languages/backupwordpress-en_GB.po CHANGED
@@ -1,1211 +1,1211 @@
1
- # Copyright (C) 2015 Human Made Limited
2
- # This file is distributed under the GPL-2.0+.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: BackUpWordPress Backup Plugin 3.2.6\n"
6
- "POT-Creation-Date: 2015-07-13 12:44+0930\n"
7
- "MIME-Version: 1.0\n"
8
- "Content-Type: text/plain; charset=UTF-8\n"
9
- "Content-Transfer-Encoding: 8bit\n"
10
- "PO-Revision-Date: 2015-07-13 13:39+0930\n"
11
- "Last-Translator: ucavus\n"
12
- "Language-Team: ucavus\n"
13
- "X-Generator: Poedit 1.8.2\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "Language: en_GB\n"
16
-
17
- #: admin/actions.php:191
18
- msgid "The schedule ID was not provided. Aborting."
19
- msgstr ""
20
-
21
- #: admin/actions.php:241
22
- msgid "Backup type cannot be empty"
23
- msgstr ""
24
-
25
- #: admin/actions.php:245
26
- msgid "Invalid backup type"
27
- msgstr ""
28
-
29
- #: admin/actions.php:259
30
- msgid "Schedule cannot be empty"
31
- msgstr ""
32
-
33
- #: admin/actions.php:263
34
- msgid "Invalid schedule"
35
- msgstr ""
36
-
37
- #: admin/actions.php:277
38
- msgid "Day of the week must be a valid lowercase day name"
39
- msgstr ""
40
-
41
- #: admin/actions.php:296
42
- msgid "Day of month must be between 1 and 31"
43
- msgstr ""
44
-
45
- #: admin/actions.php:315
46
- msgid "Hours must be between 0 and 23"
47
- msgstr ""
48
-
49
- #: admin/actions.php:334
50
- msgid "Minutes must be between 0 and 59"
51
- msgstr ""
52
-
53
- #: admin/actions.php:348
54
- msgid "Max backups can't be empty"
55
- msgstr ""
56
-
57
- #: admin/actions.php:352
58
- msgid "Max backups must be a number"
59
- msgstr ""
60
-
61
- #: admin/actions.php:356
62
- msgid "Max backups must be greater than 0"
63
- msgstr ""
64
-
65
- #: admin/actions.php:708 admin/actions.php:714
66
- msgid "BackUpWordPress has detected a problem."
67
- msgstr ""
68
-
69
- #: admin/actions.php:708 admin/actions.php:714
70
- msgid ""
71
- "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
72
- "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
73
- "See the %3$s for more details."
74
- msgstr ""
75
-
76
- #: admin/backups-table.php:8 admin/schedule-form-excludes.php:105
77
- msgid "Size"
78
- msgstr ""
79
-
80
- #: admin/backups-table.php:9 admin/schedule-form-excludes.php:107
81
- msgid "Type"
82
- msgstr ""
83
-
84
- #: admin/backups-table.php:10
85
- msgid "Actions"
86
- msgstr ""
87
-
88
- #: admin/backups-table.php:35
89
- msgid "This is where your backups will appear once you have some."
90
- msgstr ""
91
-
92
- #: admin/backups.php:22
93
- msgid "add schedule"
94
- msgstr ""
95
-
96
- #: admin/backups.php:26
97
- msgid "Support"
98
- msgstr ""
99
-
100
- #: admin/backups.php:32
101
- msgid "Enable Support"
102
- msgstr ""
103
-
104
- #: admin/constants.php:3
105
- msgid ""
106
- "You can %1$s any of the following %2$s in your %3$s to control advanced "
107
- "settings. %4$s. Defined %5$s will be highlighted."
108
- msgstr ""
109
-
110
- #: admin/constants.php:3 admin/menu.php:82
111
- msgid "Constants"
112
- msgstr ""
113
-
114
- #: admin/constants.php:3
115
- msgid "The Codex can help"
116
- msgstr ""
117
-
118
- #: admin/constants.php:14 admin/constants.php:30 admin/constants.php:46
119
- #: admin/constants.php:62 admin/constants.php:78 admin/constants.php:94
120
- #: admin/constants.php:110 classes/class-email-service.php:60
121
- msgid "You've set it to: %s"
122
- msgstr ""
123
-
124
- #: admin/constants.php:17
125
- msgid ""
126
- "The path to folder you would like to store your backup files in, defaults to "
127
- "%s."
128
- msgstr ""
129
-
130
- #: admin/constants.php:17 admin/constants.php:33 admin/constants.php:49
131
- #: admin/constants.php:65 admin/constants.php:81 admin/constants.php:97
132
- #: admin/constants.php:113 classes/class-email-service.php:63
133
- msgid "e.g."
134
- msgstr ""
135
-
136
- #: admin/constants.php:33
137
- msgid ""
138
- "The path to your %1$s executable. Will be used for the %2$s part of the back "
139
- "up if available."
140
- msgstr ""
141
-
142
- #: admin/constants.php:33 admin/constants.php:49
143
- msgid "database"
144
- msgstr ""
145
-
146
- #: admin/constants.php:49
147
- msgid ""
148
- "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s "
149
- "if available."
150
- msgstr ""
151
-
152
- #: admin/constants.php:49
153
- msgid "files"
154
- msgstr ""
155
-
156
- #: admin/constants.php:65
157
- msgid ""
158
- "Comma separated list of files or directories to exclude, the backups "
159
- "directory is automatically excluded."
160
- msgstr ""
161
-
162
- #: admin/constants.php:81
163
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
164
- msgstr ""
165
-
166
- #: admin/constants.php:97
167
- msgid "The root directory that is backed up. Defaults to %s."
168
- msgstr ""
169
-
170
- #: admin/constants.php:113
171
- msgid "The time that your schedules should run. Defaults to %s."
172
- msgstr ""
173
-
174
- #: admin/enable-support.php:3
175
- msgid "Enable BackUpWordPress Support"
176
- msgstr ""
177
-
178
- #: admin/enable-support.php:5
179
- msgid ""
180
- "BackUpWordPress uses %s to provide support. In addition to allowing you to "
181
- "send and receive messages we also send the following server information "
182
- "along with your requests:"
183
- msgstr ""
184
-
185
- #: admin/enable-support.php:58
186
- msgid "You can disable support in the future by deactivating BackUpWordPress."
187
- msgstr ""
188
-
189
- #: admin/enable-support.php:60
190
- msgid "No thanks"
191
- msgstr ""
192
-
193
- #: admin/enable-support.php:61
194
- msgid "Yes I want to enable support"
195
- msgstr ""
196
-
197
- #: admin/faq.php:2
198
- msgid "Where does BackUpWordPress store the backup files?"
199
- msgstr ""
200
-
201
- #: admin/faq.php:4
202
- msgid ""
203
- "Backups are stored on your server in <code>/wp-content/backups</code>, you "
204
- "can change the directory."
205
- msgstr ""
206
-
207
- #: admin/faq.php:6
208
- msgid ""
209
- "Important: By default BackUpWordPress backs up everything in your site root "
210
- "as well as your database, this includes any non WordPress folders that "
211
- "happen to be in your site root. This does mean that your backup directory "
212
- "can get quite large."
213
- msgstr ""
214
-
215
- #: admin/faq.php:8
216
- msgid "What if I want to back up my site to another destination?"
217
- msgstr ""
218
-
219
- #: admin/faq.php:10
220
- msgid ""
221
- "BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, "
222
- "Azure, DreamObjects and FTP/SFTP. Check it out here: <a href=\"http://bwp."
223
- "hmn.md/?utm_source=wordpress-org&utm_medium=plugin-"
224
- "page&utm_campaign=freeplugin\" title=\"BackUpWordPress Homepage\" target="
225
- "\"_blank\">https://bwp.hmn.md</a>"
226
- msgstr ""
227
-
228
- #: admin/faq.php:12
229
- msgid "How do I restore my site from a backup?"
230
- msgstr ""
231
-
232
- #: admin/faq.php:14
233
- msgid ""
234
- "You need to download the latest backup file either by clicking download on "
235
- "the backups page or via <code>FTP</code>. <code>Unzip</code> the files and "
236
- "upload all the files to your server overwriting your site. You can then "
237
- "import the database using your hosts database management tool (likely "
238
- "<code>phpMyAdmin</code>)."
239
- msgstr ""
240
-
241
- #: admin/faq.php:16
242
- msgid ""
243
- "See this guide for more details - <a href=\"https://bwp.hmn.md/support-"
244
- "center/restore-backup/\" title=\"Go to support center\" target=\"_blank"
245
- "\">How to restore from backup</a>."
246
- msgstr ""
247
-
248
- #: admin/faq.php:18
249
- msgid "Does BackUpWordPress back up the backups directory?"
250
- msgstr ""
251
-
252
- #: admin/faq.php:20
253
- msgid "No."
254
- msgstr ""
255
-
256
- #: admin/faq.php:22
257
- msgid "I'm not receiving my backups by email?"
258
- msgstr ""
259
-
260
- #: admin/faq.php:24
261
- msgid ""
262
- "Most servers have a filesize limit on email attachments, it's generally "
263
- "about 10mb. If your backup file is over that limit it won't be sent attached "
264
- "to the email, instead you should receive an email with a link to download "
265
- "the backup, if you aren't even receiving that then you likely have a mail "
266
- "issue on your server that you'll need to contact your host about."
267
- msgstr ""
268
-
269
- #: admin/faq.php:26
270
- msgid "How many backups are stored by default?"
271
- msgstr ""
272
-
273
- #: admin/faq.php:28
274
- msgid "BackUpWordPress stores the last 10 backups by default."
275
- msgstr ""
276
-
277
- #: admin/faq.php:30
278
- msgid "How long should a backup take?"
279
- msgstr ""
280
-
281
- #: admin/faq.php:32
282
- msgid ""
283
- "Unless your site is very large (many gigabytes) it should only take a few "
284
- "minutes to perform a back up, if your back up has been running for longer "
285
- "than an hour it's safe to assume that something has gone wrong, try de-"
286
- "activating and re-activating the plugin, if it keeps happening, contact "
287
- "support."
288
- msgstr ""
289
-
290
- #: admin/faq.php:34
291
- msgid "What do I do if I get the wp-cron error message?"
292
- msgstr ""
293
-
294
- #: admin/faq.php:36
295
- msgid ""
296
- "The issue is that your <code>wp-cron.php</code> is not returning a "
297
- "<code>200</code> response when hit with a HTTP request originating from your "
298
- "own server, it could be several things, in most cases, it's an issue with "
299
- "the server / site."
300
- msgstr ""
301
-
302
- #: admin/faq.php:38
303
- msgid "There are some things you can test to confirm this is the issue."
304
- msgstr ""
305
-
306
- #: admin/faq.php:40
307
- msgid "Are scheduled posts working? (They use wp-cron as well ). "
308
- msgstr ""
309
-
310
- #: admin/faq.php:42
311
- msgid ""
312
- "Are you hosted on Heart Internet? (wp-cron may not be supported by Heart "
313
- "Internet, see below for work-around)."
314
- msgstr ""
315
-
316
- #: admin/faq.php:44
317
- msgid "If you click manual backup does it work?"
318
- msgstr ""
319
-
320
- #: admin/faq.php:46
321
- msgid ""
322
- "Try adding <code>define( 'ALTERNATE_WP_CRON', true );</code> to your "
323
- "<code>wp-config.php</code>, do automatic backups work?"
324
- msgstr ""
325
-
326
- #: admin/faq.php:48
327
- msgid ""
328
- "Is your site private (I.E. is it behind some kind of authentication, "
329
- "maintenance plugin, .htaccess) if so wp-cron won't work until you remove it, "
330
- "if you are and you temporarily remove the authentication, do backups start "
331
- "working?"
332
- msgstr ""
333
-
334
- #: admin/faq.php:50
335
- msgid ""
336
- "Report the results to our support team for further help. To do this, either "
337
- "enable suport from your Admin Dashboard (recommended), or email support@hmn."
338
- "md"
339
- msgstr ""
340
-
341
- #: admin/faq.php:52
342
- msgid "How to get BackUpWordPress working in Heart Internet"
343
- msgstr ""
344
-
345
- #: admin/faq.php:54
346
- msgid ""
347
- "The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/"
348
- "php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the "
349
- "space between php5 and the location of the file). The file <code>wp-cron."
350
- "php</code> <code>chmod</code> must be set to <code>711</code>."
351
- msgstr ""
352
-
353
- #: admin/faq.php:56
354
- msgid "My backups seem to be failing?"
355
- msgstr ""
356
-
357
- #: admin/faq.php:58
358
- msgid ""
359
- "If your backups are failing - it's commonly caused by lack of available "
360
- "resources on your server. The easiest way to establish this to exclude some "
361
- "[of] or your entire uploades folder, running a backup an if that succeeds. "
362
- "If so, we know it's probably a server issue. If not, report the results to "
363
- "our support team for further help. To do this, either enable suport from "
364
- "your Admin Dashboard (recommended), or email support@hmn.md"
365
- msgstr ""
366
-
367
- #: admin/menu.php:13 admin/menu.php:17
368
- msgid "Manage Backups"
369
- msgstr ""
370
-
371
- #: admin/menu.php:13 admin/menu.php:17 admin/menu.php:46
372
- msgid "Backups"
373
- msgstr ""
374
-
375
- #: admin/menu.php:77
376
- msgid "FAQ"
377
- msgstr ""
378
-
379
- #: admin/menu.php:95
380
- msgid "Server Info"
381
- msgstr ""
382
-
383
- #: admin/menu.php:102
384
- msgid "For more information:"
385
- msgstr ""
386
-
387
- #: admin/menu.php:104
388
- msgid "Support Forums"
389
- msgstr ""
390
-
391
- #: admin/menu.php:105
392
- msgid "Help with translation"
393
- msgstr ""
394
-
395
- #: admin/page.php:7
396
- msgid ""
397
- "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin "
398
- "directory%2$s."
399
- msgstr ""
400
-
401
- #: admin/schedule-form-excludes.php:6
402
- msgid "Currently Excluded"
403
- msgstr ""
404
-
405
- #: admin/schedule-form-excludes.php:9
406
- msgid ""
407
- "We automatically detect and ignore common <abbr title=\"Version Control "
408
- "Systems\">VCS</abbr> folders and other backup plugin folders."
409
- msgstr ""
410
-
411
- #: admin/schedule-form-excludes.php:44
412
- msgid "Default rule"
413
- msgstr ""
414
-
415
- #: admin/schedule-form-excludes.php:48
416
- msgid "Defined in wp-config.php"
417
- msgstr ""
418
-
419
- #: admin/schedule-form-excludes.php:55
420
- msgid "Stop excluding"
421
- msgstr ""
422
-
423
- #: admin/schedule-form-excludes.php:71
424
- msgid "Directory Listing"
425
- msgstr ""
426
-
427
- #: admin/schedule-form-excludes.php:73
428
- msgid ""
429
- "Here's a directory listing of all files on your site, you can browse through "
430
- "and exclude files or folders that you don't want included in your backup."
431
- msgstr ""
432
-
433
- #: admin/schedule-form-excludes.php:104
434
- msgid "Name"
435
- msgstr ""
436
-
437
- #: admin/schedule-form-excludes.php:106
438
- msgid "Permissions"
439
- msgstr ""
440
-
441
- #: admin/schedule-form-excludes.php:108
442
- msgid "Status"
443
- msgstr ""
444
-
445
- #: admin/schedule-form-excludes.php:168 admin/schedule-form-excludes.php:284
446
- msgid "Refresh"
447
- msgstr ""
448
-
449
- #: admin/schedule-form-excludes.php:185 admin/schedule-form-excludes.php:308
450
- msgid "Symlink"
451
- msgstr ""
452
-
453
- #: admin/schedule-form-excludes.php:189 admin/schedule-form-excludes.php:312
454
- msgid "Folder"
455
- msgstr ""
456
-
457
- #: admin/schedule-form-excludes.php:282
458
- msgid "Recalculate the size of this directory"
459
- msgstr ""
460
-
461
- #: admin/schedule-form-excludes.php:316
462
- msgid "File"
463
- msgstr ""
464
-
465
- #: admin/schedule-form-excludes.php:327
466
- msgid "Unreadable files won't be backed up."
467
- msgstr ""
468
-
469
- #: admin/schedule-form-excludes.php:327
470
- msgid "Unreadable"
471
- msgstr ""
472
-
473
- #: admin/schedule-form-excludes.php:331
474
- msgid "Excluded"
475
- msgstr ""
476
-
477
- #: admin/schedule-form-excludes.php:347
478
- msgid "Exclude &rarr;"
479
- msgstr ""
480
-
481
- #: admin/schedule-form-excludes.php:365 admin/schedule-form.php:192
482
- #: admin/schedule-settings.php:88
483
- msgid "Done"
484
- msgstr ""
485
-
486
- #: admin/schedule-form.php:1 admin/schedule-settings.php:9
487
- msgid "Settings"
488
- msgstr ""
489
-
490
- #: admin/schedule-form.php:36
491
- msgid "Backup"
492
- msgstr ""
493
-
494
- #: admin/schedule-form.php:43
495
- msgid "Both Database &amp; files"
496
- msgstr ""
497
-
498
- #: admin/schedule-form.php:45
499
- msgid "Files only"
500
- msgstr ""
501
-
502
- #: admin/schedule-form.php:47
503
- msgid "Database only"
504
- msgstr ""
505
-
506
- #: admin/schedule-form.php:58
507
- msgid "Schedule"
508
- msgstr ""
509
-
510
- #: admin/schedule-form.php:65
511
- msgid "Manual Only"
512
- msgstr ""
513
-
514
- #: admin/schedule-form.php:92
515
- msgid "Start Day"
516
- msgstr ""
517
-
518
- #: admin/schedule-form.php:100
519
- msgid "Monday"
520
- msgstr ""
521
-
522
- #: admin/schedule-form.php:101
523
- msgid "Tuesday"
524
- msgstr ""
525
-
526
- #: admin/schedule-form.php:102
527
- msgid "Wednesday"
528
- msgstr ""
529
-
530
- #: admin/schedule-form.php:103
531
- msgid "Thursday"
532
- msgstr ""
533
-
534
- #: admin/schedule-form.php:104
535
- msgid "Friday"
536
- msgstr ""
537
-
538
- #: admin/schedule-form.php:105
539
- msgid "Saturday"
540
- msgstr ""
541
-
542
- #: admin/schedule-form.php:106
543
- msgid "Sunday"
544
- msgstr ""
545
-
546
- #: admin/schedule-form.php:124
547
- msgid "Start Day of Month"
548
- msgstr ""
549
-
550
- #: admin/schedule-form.php:136
551
- msgid "Start Time"
552
- msgstr ""
553
-
554
- #: admin/schedule-form.php:145
555
- msgid "Hours"
556
- msgstr ""
557
-
558
- #: admin/schedule-form.php:149
559
- msgid "Minutes"
560
- msgstr ""
561
-
562
- #: admin/schedule-form.php:152
563
- msgid "Please use 24 hour format for hours"
564
- msgstr ""
565
-
566
- #: admin/schedule-form.php:153
567
- msgid "The second backup will run 12 hours after the first"
568
- msgstr ""
569
-
570
- #: admin/schedule-form.php:162
571
- msgid "Number of backups to store on this server"
572
- msgstr ""
573
-
574
- #: admin/schedule-form.php:171
575
- msgid "Past this limit older backups will be deleted automatically."
576
- msgstr ""
577
-
578
- #: admin/schedule-form.php:174
579
- msgid "This schedule will store a maximum of %s of backups."
580
- msgstr ""
581
-
582
- #: admin/schedule-sentence.php:11
583
- msgid "The next backup will be on %1$s at %2$s %3$s"
584
- msgstr ""
585
-
586
- #: admin/schedule-sentence.php:18
587
- msgid "hourly on the hour"
588
- msgstr ""
589
-
590
- #: admin/schedule-sentence.php:18
591
- msgid "hourly at %s minutes past the hour"
592
- msgstr ""
593
-
594
- #: admin/schedule-sentence.php:24
595
- msgid "daily at %s"
596
- msgstr ""
597
-
598
- #: admin/schedule-sentence.php:35
599
- msgid "every 12 hours at %1$s &amp; %2$s"
600
- msgstr ""
601
-
602
- #: admin/schedule-sentence.php:41
603
- msgid "weekly on %1$s at %2$s"
604
- msgstr ""
605
-
606
- #: admin/schedule-sentence.php:47
607
- msgid "biweekly on %1$s at %2$s"
608
- msgstr "fortnightly on %1$s at %2$s"
609
-
610
- #: admin/schedule-sentence.php:53
611
- msgid "on the %1$s of each month at %2$s"
612
- msgstr ""
613
-
614
- #: admin/schedule-sentence.php:59 admin/schedule-sentence.php:65
615
- msgid "manually"
616
- msgstr ""
617
-
618
- #: admin/schedule-sentence.php:70
619
- msgid "this server"
620
- msgstr ""
621
-
622
- #: admin/schedule-sentence.php:78
623
- msgid "store the most recent backup in %s"
624
- msgstr ""
625
-
626
- #: admin/schedule-sentence.php:84
627
- msgid "don't store any backups in on this server"
628
- msgstr ""
629
-
630
- #: admin/schedule-sentence.php:90
631
- msgid "store the last %1$s backups in %2$s"
632
- msgstr ""
633
-
634
- #: admin/schedule-sentence.php:123
635
- msgid "%s. "
636
- msgstr ""
637
-
638
- #: admin/schedule-sentence.php:127
639
- msgid "Send a copy of each backup to %s."
640
- msgstr ""
641
-
642
- #: admin/schedule-sentence.php:158
643
- msgid "Backups will be compressed and should be smaller than this."
644
- msgstr ""
645
-
646
- #: admin/schedule-sentence.php:162
647
- msgid "this shouldn't take long&hellip;"
648
- msgstr ""
649
-
650
- #: admin/schedule-sentence.php:162
651
- msgid "calculating the size of your backup&hellip;"
652
- msgstr ""
653
-
654
- #: admin/schedule-settings.php:7
655
- msgid "Run now"
656
- msgstr ""
657
-
658
- #: admin/schedule-settings.php:15
659
- msgid "Excludes"
660
- msgstr ""
661
-
662
- #: admin/schedule-settings.php:27 functions/interface.php:34
663
- msgid "Delete"
664
- msgstr ""
665
-
666
- #: admin/server-info.php:43
667
- msgid "%1$s - %2$s"
668
- msgstr ""
669
-
670
- #: admin/upsell.php:3
671
- msgid "Backup to"
672
- msgstr ""
673
-
674
- #: admin/upsell.php:18
675
- msgid ""
676
- "%1$sor buy the %2$sDeveloper Bundle%3$s now for only &dollar;99 (all "
677
- "Destinations &amp; Unlimited Sites)%4$s"
678
- msgstr ""
679
-
680
- #: backupwordpress.php:53
681
- msgid ""
682
- "BackUpWordPress will not work on this site. ( PHP Version %s is unsupported )"
683
- msgstr ""
684
-
685
- #: backupwordpress.php:53
686
- msgid "BackUpWordPress Error"
687
- msgstr ""
688
-
689
- #: classes/class-backup.php:388
690
- msgid "archive filename must be a non empty string"
691
- msgstr ""
692
-
693
- #: classes/class-backup.php:392
694
- msgid "invalid file extension for archive filename <code>%s</code>"
695
- msgstr ""
696
-
697
- #: classes/class-backup.php:433
698
- msgid "database dump filename must be a non empty string"
699
- msgstr ""
700
-
701
- #: classes/class-backup.php:437
702
- msgid "invalid file extension for database dump filename <code>%s</code>"
703
- msgstr ""
704
-
705
- #: classes/class-backup.php:471
706
- msgid "Invalid root path <code>%s</code> must be a valid directory path"
707
- msgstr ""
708
-
709
- #: classes/class-backup.php:497
710
- msgid ""
711
- "Invalid existing archive filepath <code>%s</code> must be a non empty "
712
- "(string)"
713
- msgstr ""
714
-
715
- #: classes/class-backup.php:552
716
- msgid ""
717
- "Invalid backup type <code>%s</code> must be one of (string) file, database "
718
- "or complete"
719
- msgstr ""
720
-
721
- #: classes/class-backup.php:1926
722
- msgid "Could not connect to mysql"
723
- msgstr ""
724
-
725
- #: classes/class-backupwordpress-wp-cli-command.php:50
726
- msgid "Backup: Dumping database..."
727
- msgstr ""
728
-
729
- #: classes/class-backupwordpress-wp-cli-command.php:54
730
- msgid "Backup: Zipping everything up..."
731
- msgstr ""
732
-
733
- #: classes/class-backupwordpress-wp-cli-command.php:70
734
- msgid "Invalid backup path"
735
- msgstr ""
736
-
737
- #: classes/class-backupwordpress-wp-cli-command.php:75
738
- msgid "Invalid root path"
739
- msgstr ""
740
-
741
- #: classes/class-backupwordpress-wp-cli-command.php:106
742
- msgid "Backup Complete: "
743
- msgstr ""
744
-
745
- #: classes/class-backupwordpress-wp-cli-command.php:108
746
- msgid "Backup Failed"
747
- msgstr ""
748
-
749
- #: classes/class-email-service.php:28
750
- msgid "Email notification"
751
- msgstr ""
752
-
753
- #: classes/class-email-service.php:34
754
- msgid ""
755
- "Receive a notification email when a backup completes, if the backup is small "
756
- "enough (&lt; %s) then it will be attached to the email. Separate multiple "
757
- "email addresses with a comma."
758
- msgstr ""
759
-
760
- #: classes/class-email-service.php:63
761
- msgid ""
762
- "The maximum filesize of your backup that will be attached to your "
763
- "notification emails . Defaults to %s."
764
- msgstr ""
765
-
766
- #: classes/class-email-service.php:82
767
- msgid "Send an email notification to %s"
768
- msgstr ""
769
-
770
- #: classes/class-email-service.php:117
771
- msgid "%s isn't a valid email"
772
- msgstr ""
773
-
774
- #: classes/class-email-service.php:179 classes/class-webhook-service.php:59
775
- msgid "Backup of %s Failed"
776
- msgstr ""
777
-
778
- #: classes/class-email-service.php:181
779
- msgid "BackUpWordPress was unable to backup your site %1$s."
780
- msgstr ""
781
-
782
- #: classes/class-email-service.php:181
783
- msgid "Here are the errors that we're encountered:"
784
- msgstr ""
785
-
786
- #: classes/class-email-service.php:181
787
- msgid ""
788
- "If the errors above look like Martian, forward this email to %3$s and we'll "
789
- "take a look"
790
- msgstr ""
791
-
792
- #: classes/class-email-service.php:181
793
- msgid ""
794
- "Kind Regards,\n"
795
- "The Apologetic BackUpWordPress Backup Emailing Robot"
796
- msgstr ""
797
-
798
- #: classes/class-email-service.php:189
799
- msgid "Backup of %s"
800
- msgstr ""
801
-
802
- #: classes/class-email-service.php:194 classes/class-email-service.php:203
803
- msgid "BackUpWordPress has completed a backup of your site %1$s."
804
- msgstr ""
805
-
806
- #: classes/class-email-service.php:194
807
- msgid "The backup file should be attached to this email."
808
- msgstr ""
809
-
810
- #: classes/class-email-service.php:194 classes/class-email-service.php:203
811
- msgid "You can download the backup file by clicking the link below:"
812
- msgstr ""
813
-
814
- #: classes/class-email-service.php:194 classes/class-email-service.php:203
815
- msgid ""
816
- "Kind Regards,\n"
817
- "The Happy BackUpWordPress Backup Emailing Robot"
818
- msgstr ""
819
-
820
- #: classes/class-email-service.php:203
821
- msgid "Unfortunately the backup file was too large to attach to this email."
822
- msgstr ""
823
-
824
- #: classes/class-path.php:249
825
- msgid ""
826
- "This %s file ensures that other people cannot download your backup files."
827
- msgstr ""
828
-
829
- #: classes/class-plugin.php:214
830
- msgid "Update"
831
- msgstr ""
832
-
833
- #: classes/class-plugin.php:215
834
- msgid "Cancel"
835
- msgstr ""
836
-
837
- #: classes/class-plugin.php:216
838
- msgid ""
839
- "Are you sure you want to delete this schedule? All of it's backups will also "
840
- "be deleted."
841
- msgstr ""
842
-
843
- #: classes/class-plugin.php:216 classes/class-plugin.php:217
844
- #: classes/class-plugin.php:218 classes/class-plugin.php:219
845
- msgid "'Cancel' to go back, 'OK' to delete."
846
- msgstr ""
847
-
848
- #: classes/class-plugin.php:217
849
- msgid "Are you sure you want to delete this backup?"
850
- msgstr ""
851
-
852
- #: classes/class-plugin.php:218
853
- msgid "Are you sure you want to remove this exclude rule?"
854
- msgstr ""
855
-
856
- #: classes/class-plugin.php:219
857
- msgid ""
858
- "Reducing the number of backups that are stored on this server will cause "
859
- "some of your existing backups to be deleted, are you sure that's what you "
860
- "want?"
861
- msgstr ""
862
-
863
- #: classes/class-schedule.php:151
864
- msgid "Invalid Option Name"
865
- msgstr ""
866
-
867
- #: classes/class-schedule.php:264
868
- msgid "Argument 1 for %s must be a valid integer"
869
- msgstr ""
870
-
871
- #: classes/class-schedule.php:612
872
- msgid "Argument 1 for %s must be a valid future timestamp"
873
- msgstr ""
874
-
875
- #: classes/class-schedule.php:649
876
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
877
- msgstr ""
878
-
879
- #: classes/class-schedule.php:778 functions/interface.php:267
880
- msgid "Starting Backup"
881
- msgstr ""
882
-
883
- #: classes/class-schedule.php:865
884
- msgid "Error writing to file. (%s)"
885
- msgstr ""
886
-
887
- #: classes/class-schedule.php:916
888
- msgid "Dumping Database %s"
889
- msgstr ""
890
-
891
- #: classes/class-schedule.php:921
892
- msgid "Verifying Database Dump %s"
893
- msgstr ""
894
-
895
- #: classes/class-schedule.php:926
896
- msgid "Creating zip archive %s"
897
- msgstr ""
898
-
899
- #: classes/class-schedule.php:931
900
- msgid "Verifying Zip Archive %s"
901
- msgstr ""
902
-
903
- #: classes/class-schedule.php:936
904
- msgid "Finishing Backup"
905
- msgstr ""
906
-
907
- #: classes/class-schedule.php:987
908
- msgid "An unexpected error occured"
909
- msgstr ""
910
-
911
- #. translators: min=minute
912
- #: classes/class-schedule.php:1050
913
- msgid "%s min"
914
- msgid_plural "%s mins"
915
- msgstr[0] ""
916
- msgstr[1] ""
917
-
918
- #: classes/class-schedule.php:1060
919
- msgid "%s hour"
920
- msgid_plural "%s hours"
921
- msgstr[0] ""
922
- msgstr[1] ""
923
-
924
- #: classes/class-schedule.php:1122
925
- msgid "Argument 1 for %s must be a non empty string"
926
- msgstr ""
927
-
928
- #: classes/class-schedule.php:1127
929
- msgid "%s doesn't exist"
930
- msgstr ""
931
-
932
- #: classes/class-schedule.php:1132
933
- msgid "That backup wasn't created by this schedule"
934
- msgstr ""
935
-
936
- #: classes/class-services.php:80
937
- msgid "Argument 1 for %s must be a valid filepath"
938
- msgstr ""
939
-
940
- #: classes/class-services.php:96
941
- msgid "Argument 1 for %s must be a registered service"
942
- msgstr ""
943
-
944
- #: classes/class-services.php:114 classes/deprecated.php:81
945
- msgid "Argument 1 for %s must be a valid class"
946
- msgstr ""
947
-
948
- #: classes/class-setup.php:34
949
- msgid "BackUpWordPress"
950
- msgstr ""
951
-
952
- #: classes/class-setup.php:170
953
- msgid ""
954
- "BackUpWordPress requires PHP version %1$s or later and WordPress version "
955
- "%2$s or later to run. It has not been activated. %3$s%4$s%5$sLearn more%6$s"
956
- msgstr ""
957
-
958
- #: classes/class-webhook-service.php:103
959
- msgid "Error: %s"
960
- msgstr ""
961
-
962
- #: functions/core.php:326
963
- msgid "BackUpWordPress has setup your default schedules."
964
- msgstr ""
965
-
966
- #: functions/core.php:326
967
- msgid ""
968
- "By default BackUpWordPress performs a daily backup of your database and a "
969
- "weekly backup of your database &amp; files. You can modify these schedules."
970
- msgstr ""
971
-
972
- #: functions/core.php:341
973
- msgid "Once Hourly"
974
- msgstr ""
975
-
976
- #: functions/core.php:342
977
- msgid "Twice Daily"
978
- msgstr ""
979
-
980
- #: functions/core.php:343
981
- msgid "Once Daily"
982
- msgstr ""
983
-
984
- #: functions/core.php:344
985
- msgid "Once Weekly"
986
- msgstr ""
987
-
988
- #: functions/core.php:345
989
- msgid "Once Biweekly"
990
- msgstr "Once Fortnightly"
991
-
992
- #: functions/core.php:346
993
- msgid "Once Monthly"
994
- msgstr ""
995
-
996
- #: functions/core.php:364
997
- msgid "You can only delete directories inside your WordPress installation"
998
- msgstr ""
999
-
1000
- #: functions/interface.php:31
1001
- msgid "Download"
1002
- msgstr ""
1003
-
1004
- #: functions/interface.php:68
1005
- msgid "BackUpWordPress detected issues with your last backup."
1006
- msgstr ""
1007
-
1008
- #: functions/interface.php:70
1009
- msgid "Dismiss"
1010
- msgstr ""
1011
-
1012
- #: functions/interface.php:136
1013
- msgid ""
1014
- "The backups directory can't be created because your %1$s directory isn't "
1015
- "writable, run %2$s or %3$s or create the folder yourself."
1016
- msgstr ""
1017
-
1018
- #: functions/interface.php:140
1019
- msgid ""
1020
- "Your backups directory isn't writable, run %1$s or %2$s or set the "
1021
- "permissions yourself."
1022
- msgstr ""
1023
-
1024
- #: functions/interface.php:144
1025
- msgid ""
1026
- "%1$s is running in %2$s, please contact your host and ask them to disable "
1027
- "it. BackUpWordPress may not work correctly whilst %3$s is on."
1028
- msgstr ""
1029
-
1030
- #: functions/interface.php:144
1031
- msgid "http://php.net/manual/en/features.safe-mode.php"
1032
- msgstr ""
1033
-
1034
- #: functions/interface.php:144
1035
- msgid "Safe Mode"
1036
- msgstr ""
1037
-
1038
- #: functions/interface.php:152
1039
- msgid "Your custom path does not exist"
1040
- msgstr ""
1041
-
1042
- #: functions/interface.php:156
1043
- msgid ""
1044
- "Your custom path is unreachable due to a restriction set in your PHP "
1045
- "configuration (open_basedir)"
1046
- msgstr ""
1047
-
1048
- #: functions/interface.php:161
1049
- msgid ""
1050
- "Your custom backups directory %1$s doesn't exist and can't be created, your "
1051
- "backups will be saved to %2$s instead."
1052
- msgstr ""
1053
-
1054
- #: functions/interface.php:165
1055
- msgid ""
1056
- "Your custom backups directory %1$s isn't writable, new backups will be saved "
1057
- "to %2$s instead."
1058
- msgstr ""
1059
-
1060
- #: functions/interface.php:174
1061
- msgid "Your site root path %s isn't readable."
1062
- msgstr ""
1063
-
1064
- #: functions/interface.php:236
1065
- msgid "Database and Files"
1066
- msgstr ""
1067
-
1068
- #: functions/interface.php:240
1069
- msgid "Files"
1070
- msgstr ""
1071
-
1072
- #: functions/interface.php:244
1073
- msgid "Database"
1074
- msgstr ""
1075
-
1076
- #: functions/interface.php:251
1077
- msgid "Legacy"
1078
- msgstr ""
1079
-
1080
- #: functions/interface.php:266
1081
- msgid "Started %s ago"
1082
- msgstr ""
1083
-
1084
- #: functions/interface.php:268
1085
- msgid "cancel"
1086
- msgstr ""
1087
-
1088
- #: functions/interface.php:316
1089
- msgid "No backups completed"
1090
- msgstr ""
1091
-
1092
- #: functions/interface.php:327
1093
- msgid "Complete Hourly"
1094
- msgstr ""
1095
-
1096
- #: functions/interface.php:328
1097
- msgid "File Hourly"
1098
- msgstr ""
1099
-
1100
- #: functions/interface.php:329
1101
- msgid "Database Hourly"
1102
- msgstr ""
1103
-
1104
- #: functions/interface.php:330
1105
- msgid "Complete Twicedaily"
1106
- msgstr ""
1107
-
1108
- #: functions/interface.php:331
1109
- msgid "File Twicedaily"
1110
- msgstr ""
1111
-
1112
- #: functions/interface.php:332
1113
- msgid "Database Twicedaily"
1114
- msgstr ""
1115
-
1116
- #: functions/interface.php:333
1117
- msgid "Complete Daily"
1118
- msgstr ""
1119
-
1120
- #: functions/interface.php:334
1121
- msgid "File Daily"
1122
- msgstr ""
1123
-
1124
- #: functions/interface.php:335
1125
- msgid "Database Daily"
1126
- msgstr ""
1127
-
1128
- #: functions/interface.php:336
1129
- msgid "Complete Weekly"
1130
- msgstr ""
1131
-
1132
- #: functions/interface.php:337
1133
- msgid "File Weekly"
1134
- msgstr ""
1135
-
1136
- #: functions/interface.php:338
1137
- msgid "Database Weekly"
1138
- msgstr ""
1139
-
1140
- #: functions/interface.php:339
1141
- msgid "Complete Biweekly"
1142
- msgstr "Complete Fortnightly"
1143
-
1144
- #: functions/interface.php:340
1145
- msgid "File Biweekly"
1146
- msgstr "File Fortnightly"
1147
-
1148
- #: functions/interface.php:341
1149
- msgid "Database Biweekly"
1150
- msgstr "Database Fortnightly"
1151
-
1152
- #: functions/interface.php:342
1153
- msgid "Complete Monthly"
1154
- msgstr ""
1155
-
1156
- #: functions/interface.php:343
1157
- msgid "File Monthly"
1158
- msgstr ""
1159
-
1160
- #: functions/interface.php:344
1161
- msgid "Database Monthly"
1162
- msgstr ""
1163
-
1164
- #: functions/interface.php:345
1165
- msgid "Complete Manually"
1166
- msgstr ""
1167
-
1168
- #: functions/interface.php:346
1169
- msgid "File Manually"
1170
- msgstr ""
1171
-
1172
- #: functions/interface.php:347
1173
- msgid "Database Manually"
1174
- msgstr ""
1175
-
1176
- #. Plugin Name of the plugin/theme
1177
- msgid "BackUpWordPress Backup Plugin"
1178
- msgstr ""
1179
-
1180
- #. Plugin URI of the plugin/theme
1181
- msgid "http://bwp.hmn.md/"
1182
- msgstr ""
1183
-
1184
- #. Description of the plugin/theme
1185
- msgid ""
1186
- "Simple automated backups of your WordPress powered website. Once activated "
1187
- "you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, "
1188
- "you'll find me under the Network Settings menu."
1189
- msgstr ""
1190
-
1191
- #. Author of the plugin/theme
1192
- msgid "Human Made Limited"
1193
- msgstr ""
1194
-
1195
- #. Author URI of the plugin/theme
1196
- msgid "http://hmn.md/"
1197
- msgstr ""
1198
-
1199
- #: admin/schedule-sentence.php:120
1200
- msgctxt ""
1201
- "1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to "
1202
- "store"
1203
- msgid "Backup my %1$s %2$s %3$s, %4$s."
1204
- msgstr ""
1205
-
1206
- #: functions/interface.php:318
1207
- msgctxt "backups count"
1208
- msgid "One backup completed"
1209
- msgid_plural "%1$s backups completed"
1210
- msgstr[0] ""
1211
- msgstr[1] ""
1
+ # Copyright (C) 2015 Human Made Limited
2
+ # This file is distributed under the GPL-2.0+.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: BackUpWordPress Backup Plugin 3.2.6\n"
6
+ "POT-Creation-Date: 2015-07-13 12:44+0930\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "PO-Revision-Date: 2015-07-13 13:39+0930\n"
11
+ "Last-Translator: ucavus\n"
12
+ "Language-Team: ucavus\n"
13
+ "X-Generator: Poedit 1.8.2\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "Language: en_GB\n"
16
+
17
+ #: admin/actions.php:191
18
+ msgid "The schedule ID was not provided. Aborting."
19
+ msgstr ""
20
+
21
+ #: admin/actions.php:241
22
+ msgid "Backup type cannot be empty"
23
+ msgstr ""
24
+
25
+ #: admin/actions.php:245
26
+ msgid "Invalid backup type"
27
+ msgstr ""
28
+
29
+ #: admin/actions.php:259
30
+ msgid "Schedule cannot be empty"
31
+ msgstr ""
32
+
33
+ #: admin/actions.php:263
34
+ msgid "Invalid schedule"
35
+ msgstr ""
36
+
37
+ #: admin/actions.php:277
38
+ msgid "Day of the week must be a valid lowercase day name"
39
+ msgstr ""
40
+
41
+ #: admin/actions.php:296
42
+ msgid "Day of month must be between 1 and 31"
43
+ msgstr ""
44
+
45
+ #: admin/actions.php:315
46
+ msgid "Hours must be between 0 and 23"
47
+ msgstr ""
48
+
49
+ #: admin/actions.php:334
50
+ msgid "Minutes must be between 0 and 59"
51
+ msgstr ""
52
+
53
+ #: admin/actions.php:348
54
+ msgid "Max backups can't be empty"
55
+ msgstr ""
56
+
57
+ #: admin/actions.php:352
58
+ msgid "Max backups must be a number"
59
+ msgstr ""
60
+
61
+ #: admin/actions.php:356
62
+ msgid "Max backups must be greater than 0"
63
+ msgstr ""
64
+
65
+ #: admin/actions.php:708 admin/actions.php:714
66
+ msgid "BackUpWordPress has detected a problem."
67
+ msgstr ""
68
+
69
+ #: admin/actions.php:708 admin/actions.php:714
70
+ msgid ""
71
+ "%1$s is returning a %2$s response which could mean cron jobs aren't getting "
72
+ "fired properly. BackUpWordPress relies on wp-cron to run scheduled backups. "
73
+ "See the %3$s for more details."
74
+ msgstr ""
75
+
76
+ #: admin/backups-table.php:8 admin/schedule-form-excludes.php:105
77
+ msgid "Size"
78
+ msgstr ""
79
+
80
+ #: admin/backups-table.php:9 admin/schedule-form-excludes.php:107
81
+ msgid "Type"
82
+ msgstr ""
83
+
84
+ #: admin/backups-table.php:10
85
+ msgid "Actions"
86
+ msgstr ""
87
+
88
+ #: admin/backups-table.php:35
89
+ msgid "This is where your backups will appear once you have some."
90
+ msgstr ""
91
+
92
+ #: admin/backups.php:22
93
+ msgid "add schedule"
94
+ msgstr ""
95
+
96
+ #: admin/backups.php:26
97
+ msgid "Support"
98
+ msgstr ""
99
+
100
+ #: admin/backups.php:32
101
+ msgid "Enable Support"
102
+ msgstr ""
103
+
104
+ #: admin/constants.php:3
105
+ msgid ""
106
+ "You can %1$s any of the following %2$s in your %3$s to control advanced "
107
+ "settings. %4$s. Defined %5$s will be highlighted."
108
+ msgstr ""
109
+
110
+ #: admin/constants.php:3 admin/menu.php:82
111
+ msgid "Constants"
112
+ msgstr ""
113
+
114
+ #: admin/constants.php:3
115
+ msgid "The Codex can help"
116
+ msgstr ""
117
+
118
+ #: admin/constants.php:14 admin/constants.php:30 admin/constants.php:46
119
+ #: admin/constants.php:62 admin/constants.php:78 admin/constants.php:94
120
+ #: admin/constants.php:110 classes/class-email-service.php:60
121
+ msgid "You've set it to: %s"
122
+ msgstr ""
123
+
124
+ #: admin/constants.php:17
125
+ msgid ""
126
+ "The path to folder you would like to store your backup files in, defaults to "
127
+ "%s."
128
+ msgstr ""
129
+
130
+ #: admin/constants.php:17 admin/constants.php:33 admin/constants.php:49
131
+ #: admin/constants.php:65 admin/constants.php:81 admin/constants.php:97
132
+ #: admin/constants.php:113 classes/class-email-service.php:63
133
+ msgid "e.g."
134
+ msgstr ""
135
+
136
+ #: admin/constants.php:33
137
+ msgid ""
138
+ "The path to your %1$s executable. Will be used for the %2$s part of the back "
139
+ "up if available."
140
+ msgstr ""
141
+
142
+ #: admin/constants.php:33 admin/constants.php:49
143
+ msgid "database"
144
+ msgstr ""
145
+
146
+ #: admin/constants.php:49
147
+ msgid ""
148
+ "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s "
149
+ "if available."
150
+ msgstr ""
151
+
152
+ #: admin/constants.php:49
153
+ msgid "files"
154
+ msgstr ""
155
+
156
+ #: admin/constants.php:65
157
+ msgid ""
158
+ "Comma separated list of files or directories to exclude, the backups "
159
+ "directory is automatically excluded."
160
+ msgstr ""
161
+
162
+ #: admin/constants.php:81
163
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
164
+ msgstr ""
165
+
166
+ #: admin/constants.php:97
167
+ msgid "The root directory that is backed up. Defaults to %s."
168
+ msgstr ""
169
+
170
+ #: admin/constants.php:113
171
+ msgid "The time that your schedules should run. Defaults to %s."
172
+ msgstr ""
173
+
174
+ #: admin/enable-support.php:3
175
+ msgid "Enable BackUpWordPress Support"
176
+ msgstr ""
177
+
178
+ #: admin/enable-support.php:5
179
+ msgid ""
180
+ "BackUpWordPress uses %s to provide support. In addition to allowing you to "
181
+ "send and receive messages we also send the following server information "
182
+ "along with your requests:"
183
+ msgstr ""
184
+
185
+ #: admin/enable-support.php:58
186
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
187
+ msgstr ""
188
+
189
+ #: admin/enable-support.php:60
190
+ msgid "No thanks"
191
+ msgstr ""
192
+
193
+ #: admin/enable-support.php:61
194
+ msgid "Yes I want to enable support"
195
+ msgstr ""
196
+
197
+ #: admin/faq.php:2
198
+ msgid "Where does BackUpWordPress store the backup files?"
199
+ msgstr ""
200
+
201
+ #: admin/faq.php:4
202
+ msgid ""
203
+ "Backups are stored on your server in <code>/wp-content/backups</code>, you "
204
+ "can change the directory."
205
+ msgstr ""
206
+
207
+ #: admin/faq.php:6
208
+ msgid ""
209
+ "Important: By default BackUpWordPress backs up everything in your site root "
210
+ "as well as your database, this includes any non WordPress folders that "
211
+ "happen to be in your site root. This does mean that your backup directory "
212
+ "can get quite large."
213
+ msgstr ""
214
+
215
+ #: admin/faq.php:8
216
+ msgid "What if I want to back up my site to another destination?"
217
+ msgstr ""
218
+
219
+ #: admin/faq.php:10
220
+ msgid ""
221
+ "BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, "
222
+ "Azure, DreamObjects and FTP/SFTP. Check it out here: <a href=\"http://bwp."
223
+ "hmn.md/?utm_source=wordpress-org&utm_medium=plugin-"
224
+ "page&utm_campaign=freeplugin\" title=\"BackUpWordPress Homepage\" target="
225
+ "\"_blank\">https://bwp.hmn.md</a>"
226
+ msgstr ""
227
+
228
+ #: admin/faq.php:12
229
+ msgid "How do I restore my site from a backup?"
230
+ msgstr ""
231
+
232
+ #: admin/faq.php:14
233
+ msgid ""
234
+ "You need to download the latest backup file either by clicking download on "
235
+ "the backups page or via <code>FTP</code>. <code>Unzip</code> the files and "
236
+ "upload all the files to your server overwriting your site. You can then "
237
+ "import the database using your hosts database management tool (likely "
238
+ "<code>phpMyAdmin</code>)."
239
+ msgstr ""
240
+
241
+ #: admin/faq.php:16
242
+ msgid ""
243
+ "See this guide for more details - <a href=\"https://bwp.hmn.md/support-"
244
+ "center/restore-backup/\" title=\"Go to support center\" target=\"_blank"
245
+ "\">How to restore from backup</a>."
246
+ msgstr ""
247
+
248
+ #: admin/faq.php:18
249
+ msgid "Does BackUpWordPress back up the backups directory?"
250
+ msgstr ""
251
+
252
+ #: admin/faq.php:20
253
+ msgid "No."
254
+ msgstr ""
255
+
256
+ #: admin/faq.php:22
257
+ msgid "I'm not receiving my backups by email?"
258
+ msgstr ""
259
+
260
+ #: admin/faq.php:24
261
+ msgid ""
262
+ "Most servers have a filesize limit on email attachments, it's generally "
263
+ "about 10mb. If your backup file is over that limit it won't be sent attached "
264
+ "to the email, instead you should receive an email with a link to download "
265
+ "the backup, if you aren't even receiving that then you likely have a mail "
266
+ "issue on your server that you'll need to contact your host about."
267
+ msgstr ""
268
+
269
+ #: admin/faq.php:26
270
+ msgid "How many backups are stored by default?"
271
+ msgstr ""
272
+
273
+ #: admin/faq.php:28
274
+ msgid "BackUpWordPress stores the last 10 backups by default."
275
+ msgstr ""
276
+
277
+ #: admin/faq.php:30
278
+ msgid "How long should a backup take?"
279
+ msgstr ""
280
+
281
+ #: admin/faq.php:32
282
+ msgid ""
283
+ "Unless your site is very large (many gigabytes) it should only take a few "
284
+ "minutes to perform a back up, if your back up has been running for longer "
285
+ "than an hour it's safe to assume that something has gone wrong, try de-"
286
+ "activating and re-activating the plugin, if it keeps happening, contact "
287
+ "support."
288
+ msgstr ""
289
+
290
+ #: admin/faq.php:34
291
+ msgid "What do I do if I get the wp-cron error message?"
292
+ msgstr ""
293
+
294
+ #: admin/faq.php:36
295
+ msgid ""
296
+ "The issue is that your <code>wp-cron.php</code> is not returning a "
297
+ "<code>200</code> response when hit with a HTTP request originating from your "
298
+ "own server, it could be several things, in most cases, it's an issue with "
299
+ "the server / site."
300
+ msgstr ""
301
+
302
+ #: admin/faq.php:38
303
+ msgid "There are some things you can test to confirm this is the issue."
304
+ msgstr ""
305
+
306
+ #: admin/faq.php:40
307
+ msgid "Are scheduled posts working? (They use wp-cron as well ). "
308
+ msgstr ""
309
+
310
+ #: admin/faq.php:42
311
+ msgid ""
312
+ "Are you hosted on Heart Internet? (wp-cron may not be supported by Heart "
313
+ "Internet, see below for work-around)."
314
+ msgstr ""
315
+
316
+ #: admin/faq.php:44
317
+ msgid "If you click manual backup does it work?"
318
+ msgstr ""
319
+
320
+ #: admin/faq.php:46
321
+ msgid ""
322
+ "Try adding <code>define( 'ALTERNATE_WP_CRON', true );</code> to your "
323
+ "<code>wp-config.php</code>, do automatic backups work?"
324
+ msgstr ""
325
+
326
+ #: admin/faq.php:48
327
+ msgid ""
328
+ "Is your site private (I.E. is it behind some kind of authentication, "
329
+ "maintenance plugin, .htaccess) if so wp-cron won't work until you remove it, "
330
+ "if you are and you temporarily remove the authentication, do backups start "
331
+ "working?"
332
+ msgstr ""
333
+
334
+ #: admin/faq.php:50
335
+ msgid ""
336
+ "Report the results to our support team for further help. To do this, either "
337
+ "enable suport from your Admin Dashboard (recommended), or email support@hmn."
338
+ "md"
339
+ msgstr ""
340
+
341
+ #: admin/faq.php:52
342
+ msgid "How to get BackUpWordPress working in Heart Internet"
343
+ msgstr ""
344
+
345
+ #: admin/faq.php:54
346
+ msgid ""
347
+ "The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/"
348
+ "php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the "
349
+ "space between php5 and the location of the file). The file <code>wp-cron."
350
+ "php</code> <code>chmod</code> must be set to <code>711</code>."
351
+ msgstr ""
352
+
353
+ #: admin/faq.php:56
354
+ msgid "My backups seem to be failing?"
355
+ msgstr ""
356
+
357
+ #: admin/faq.php:58
358
+ msgid ""
359
+ "If your backups are failing - it's commonly caused by lack of available "
360
+ "resources on your server. The easiest way to establish this to exclude some "
361
+ "[of] or your entire uploades folder, running a backup an if that succeeds. "
362
+ "If so, we know it's probably a server issue. If not, report the results to "
363
+ "our support team for further help. To do this, either enable suport from "
364
+ "your Admin Dashboard (recommended), or email support@hmn.md"
365
+ msgstr ""
366
+
367
+ #: admin/menu.php:13 admin/menu.php:17
368
+ msgid "Manage Backups"
369
+ msgstr ""
370
+
371
+ #: admin/menu.php:13 admin/menu.php:17 admin/menu.php:46
372
+ msgid "Backups"
373
+ msgstr ""
374
+
375
+ #: admin/menu.php:77
376
+ msgid "FAQ"
377
+ msgstr ""
378
+
379
+ #: admin/menu.php:95
380
+ msgid "Server Info"
381
+ msgstr ""
382
+
383
+ #: admin/menu.php:102
384
+ msgid "For more information:"
385
+ msgstr ""
386
+
387
+ #: admin/menu.php:104
388
+ msgid "Support Forums"
389
+ msgstr ""
390
+
391
+ #: admin/menu.php:105
392
+ msgid "Help with translation"
393
+ msgstr ""
394
+
395
+ #: admin/page.php:7
396
+ msgid ""
397
+ "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin "
398
+ "directory%2$s."
399
+ msgstr ""
400
+
401
+ #: admin/schedule-form-excludes.php:6
402
+ msgid "Currently Excluded"
403
+ msgstr ""
404
+
405
+ #: admin/schedule-form-excludes.php:9
406
+ msgid ""
407
+ "We automatically detect and ignore common <abbr title=\"Version Control "
408
+ "Systems\">VCS</abbr> folders and other backup plugin folders."
409
+ msgstr ""
410
+
411
+ #: admin/schedule-form-excludes.php:44
412
+ msgid "Default rule"
413
+ msgstr ""
414
+
415
+ #: admin/schedule-form-excludes.php:48
416
+ msgid "Defined in wp-config.php"
417
+ msgstr ""
418
+
419
+ #: admin/schedule-form-excludes.php:55
420
+ msgid "Stop excluding"
421
+ msgstr ""
422
+
423
+ #: admin/schedule-form-excludes.php:71
424
+ msgid "Directory Listing"
425
+ msgstr ""
426
+
427
+ #: admin/schedule-form-excludes.php:73
428
+ msgid ""
429
+ "Here's a directory listing of all files on your site, you can browse through "
430
+ "and exclude files or folders that you don't want included in your backup."
431
+ msgstr ""
432
+
433
+ #: admin/schedule-form-excludes.php:104
434
+ msgid "Name"
435
+ msgstr ""
436
+
437
+ #: admin/schedule-form-excludes.php:106
438
+ msgid "Permissions"
439
+ msgstr ""
440
+
441
+ #: admin/schedule-form-excludes.php:108
442
+ msgid "Status"
443
+ msgstr ""
444
+
445
+ #: admin/schedule-form-excludes.php:168 admin/schedule-form-excludes.php:284
446
+ msgid "Refresh"
447
+ msgstr ""
448
+
449
+ #: admin/schedule-form-excludes.php:185 admin/schedule-form-excludes.php:308
450
+ msgid "Symlink"
451
+ msgstr ""
452
+
453
+ #: admin/schedule-form-excludes.php:189 admin/schedule-form-excludes.php:312
454
+ msgid "Folder"
455
+ msgstr ""
456
+
457
+ #: admin/schedule-form-excludes.php:282
458
+ msgid "Recalculate the size of this directory"
459
+ msgstr ""
460
+
461
+ #: admin/schedule-form-excludes.php:316
462
+ msgid "File"
463
+ msgstr ""
464
+
465
+ #: admin/schedule-form-excludes.php:327
466
+ msgid "Unreadable files won't be backed up."
467
+ msgstr ""
468
+
469
+ #: admin/schedule-form-excludes.php:327
470
+ msgid "Unreadable"
471
+ msgstr ""
472
+
473
+ #: admin/schedule-form-excludes.php:331
474
+ msgid "Excluded"
475
+ msgstr ""
476
+
477
+ #: admin/schedule-form-excludes.php:347
478
+ msgid "Exclude &rarr;"
479
+ msgstr ""
480
+
481
+ #: admin/schedule-form-excludes.php:365 admin/schedule-form.php:192
482
+ #: admin/schedule-settings.php:88
483
+ msgid "Done"
484
+ msgstr ""
485
+
486
+ #: admin/schedule-form.php:1 admin/schedule-settings.php:9
487
+ msgid "Settings"
488
+ msgstr ""
489
+
490
+ #: admin/schedule-form.php:36
491
+ msgid "Backup"
492
+ msgstr ""
493
+
494
+ #: admin/schedule-form.php:43
495
+ msgid "Both Database &amp; files"
496
+ msgstr ""
497
+
498
+ #: admin/schedule-form.php:45
499
+ msgid "Files only"
500
+ msgstr ""
501
+
502
+ #: admin/schedule-form.php:47
503
+ msgid "Database only"
504
+ msgstr ""
505
+
506
+ #: admin/schedule-form.php:58
507
+ msgid "Schedule"
508
+ msgstr ""
509
+
510
+ #: admin/schedule-form.php:65
511
+ msgid "Manual Only"
512
+ msgstr ""
513
+
514
+ #: admin/schedule-form.php:92
515
+ msgid "Start Day"
516
+ msgstr ""
517
+
518
+ #: admin/schedule-form.php:100
519
+ msgid "Monday"
520
+ msgstr ""
521
+
522
+ #: admin/schedule-form.php:101
523
+ msgid "Tuesday"
524
+ msgstr ""
525
+
526
+ #: admin/schedule-form.php:102
527
+ msgid "Wednesday"
528
+ msgstr ""
529
+
530
+ #: admin/schedule-form.php:103
531
+ msgid "Thursday"
532
+ msgstr ""
533
+
534
+ #: admin/schedule-form.php:104
535
+ msgid "Friday"
536
+ msgstr ""
537
+
538
+ #: admin/schedule-form.php:105
539
+ msgid "Saturday"
540
+ msgstr ""
541
+
542
+ #: admin/schedule-form.php:106
543
+ msgid "Sunday"
544
+ msgstr ""
545
+
546
+ #: admin/schedule-form.php:124
547
+ msgid "Start Day of Month"
548
+ msgstr ""
549
+
550
+ #: admin/schedule-form.php:136
551
+ msgid "Start Time"
552
+ msgstr ""
553
+
554
+ #: admin/schedule-form.php:145
555
+ msgid "Hours"
556
+ msgstr ""
557
+
558
+ #: admin/schedule-form.php:149
559
+ msgid "Minutes"
560
+ msgstr ""
561
+
562
+ #: admin/schedule-form.php:152
563
+ msgid "Please use 24 hour format for hours"
564
+ msgstr ""
565
+
566
+ #: admin/schedule-form.php:153
567
+ msgid "The second backup will run 12 hours after the first"
568
+ msgstr ""
569
+
570
+ #: admin/schedule-form.php:162
571
+ msgid "Number of backups to store on this server"
572
+ msgstr ""
573
+
574
+ #: admin/schedule-form.php:171
575
+ msgid "Past this limit older backups will be deleted automatically."
576
+ msgstr ""
577
+
578
+ #: admin/schedule-form.php:174
579
+ msgid "This schedule will store a maximum of %s of backups."
580
+ msgstr ""
581
+
582
+ #: admin/schedule-sentence.php:11
583
+ msgid "The next backup will be on %1$s at %2$s %3$s"
584
+ msgstr ""
585
+
586
+ #: admin/schedule-sentence.php:18
587
+ msgid "hourly on the hour"
588
+ msgstr ""
589
+
590
+ #: admin/schedule-sentence.php:18
591
+ msgid "hourly at %s minutes past the hour"
592
+ msgstr ""
593
+
594
+ #: admin/schedule-sentence.php:24
595
+ msgid "daily at %s"
596
+ msgstr ""
597
+
598
+ #: admin/schedule-sentence.php:35
599
+ msgid "every 12 hours at %1$s &amp; %2$s"
600
+ msgstr ""
601
+
602
+ #: admin/schedule-sentence.php:41
603
+ msgid "weekly on %1$s at %2$s"
604
+ msgstr ""
605
+
606
+ #: admin/schedule-sentence.php:47
607
+ msgid "biweekly on %1$s at %2$s"
608
+ msgstr "fortnightly on %1$s at %2$s"
609
+
610
+ #: admin/schedule-sentence.php:53
611
+ msgid "on the %1$s of each month at %2$s"
612
+ msgstr ""
613
+
614
+ #: admin/schedule-sentence.php:59 admin/schedule-sentence.php:65
615
+ msgid "manually"
616
+ msgstr ""
617
+
618
+ #: admin/schedule-sentence.php:70
619
+ msgid "this server"
620
+ msgstr ""
621
+
622
+ #: admin/schedule-sentence.php:78
623
+ msgid "store the most recent backup in %s"
624
+ msgstr ""
625
+
626
+ #: admin/schedule-sentence.php:84
627
+ msgid "don't store any backups in on this server"
628
+ msgstr ""
629
+
630
+ #: admin/schedule-sentence.php:90
631
+ msgid "store the last %1$s backups in %2$s"
632
+ msgstr ""
633
+
634
+ #: admin/schedule-sentence.php:123
635
+ msgid "%s. "
636
+ msgstr ""
637
+
638
+ #: admin/schedule-sentence.php:127
639
+ msgid "Send a copy of each backup to %s."
640
+ msgstr ""
641
+
642
+ #: admin/schedule-sentence.php:158
643
+ msgid "Backups will be compressed and should be smaller than this."
644
+ msgstr ""
645
+
646
+ #: admin/schedule-sentence.php:162
647
+ msgid "this shouldn't take long&hellip;"
648
+ msgstr ""
649
+
650
+ #: admin/schedule-sentence.php:162
651
+ msgid "calculating the size of your backup&hellip;"
652
+ msgstr ""
653
+
654
+ #: admin/schedule-settings.php:7
655
+ msgid "Run now"
656
+ msgstr ""
657
+
658
+ #: admin/schedule-settings.php:15
659
+ msgid "Excludes"
660
+ msgstr ""
661
+
662
+ #: admin/schedule-settings.php:27 functions/interface.php:34
663
+ msgid "Delete"
664
+ msgstr ""
665
+
666
+ #: admin/server-info.php:43
667
+ msgid "%1$s - %2$s"
668
+ msgstr ""
669
+
670
+ #: admin/upsell.php:3
671
+ msgid "Backup to"
672
+ msgstr ""
673
+
674
+ #: admin/upsell.php:18
675
+ msgid ""
676
+ "%1$sor buy the %2$sDeveloper Bundle%3$s now for only &dollar;99 (all "
677
+ "Destinations &amp; Unlimited Sites)%4$s"
678
+ msgstr ""
679
+
680
+ #: backupwordpress.php:53
681
+ msgid ""
682
+ "BackUpWordPress will not work on this site. ( PHP Version %s is unsupported )"
683
+ msgstr ""
684
+
685
+ #: backupwordpress.php:53
686
+ msgid "BackUpWordPress Error"
687
+ msgstr ""
688
+
689
+ #: classes/class-backup.php:388
690
+ msgid "archive filename must be a non empty string"
691
+ msgstr ""
692
+
693
+ #: classes/class-backup.php:392
694
+ msgid "invalid file extension for archive filename <code>%s</code>"
695
+ msgstr ""
696
+
697
+ #: classes/class-backup.php:433
698
+ msgid "database dump filename must be a non empty string"
699
+ msgstr ""
700
+
701
+ #: classes/class-backup.php:437
702
+ msgid "invalid file extension for database dump filename <code>%s</code>"
703
+ msgstr ""
704
+
705
+ #: classes/class-backup.php:471
706
+ msgid "Invalid root path <code>%s</code> must be a valid directory path"
707
+ msgstr ""
708
+
709
+ #: classes/class-backup.php:497
710
+ msgid ""
711
+ "Invalid existing archive filepath <code>%s</code> must be a non empty "
712
+ "(string)"
713
+ msgstr ""
714
+
715
+ #: classes/class-backup.php:552
716
+ msgid ""
717
+ "Invalid backup type <code>%s</code> must be one of (string) file, database "
718
+ "or complete"
719
+ msgstr ""
720
+
721
+ #: classes/class-backup.php:1926
722
+ msgid "Could not connect to mysql"
723
+ msgstr ""
724
+
725
+ #: classes/class-backupwordpress-wp-cli-command.php:50
726
+ msgid "Backup: Dumping database..."
727
+ msgstr ""
728
+
729
+ #: classes/class-backupwordpress-wp-cli-command.php:54
730
+ msgid "Backup: Zipping everything up..."
731
+ msgstr ""
732
+
733
+ #: classes/class-backupwordpress-wp-cli-command.php:70
734
+ msgid "Invalid backup path"
735
+ msgstr ""
736
+
737
+ #: classes/class-backupwordpress-wp-cli-command.php:75
738
+ msgid "Invalid root path"
739
+ msgstr ""
740
+
741
+ #: classes/class-backupwordpress-wp-cli-command.php:106
742
+ msgid "Backup Complete: "
743
+ msgstr ""
744
+
745
+ #: classes/class-backupwordpress-wp-cli-command.php:108
746
+ msgid "Backup Failed"
747
+ msgstr ""
748
+
749
+ #: classes/class-email-service.php:28
750
+ msgid "Email notification"
751
+ msgstr ""
752
+
753
+ #: classes/class-email-service.php:34
754
+ msgid ""
755
+ "Receive a notification email when a backup completes, if the backup is small "
756
+ "enough (&lt; %s) then it will be attached to the email. Separate multiple "
757
+ "email addresses with a comma."
758
+ msgstr ""
759
+
760
+ #: classes/class-email-service.php:63
761
+ msgid ""
762
+ "The maximum filesize of your backup that will be attached to your "
763
+ "notification emails . Defaults to %s."
764
+ msgstr ""
765
+
766
+ #: classes/class-email-service.php:82
767
+ msgid "Send an email notification to %s"
768
+ msgstr ""
769
+
770
+ #: classes/class-email-service.php:117
771
+ msgid "%s isn't a valid email"
772
+ msgstr ""
773
+
774
+ #: classes/class-email-service.php:179 classes/class-webhook-service.php:59
775
+ msgid "Backup of %s Failed"
776
+ msgstr ""
777
+
778
+ #: classes/class-email-service.php:181
779
+ msgid "BackUpWordPress was unable to backup your site %1$s."
780
+ msgstr ""
781
+
782
+ #: classes/class-email-service.php:181
783
+ msgid "Here are the errors that we're encountered:"
784
+ msgstr ""
785
+
786
+ #: classes/class-email-service.php:181
787
+ msgid ""
788
+ "If the errors above look like Martian, forward this email to %3$s and we'll "
789
+ "take a look"
790
+ msgstr ""
791
+
792
+ #: classes/class-email-service.php:181
793
+ msgid ""
794
+ "Kind Regards,\n"
795
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
796
+ msgstr ""
797
+
798
+ #: classes/class-email-service.php:189
799
+ msgid "Backup of %s"
800
+ msgstr ""
801
+
802
+ #: classes/class-email-service.php:194 classes/class-email-service.php:203
803
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
804
+ msgstr ""
805
+
806
+ #: classes/class-email-service.php:194
807
+ msgid "The backup file should be attached to this email."
808
+ msgstr ""
809
+
810
+ #: classes/class-email-service.php:194 classes/class-email-service.php:203
811
+ msgid "You can download the backup file by clicking the link below:"
812
+ msgstr ""
813
+
814
+ #: classes/class-email-service.php:194 classes/class-email-service.php:203
815
+ msgid ""
816
+ "Kind Regards,\n"
817
+ "The Happy BackUpWordPress Backup Emailing Robot"
818
+ msgstr ""
819
+
820
+ #: classes/class-email-service.php:203
821
+ msgid "Unfortunately the backup file was too large to attach to this email."
822
+ msgstr ""
823
+
824
+ #: classes/class-path.php:249
825
+ msgid ""
826
+ "This %s file ensures that other people cannot download your backup files."
827
+ msgstr ""
828
+
829
+ #: classes/class-plugin.php:214
830
+ msgid "Update"
831
+ msgstr ""
832
+
833
+ #: classes/class-plugin.php:215
834
+ msgid "Cancel"
835
+ msgstr ""
836
+
837
+ #: classes/class-plugin.php:216
838
+ msgid ""
839
+ "Are you sure you want to delete this schedule? All of it's backups will also "
840
+ "be deleted."
841
+ msgstr ""
842
+
843
+ #: classes/class-plugin.php:216 classes/class-plugin.php:217
844
+ #: classes/class-plugin.php:218 classes/class-plugin.php:219
845
+ msgid "'Cancel' to go back, 'OK' to delete."
846
+ msgstr ""
847
+
848
+ #: classes/class-plugin.php:217
849
+ msgid "Are you sure you want to delete this backup?"
850
+ msgstr ""
851
+
852
+ #: classes/class-plugin.php:218
853
+ msgid "Are you sure you want to remove this exclude rule?"
854
+ msgstr ""
855
+
856
+ #: classes/class-plugin.php:219
857
+ msgid ""
858
+ "Reducing the number of backups that are stored on this server will cause "
859
+ "some of your existing backups to be deleted, are you sure that's what you "
860
+ "want?"
861
+ msgstr ""
862
+
863
+ #: classes/class-schedule.php:151
864
+ msgid "Invalid Option Name"
865
+ msgstr ""
866
+
867
+ #: classes/class-schedule.php:264
868
+ msgid "Argument 1 for %s must be a valid integer"
869
+ msgstr ""
870
+
871
+ #: classes/class-schedule.php:612
872
+ msgid "Argument 1 for %s must be a valid future timestamp"
873
+ msgstr ""
874
+
875
+ #: classes/class-schedule.php:649
876
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
877
+ msgstr ""
878
+
879
+ #: classes/class-schedule.php:778 functions/interface.php:267
880
+ msgid "Starting Backup"
881
+ msgstr ""
882
+
883
+ #: classes/class-schedule.php:865
884
+ msgid "Error writing to file. (%s)"
885
+ msgstr ""
886
+
887
+ #: classes/class-schedule.php:916
888
+ msgid "Dumping Database %s"
889
+ msgstr ""
890
+
891
+ #: classes/class-schedule.php:921
892
+ msgid "Verifying Database Dump %s"
893
+ msgstr ""
894
+
895
+ #: classes/class-schedule.php:926
896
+ msgid "Creating zip archive %s"
897
+ msgstr ""
898
+
899
+ #: classes/class-schedule.php:931
900
+ msgid "Verifying Zip Archive %s"
901
+ msgstr ""
902
+
903
+ #: classes/class-schedule.php:936
904
+ msgid "Finishing Backup"
905
+ msgstr ""
906
+
907
+ #: classes/class-schedule.php:987
908
+ msgid "An unexpected error occured"
909
+ msgstr ""
910
+
911
+ #. translators: min=minute
912
+ #: classes/class-schedule.php:1050
913
+ msgid "%s min"
914
+ msgid_plural "%s mins"
915
+ msgstr[0] ""
916
+ msgstr[1] ""
917
+
918
+ #: classes/class-schedule.php:1060
919
+ msgid "%s hour"
920
+ msgid_plural "%s hours"
921
+ msgstr[0] ""
922
+ msgstr[1] ""
923
+
924
+ #: classes/class-schedule.php:1122
925
+ msgid "Argument 1 for %s must be a non empty string"
926
+ msgstr ""
927
+
928
+ #: classes/class-schedule.php:1127
929
+ msgid "%s doesn't exist"
930
+ msgstr ""
931
+
932
+ #: classes/class-schedule.php:1132
933
+ msgid "That backup wasn't created by this schedule"
934
+ msgstr ""
935
+
936
+ #: classes/class-services.php:80
937
+ msgid "Argument 1 for %s must be a valid filepath"
938
+ msgstr ""
939
+
940
+ #: classes/class-services.php:96
941
+ msgid "Argument 1 for %s must be a registered service"
942
+ msgstr ""
943
+
944
+ #: classes/class-services.php:114 classes/deprecated.php:81
945
+ msgid "Argument 1 for %s must be a valid class"
946
+ msgstr ""
947
+
948
+ #: classes/class-setup.php:34
949
+ msgid "BackUpWordPress"
950
+ msgstr ""
951
+
952
+ #: classes/class-setup.php:170
953
+ msgid ""
954
+ "BackUpWordPress requires PHP version %1$s or later and WordPress version "
955
+ "%2$s or later to run. It has not been activated. %3$s%4$s%5$sLearn more%6$s"
956
+ msgstr ""
957
+
958
+ #: classes/class-webhook-service.php:103
959
+ msgid "Error: %s"
960
+ msgstr ""
961
+
962
+ #: functions/core.php:326
963
+ msgid "BackUpWordPress has setup your default schedules."
964
+ msgstr ""
965
+
966
+ #: functions/core.php:326
967
+ msgid ""
968
+ "By default BackUpWordPress performs a daily backup of your database and a "
969
+ "weekly backup of your database &amp; files. You can modify these schedules."
970
+ msgstr ""
971
+
972
+ #: functions/core.php:341
973
+ msgid "Once Hourly"
974
+ msgstr ""
975
+
976
+ #: functions/core.php:342
977
+ msgid "Twice Daily"
978
+ msgstr ""
979
+
980
+ #: functions/core.php:343
981
+ msgid "Once Daily"
982
+ msgstr ""
983
+
984
+ #: functions/core.php:344
985
+ msgid "Once Weekly"
986
+ msgstr ""
987
+
988
+ #: functions/core.php:345
989
+ msgid "Once Biweekly"
990
+ msgstr "Once Fortnightly"
991
+
992
+ #: functions/core.php:346
993
+ msgid "Once Monthly"
994
+ msgstr ""
995
+
996
+ #: functions/core.php:364
997
+ msgid "You can only delete directories inside your WordPress installation"
998
+ msgstr ""
999
+
1000
+ #: functions/interface.php:31
1001
+ msgid "Download"
1002
+ msgstr ""
1003
+
1004
+ #: functions/interface.php:68
1005
+ msgid "BackUpWordPress detected issues with your last backup."
1006
+ msgstr ""
1007
+
1008
+ #: functions/interface.php:70
1009
+ msgid "Dismiss"
1010
+ msgstr ""
1011
+
1012
+ #: functions/interface.php:136
1013
+ msgid ""
1014
+ "The backups directory can't be created because your %1$s directory isn't "
1015
+ "writable, run %2$s or %3$s or create the folder yourself."
1016
+ msgstr ""
1017
+
1018
+ #: functions/interface.php:140
1019
+ msgid ""
1020
+ "Your backups directory isn't writable, run %1$s or %2$s or set the "
1021
+ "permissions yourself."
1022
+ msgstr ""
1023
+
1024
+ #: functions/interface.php:144
1025
+ msgid ""
1026
+ "%1$s is running in %2$s, please contact your host and ask them to disable "
1027
+ "it. BackUpWordPress may not work correctly whilst %3$s is on."
1028
+ msgstr ""
1029
+
1030
+ #: functions/interface.php:144
1031
+ msgid "http://php.net/manual/en/features.safe-mode.php"
1032
+ msgstr ""
1033
+
1034
+ #: functions/interface.php:144
1035
+ msgid "Safe Mode"
1036
+ msgstr ""
1037
+
1038
+ #: functions/interface.php:152
1039
+ msgid "Your custom path does not exist"
1040
+ msgstr ""
1041
+
1042
+ #: functions/interface.php:156
1043
+ msgid ""
1044
+ "Your custom path is unreachable due to a restriction set in your PHP "
1045
+ "configuration (open_basedir)"
1046
+ msgstr ""
1047
+
1048
+ #: functions/interface.php:161
1049
+ msgid ""
1050
+ "Your custom backups directory %1$s doesn't exist and can't be created, your "
1051
+ "backups will be saved to %2$s instead."
1052
+ msgstr ""
1053
+
1054
+ #: functions/interface.php:165
1055
+ msgid ""
1056
+ "Your custom backups directory %1$s isn't writable, new backups will be saved "
1057
+ "to %2$s instead."
1058
+ msgstr ""
1059
+
1060
+ #: functions/interface.php:174
1061
+ msgid "Your site root path %s isn't readable."
1062
+ msgstr ""
1063
+
1064
+ #: functions/interface.php:236
1065
+ msgid "Database and Files"
1066
+ msgstr ""
1067
+
1068
+ #: functions/interface.php:240
1069
+ msgid "Files"
1070
+ msgstr ""
1071
+
1072
+ #: functions/interface.php:244
1073
+ msgid "Database"
1074
+ msgstr ""
1075
+
1076
+ #: functions/interface.php:251
1077
+ msgid "Legacy"
1078
+ msgstr ""
1079
+
1080
+ #: functions/interface.php:266
1081
+ msgid "Started %s ago"
1082
+ msgstr ""
1083
+
1084
+ #: functions/interface.php:268
1085
+ msgid "cancel"
1086
+ msgstr ""
1087
+
1088
+ #: functions/interface.php:316
1089
+ msgid "No backups completed"
1090
+ msgstr ""
1091
+
1092
+ #: functions/interface.php:327
1093
+ msgid "Complete Hourly"
1094
+ msgstr ""
1095
+
1096
+ #: functions/interface.php:328
1097
+ msgid "File Hourly"
1098
+ msgstr ""
1099
+
1100
+ #: functions/interface.php:329
1101
+ msgid "Database Hourly"
1102
+ msgstr ""
1103
+
1104
+ #: functions/interface.php:330
1105
+ msgid "Complete Twicedaily"
1106
+ msgstr ""
1107
+
1108
+ #: functions/interface.php:331
1109
+ msgid "File Twicedaily"
1110
+ msgstr ""
1111
+
1112
+ #: functions/interface.php:332
1113
+ msgid "Database Twicedaily"
1114
+ msgstr ""
1115
+
1116
+ #: functions/interface.php:333
1117
+ msgid "Complete Daily"
1118
+ msgstr ""
1119
+
1120
+ #: functions/interface.php:334
1121
+ msgid "File Daily"
1122
+ msgstr ""
1123
+
1124
+ #: functions/interface.php:335
1125
+ msgid "Database Daily"
1126
+ msgstr ""
1127
+
1128
+ #: functions/interface.php:336
1129
+ msgid "Complete Weekly"
1130
+ msgstr ""
1131
+
1132
+ #: functions/interface.php:337
1133
+ msgid "File Weekly"
1134
+ msgstr ""
1135
+
1136
+ #: functions/interface.php:338
1137
+ msgid "Database Weekly"
1138
+ msgstr ""
1139
+
1140
+ #: functions/interface.php:339
1141
+ msgid "Complete Biweekly"
1142
+ msgstr "Complete Fortnightly"
1143
+
1144
+ #: functions/interface.php:340
1145
+ msgid "File Biweekly"
1146
+ msgstr "File Fortnightly"
1147
+
1148
+ #: functions/interface.php:341
1149
+ msgid "Database Biweekly"
1150
+ msgstr "Database Fortnightly"
1151
+
1152
+ #: functions/interface.php:342
1153
+ msgid "Complete Monthly"
1154
+ msgstr ""
1155
+
1156
+ #: functions/interface.php:343
1157
+ msgid "File Monthly"
1158
+ msgstr ""
1159
+
1160
+ #: functions/interface.php:344
1161
+ msgid "Database Monthly"
1162
+ msgstr ""
1163
+
1164
+ #: functions/interface.php:345
1165
+ msgid "Complete Manually"
1166
+ msgstr ""
1167
+
1168
+ #: functions/interface.php:346
1169
+ msgid "File Manually"
1170
+ msgstr ""
1171
+
1172
+ #: functions/interface.php:347
1173
+ msgid "Database Manually"
1174
+ msgstr ""
1175
+
1176
+ #. Plugin Name of the plugin/theme
1177
+ msgid "BackUpWordPress Backup Plugin"
1178
+ msgstr ""
1179
+
1180
+ #. Plugin URI of the plugin/theme
1181
+ msgid "http://bwp.hmn.md/"
1182
+ msgstr ""
1183
+
1184
+ #. Description of the plugin/theme
1185
+ msgid ""
1186
+ "Simple automated backups of your WordPress powered website. Once activated "
1187
+ "you'll find me under <strong>Tools &rarr; Backups</strong>. On multisite, "
1188
+ "you'll find me under the Network Settings menu."
1189
+ msgstr ""
1190
+
1191
+ #. Author of the plugin/theme
1192
+ msgid "Human Made Limited"
1193
+ msgstr ""
1194
+
1195
+ #. Author URI of the plugin/theme
1196
+ msgid "http://hmn.md/"
1197
+ msgstr ""
1198
+
1199
+ #: admin/schedule-sentence.php:120
1200
+ msgctxt ""
1201
+ "1: Backup Type 2: Total size of backup 3: Schedule 4: Number of backups to "
1202
+ "store"
1203
+ msgid "Backup my %1$s %2$s %3$s, %4$s."
1204
+ msgstr ""
1205
+
1206
+ #: functions/interface.php:318
1207
+ msgctxt "backups count"
1208
+ msgid "One backup completed"
1209
+ msgid_plural "%1$s backups completed"
1210
+ msgstr[0] ""
1211
+ msgstr[1] ""
languages/backupwordpress-es_ES.po CHANGED
@@ -1,713 +1,713 @@
1
- # Translation of 2.x in Spanish (Spain)
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: es_ES\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr ""
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr ""
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr ""
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr ""
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr ""
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr ""
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr ""
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr ""
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr ""
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr ""
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr ""
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr ""
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr ""
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr ""
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr ""
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr ""
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr ""
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr ""
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr ""
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr ""
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr ""
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr ""
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr ""
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr ""
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr "Puedes enviar los detalles del error a %s para que sea investigado."
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr "Cada hora"
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr "Dos veces al día"
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr "A diario"
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr "Una vez al día"
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr "Cada quince días"
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr "Cada mes"
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr "Contacta con soporte"
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr "Nueva regla de exclusión"
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr "Esta es la respuesta del servidor"
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr "Si necesitas ayuda haz clic en la ayuda de la esquina superior derecha de esta página."
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr "Backup comenzando"
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr "Guardando la base de datos %s"
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr "Verificando la base de datos %s"
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr "Creando archivo comprimido %s"
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr "Verificando archivo comprimido %s"
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr "Finalizando copia de seguridad"
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr "BackUpWordPress podría no funcionar cuando php está funcionando con %s"
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr "%1$s está funcionando en %2$s. Por favor contacta con tu alojador para que lo deshabilite. BackUpWordPress podría no funcionar correctamente mienstra %3$s esté encendido."
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr "Hora a la que debe programarse. Por defecto %s."
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr "¿Estás seguro de que deseas eliminar esta programación? Todos sus copias de seguridad serán también eliminados."
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr "Cancela para volver atrás, OK para borrar."
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr "¿Estás seguro de que quieres eliminar esta copia de seguridad?"
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr "¿Estás seguro de que quieres eliminar esta regla?"
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr "Reduciendo el número de copias de seguridad disponibles en el servidor causará que algunas de las copias de seguridad sean eliminadas. ¿Estás seguro de que quieres continuar?"
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr "Máximas copias de seguridad no puede estar vacío"
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr "Máximas copias de seguridad debe ser mayor de 0"
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr "Excluír"
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr "defecto"
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr "definido"
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr "Sólo manual"
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr "esto no debería llevar mucho &hellip;"
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr "calculando el tamaño de tu sitio web&hellip;"
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr "La próxima copia de seguridad será el %1$s a las %2$s"
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr "cada 12 horas a %1$s &amp; %2$s"
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr "semanalmente los %1$s a las %2$s"
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr "quincenalmente los %1$s a las %2$s"
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr "el %1$s de cada mes a las %2$s"
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr "manualmente"
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr "este servidor"
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr "no almacenar ninguna copia de seguridad en %s"
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr "almacenar sólo la/las última/s %1$s copia de seguridad en %2$s"
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr ""
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr "BackUpWordPress no ha podido hacer una copia de seguridad de tu sitio %1$s."
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr "Estos son los errores encontrados:"
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr "Si los errores indicados te suenan a chino, reenvía este email a %3$s y le echaremos un vistazo"
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
- "Saludos,\n"
328
- "El robot de BackUpWordPress"
329
-
330
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
- msgid "BackUpWordPress has completed a backup of your site %1$s."
332
- msgstr "BackUpWordPress ha completado una copia de seguridad de tu sitio %1$s."
333
-
334
- #: ../classes/class-email.php:169
335
- msgid "The backup file should be attached to this email."
336
- msgstr "El archivo debería estar adjunto a este email."
337
-
338
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
- msgid "You can download the backup file by clicking the link below:"
340
- msgstr "Puedes descargar el archivo haciendo clic en el enlace inferior:"
341
-
342
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
- msgid ""
344
- "Kind Regards,\n"
345
- "The Happy BackUpWordPress Backup Emailing Robot"
346
- msgstr ""
347
- "Saludos,\n"
348
- "El robot de BackUpWordPress"
349
-
350
- #: ../classes/class-email.php:178
351
- msgid "Unfortunately the backup file was too large to attach to this email."
352
- msgstr "Desgraciadamente el archivo de copia de seguridad es demasiado grande para adjuntarlo a este email."
353
-
354
- #: ../classes/wp-cli.php:19
355
- msgid "Backup: Dumping database..."
356
- msgstr ""
357
-
358
- #: ../classes/wp-cli.php:23
359
- msgid "Backup: Zipping everything up..."
360
- msgstr "Copia de seguridad: Comprimiendo ..."
361
-
362
- #: ../classes/wp-cli.php:38
363
- msgid "Invalid backup path"
364
- msgstr "Ruta de copia de seguridad no válida"
365
-
366
- #: ../classes/wp-cli.php:43
367
- msgid "Invalid root path"
368
- msgstr "Ruta de raíz no válida"
369
-
370
- #: ../classes/wp-cli.php:68
371
- msgid "Backup Complete: "
372
- msgstr "Copia de seguridad completada:"
373
-
374
- #: ../classes/wp-cli.php:71
375
- msgid "Backup Failed"
376
- msgstr "La copia de seguridad ha fallado"
377
-
378
- #: ../functions/core.php:229
379
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
- msgstr "Por defecto BackUpWordPress realiza automáticamente una copia de seguridad de la base de datos diaria y semanal. Puedes modificar la configuración."
381
-
382
- #: ../functions/interface.php:245
383
- msgid "Legacy"
384
- msgstr "Heredado"
385
-
386
- #: ../functions/interface.php:67
387
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
- msgstr "El directorio de copias de seguridad no se puede escribir. Ejecuta %1$s o %2$s o establece los permisos."
389
-
390
- #: ../functions/interface.php:54
391
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
- msgstr "El directorio de copias de seguridad no se puede crear porque el directorio %1$s no se puede escribir. Ejecuta %1$s o %2$s o establece los permisos."
393
-
394
- #: ../functions/core.php:229
395
- msgid "BackUpWordPress has setup your default schedules."
396
- msgstr "BackUpWordPress ha configurado tus ajustes por defecto."
397
-
398
- #: ../classes/class-email.php:154
399
- msgid "Backup of %s Failed"
400
- msgstr "La copia de seguridad de %s ha fallado"
401
-
402
- #: ../classes/class-email.php:69
403
- msgid "Send an email notification to %s"
404
- msgstr "Enviar un email de notificación a %s"
405
-
406
- #: ../classes/class-email.php:100
407
- msgid "%s isn't a valid email"
408
- msgstr "%s no es un email válido"
409
-
410
- #: ../admin/schedule.php:4
411
- msgid "Backups will be compressed and should be smaller than this."
412
- msgstr "Las copias de seguridad serán comprimidas y deberían ser más pequeñas que esto."
413
-
414
- #: ../classes/class-email.php:31
415
- msgid "Email notification"
416
- msgstr "Notificación de email"
417
-
418
- #: ../admin/schedule.php:19
419
- msgid "hourly on the hour"
420
- msgstr ""
421
-
422
- #: ../admin/schedule.php:25
423
- msgid "daily at %s"
424
- msgstr "diariamente a las %s"
425
-
426
- #: ../admin/schedule-form.php:41
427
- msgid "Number of backups to store on this server"
428
- msgstr "Número de copias de seguridad a almacenar en el servidor"
429
-
430
- #: ../admin/schedule-form.php:7
431
- msgid "Schedule Settings"
432
- msgstr "Configuración de frecuencia de copias de seguridad"
433
-
434
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
- msgid "Close"
436
- msgstr "Cerrar"
437
-
438
- #: ../admin/menu.php:69
439
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
- msgstr "La información indicadaes para la versión %1$s. Visita el archivo %2$s para ayuda específica sobre la versión %3$s."
441
-
442
- #: ../admin/constants.php:23
443
- msgid "The root directory that is backed up. Defaults to %s."
444
- msgstr "Directorio raíz. Por defecto %s."
445
-
446
- #: ../admin/constants.php:20
447
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
- msgstr "Capacidad que se usa al llamar %1$s. Valor predeterminado es %2$s."
449
-
450
- #: ../admin/constants.php:14
451
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
- msgstr "La ruta hacia tu %1$s ejecutable. Se utilizará para hacer el archivo comprimido zip de tu %2$s y %3$s si está disponible."
453
-
454
- #: ../backupwordpress.php:132
455
- msgid "BackUpWordPress requires WordPress version %s or greater."
456
- msgstr "BackUpWordPress necesita versión de WordPress %s o superior."
457
-
458
- #: ../backupwordpress.php:170 ../admin/actions.php:487
459
- msgid "Cancel"
460
- msgstr "Cancelar"
461
-
462
- #: ../admin/constants.php:11
463
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
- msgstr "La ruta hacia tu %1$s ejecutable. Se utilizará para la parte %2$s de la copia de seguridad si está disponible."
465
-
466
- #: ../admin/constants.php:8 ../admin/constants.php:11
467
- #: ../admin/constants.php:14 ../admin/constants.php:17
468
- #: ../admin/constants.php:20 ../admin/constants.php:23
469
- #: ../admin/constants.php:26 ../classes/class-email.php:54
470
- msgid "e.g."
471
- msgstr "ej."
472
-
473
- #: ../admin/constants.php:3
474
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
- msgstr "Puedes %1$s cualquiera de los %2$s en tu %3$s para controlar opciones avanzadas. %4$s. %5$s establecidas verán destacadas."
476
-
477
- #: ../admin/actions.php:250 ../admin/actions.php:256
478
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
- msgstr "%1$s estaá devolviendo una respuesta %2$s lo que podría significar que procesos Cron no se están ejecutado correctamente. BackUpWordPress no puede funcionar sin que wp-cron haga copias de seguridad en un proceso aparte. Consulta %3$s para más información."
480
-
481
- #: ../functions/interface.php:78
482
- msgid "http://php.net/manual/en/features.safe-mode.php"
483
- msgstr "http://www.php.net/manual/es/features.safe-mode.php"
484
-
485
- #: ../functions/interface.php:78
486
- msgid "Safe Mode"
487
- msgstr "Modo seguro"
488
-
489
- #: ../functions/interface.php:89
490
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
- msgstr "Tu directorio personalizado de copias de seguridad %1$s no existe y no puede ser creado. En su lugar, las copias de seguridad se guardarán en %2$s."
492
-
493
- #: ../functions/interface.php:100
494
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
- msgstr "Tu directorio personalizado de copias de seguridad %1$s no se puede escribir. En su lugar, las copias de seguridad se guardarán en %2$s."
496
-
497
- #: ../functions/interface.php:261
498
- msgid "cancel"
499
- msgstr "cancelar"
500
-
501
- #: ../functions/interface.php:265
502
- msgid "Settings"
503
- msgstr "Configuración"
504
-
505
- #: ../functions/interface.php:268
506
- msgid "Excludes"
507
- msgstr "Exclusiones"
508
-
509
- #: ../functions/interface.php:29
510
- msgid "Download"
511
- msgstr "Descargar"
512
-
513
- #: ../functions/interface.php:54 ../functions/interface.php:67
514
- msgid "BackUpWordPress is almost ready."
515
- msgstr "BackUpWordPress está casi listo."
516
-
517
- #: ../functions/interface.php:111
518
- msgid "BackUpWordPress detected issues with your last backup."
519
- msgstr "BackUpWordPress ha detectado problemas con tu última copia de seguridad."
520
-
521
- #: ../functions/interface.php:234
522
- msgid "Database and Files"
523
- msgstr "Base de datos y archivos"
524
-
525
- #: ../functions/interface.php:240
526
- msgid "Database"
527
- msgstr "Base de datos"
528
-
529
- #: ../admin/actions.php:250 ../admin/actions.php:256
530
- #: ../functions/interface.php:78 ../functions/interface.php:89
531
- #: ../functions/interface.php:100
532
- msgid "BackUpWordPress has detected a problem."
533
- msgstr "BackUpWordPress ha detectado un problema."
534
-
535
- #: ../admin/actions.php:342
536
- msgid "Backup type cannot be empty"
537
- msgstr "Tipo de copia de seguridad no puede estar vacío"
538
-
539
- #: ../admin/actions.php:345
540
- msgid "Invalid backup type"
541
- msgstr "Tipo de copia de seguridad no válido"
542
-
543
- #: ../admin/actions.php:357
544
- msgid "Schedule cannot be empty"
545
- msgstr "Debe indicar una programación"
546
-
547
- #: ../admin/actions.php:360
548
- msgid "Invalid schedule"
549
- msgstr "Programación no válida"
550
-
551
- #: ../admin/actions.php:375
552
- msgid "Max backups must be a number"
553
- msgstr "Máximas copias de seguridad debe ser un número"
554
-
555
- #: ../admin/actions.php:481
556
- msgid "%s didn't match any files."
557
- msgstr "%s no ah encontrado coincidencias."
558
-
559
- #: ../admin/backups.php:40
560
- msgid "add schedule"
561
- msgstr "añadir programa"
562
-
563
- #: ../admin/backups.php:71
564
- msgid "Size"
565
- msgstr "Tamaño"
566
-
567
- #: ../admin/backups.php:72
568
- msgid "Type"
569
- msgstr "Tipo"
570
-
571
- #: ../admin/backups.php:73
572
- msgid "Actions"
573
- msgstr "Acciones"
574
-
575
- #: ../admin/constants.php:3
576
- msgid "The Codex can help"
577
- msgstr "El Codex puede ayudar"
578
-
579
- #: ../admin/constants.php:8
580
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
- msgstr "Ruta a la carpeta en la que te gustaría almacenar tus copias de seguridad. Por defecto %s."
582
-
583
- #: ../admin/constants.php:11 ../admin/constants.php:14
584
- msgid "database"
585
- msgstr "base de datos"
586
-
587
- #: ../admin/constants.php:14
588
- msgid "files"
589
- msgstr "archivos"
590
-
591
- #: ../admin/constants.php:17
592
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
- msgstr "Lista de archivos o directorios a excluir en las copias de seguridad, separados por comas."
594
-
595
- #: ../admin/menu.php:10 ../admin/page.php:6
596
- msgid "Manage Backups"
597
- msgstr "Gestionar copias de seguridad"
598
-
599
- #: ../admin/menu.php:10 ../admin/menu.php:34
600
- msgid "Backups"
601
- msgstr "Copias de seguridad"
602
-
603
- #: ../admin/menu.php:69
604
- msgid "You are not using the latest stable version of BackUpWordPress"
605
- msgstr "No estás usando la última versión estable de BackUpWordPress"
606
-
607
- #: ../admin/menu.php:77
608
- msgid "FAQ"
609
- msgstr "Preguntas frecuentes (FAQ)"
610
-
611
- #: ../admin/constants.php:3 ../admin/menu.php:79
612
- msgid "Constants"
613
- msgstr "Constantes"
614
-
615
- #: ../admin/menu.php:82
616
- msgid "For more information:"
617
- msgstr "Para más información:"
618
-
619
- #: ../admin/menu.php:84
620
- msgid "Support Forums"
621
- msgstr "Foros de soporte"
622
-
623
- #: ../admin/menu.php:85
624
- msgid "Help with translation"
625
- msgstr "Ayuda en la traducción"
626
-
627
- #: ../admin/page.php:27
628
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
- msgstr "Necesitas arreglar los problemas detallados antes de poder comenzar BackUpWordPress."
630
-
631
- #: ../admin/schedule-form-excludes.php:17
632
- msgid "Preview"
633
- msgstr "Previsualizar"
634
-
635
- #: ../admin/schedule-form-excludes.php:29
636
- msgid "Exclude Rules"
637
- msgstr "Reglas de exclusión"
638
-
639
- #: ../admin/schedule-form-excludes.php:52
640
- msgid "Remove"
641
- msgstr "Eliminar"
642
-
643
- #: ../admin/schedule-form-excludes.php:71
644
- msgid "Excluded"
645
- msgstr "Excluído"
646
-
647
- #: ../admin/schedule-form-excludes.php:75
648
- msgid "Included"
649
- msgstr "Incluído"
650
-
651
- #: ../admin/schedule-form-excludes.php:79
652
- msgid "Unreadable"
653
- msgstr "No legible"
654
-
655
- #: ../admin/schedule-form-excludes.php:107
656
- msgid "Unreadable files can't be backed up"
657
- msgstr "No se puede hacer copia de seguridad de los archivos no legibles"
658
-
659
- #: ../admin/schedule-form-excludes.php:113
660
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
- msgstr "Tu sitio es %s. Las copias de seguridad se comprimirán y por tanto serán más pequeñas."
662
-
663
- #: ../admin/schedule-form.php:11
664
- msgid "Backup"
665
- msgstr "Copia de seguridad"
666
-
667
- #: ../admin/schedule-form.php:14
668
- msgid "Both Database &amp; files"
669
- msgstr "Base de datos y archivos"
670
-
671
- #: ../admin/schedule-form.php:15
672
- msgid "Files only"
673
- msgstr "Archivos sólo"
674
-
675
- #: ../admin/schedule-form.php:16
676
- msgid "Database only"
677
- msgstr "Base de datos sólo"
678
-
679
- #: ../functions/interface.php:237
680
- msgid "Files"
681
- msgstr "Archivos"
682
-
683
- #: ../admin/schedule-form-excludes.php:7
684
- msgid "Manage Excludes"
685
- msgstr "Gestiona las exclusiones"
686
-
687
- #: ../admin/schedule-form.php:23
688
- msgid "Schedule"
689
- msgstr "Programa"
690
-
691
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
- msgid "Update"
693
- msgstr "Actualizar"
694
-
695
- #: ../admin/schedule.php:19
696
- msgid "hourly at %s minutes past the hour"
697
- msgstr "cada hora, %s minutos después de las horas en punto"
698
-
699
- #: ../functions/interface.php:275
700
- msgid "Run now"
701
- msgstr "Ejecutar ahora"
702
-
703
- #: ../functions/interface.php:32 ../functions/interface.php:277
704
- msgid "Delete"
705
- msgstr "Eliminar"
706
-
707
- #: ../classes/class-email.php:164
708
- msgid "Backup of %s"
709
- msgstr "Copia de seguridad de %s"
710
-
711
- #: ../functions/core.php:334
712
- msgid "This %s file ensures that other people cannot download your backup files."
713
- msgstr "El archivo de seguridad %s evita que otros puedan descargar tus copias de seguridad."
1
+ # Translation of 2.x in Spanish (Spain)
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: es_ES\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr ""
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr ""
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr ""
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr ""
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr ""
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr ""
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr ""
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr ""
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr ""
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr ""
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr ""
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr ""
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr ""
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr ""
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr ""
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr ""
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr ""
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr ""
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr ""
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr ""
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr ""
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr ""
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr ""
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr ""
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr "Puedes enviar los detalles del error a %s para que sea investigado."
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr "Cada hora"
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr "Dos veces al día"
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr "A diario"
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr "Una vez al día"
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr "Cada quince días"
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr "Cada mes"
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr "Contacta con soporte"
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr "Nueva regla de exclusión"
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr "Esta es la respuesta del servidor"
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr "Si necesitas ayuda haz clic en la ayuda de la esquina superior derecha de esta página."
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr "Backup comenzando"
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr "Guardando la base de datos %s"
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr "Verificando la base de datos %s"
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr "Creando archivo comprimido %s"
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr "Verificando archivo comprimido %s"
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr "Finalizando copia de seguridad"
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr "BackUpWordPress podría no funcionar cuando php está funcionando con %s"
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr "%1$s está funcionando en %2$s. Por favor contacta con tu alojador para que lo deshabilite. BackUpWordPress podría no funcionar correctamente mienstra %3$s esté encendido."
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr "Hora a la que debe programarse. Por defecto %s."
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr "¿Estás seguro de que deseas eliminar esta programación? Todos sus copias de seguridad serán también eliminados."
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr "Cancela para volver atrás, OK para borrar."
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr "¿Estás seguro de que quieres eliminar esta copia de seguridad?"
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr "¿Estás seguro de que quieres eliminar esta regla?"
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr "Reduciendo el número de copias de seguridad disponibles en el servidor causará que algunas de las copias de seguridad sean eliminadas. ¿Estás seguro de que quieres continuar?"
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr "Máximas copias de seguridad no puede estar vacío"
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr "Máximas copias de seguridad debe ser mayor de 0"
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr "Excluír"
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr "defecto"
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr "definido"
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr "Sólo manual"
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr "esto no debería llevar mucho &hellip;"
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr "calculando el tamaño de tu sitio web&hellip;"
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr "La próxima copia de seguridad será el %1$s a las %2$s"
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr "cada 12 horas a %1$s &amp; %2$s"
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr "semanalmente los %1$s a las %2$s"
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr "quincenalmente los %1$s a las %2$s"
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr "el %1$s de cada mes a las %2$s"
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr "manualmente"
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr "este servidor"
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr "no almacenar ninguna copia de seguridad en %s"
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr "almacenar sólo la/las última/s %1$s copia de seguridad en %2$s"
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr ""
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr "BackUpWordPress no ha podido hacer una copia de seguridad de tu sitio %1$s."
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr "Estos son los errores encontrados:"
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr "Si los errores indicados te suenan a chino, reenvía este email a %3$s y le echaremos un vistazo"
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+ "Saludos,\n"
328
+ "El robot de BackUpWordPress"
329
+
330
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
331
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
332
+ msgstr "BackUpWordPress ha completado una copia de seguridad de tu sitio %1$s."
333
+
334
+ #: ../classes/class-email.php:169
335
+ msgid "The backup file should be attached to this email."
336
+ msgstr "El archivo debería estar adjunto a este email."
337
+
338
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
339
+ msgid "You can download the backup file by clicking the link below:"
340
+ msgstr "Puedes descargar el archivo haciendo clic en el enlace inferior:"
341
+
342
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
343
+ msgid ""
344
+ "Kind Regards,\n"
345
+ "The Happy BackUpWordPress Backup Emailing Robot"
346
+ msgstr ""
347
+ "Saludos,\n"
348
+ "El robot de BackUpWordPress"
349
+
350
+ #: ../classes/class-email.php:178
351
+ msgid "Unfortunately the backup file was too large to attach to this email."
352
+ msgstr "Desgraciadamente el archivo de copia de seguridad es demasiado grande para adjuntarlo a este email."
353
+
354
+ #: ../classes/wp-cli.php:19
355
+ msgid "Backup: Dumping database..."
356
+ msgstr ""
357
+
358
+ #: ../classes/wp-cli.php:23
359
+ msgid "Backup: Zipping everything up..."
360
+ msgstr "Copia de seguridad: Comprimiendo ..."
361
+
362
+ #: ../classes/wp-cli.php:38
363
+ msgid "Invalid backup path"
364
+ msgstr "Ruta de copia de seguridad no válida"
365
+
366
+ #: ../classes/wp-cli.php:43
367
+ msgid "Invalid root path"
368
+ msgstr "Ruta de raíz no válida"
369
+
370
+ #: ../classes/wp-cli.php:68
371
+ msgid "Backup Complete: "
372
+ msgstr "Copia de seguridad completada:"
373
+
374
+ #: ../classes/wp-cli.php:71
375
+ msgid "Backup Failed"
376
+ msgstr "La copia de seguridad ha fallado"
377
+
378
+ #: ../functions/core.php:229
379
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
380
+ msgstr "Por defecto BackUpWordPress realiza automáticamente una copia de seguridad de la base de datos diaria y semanal. Puedes modificar la configuración."
381
+
382
+ #: ../functions/interface.php:245
383
+ msgid "Legacy"
384
+ msgstr "Heredado"
385
+
386
+ #: ../functions/interface.php:67
387
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
388
+ msgstr "El directorio de copias de seguridad no se puede escribir. Ejecuta %1$s o %2$s o establece los permisos."
389
+
390
+ #: ../functions/interface.php:54
391
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
392
+ msgstr "El directorio de copias de seguridad no se puede crear porque el directorio %1$s no se puede escribir. Ejecuta %1$s o %2$s o establece los permisos."
393
+
394
+ #: ../functions/core.php:229
395
+ msgid "BackUpWordPress has setup your default schedules."
396
+ msgstr "BackUpWordPress ha configurado tus ajustes por defecto."
397
+
398
+ #: ../classes/class-email.php:154
399
+ msgid "Backup of %s Failed"
400
+ msgstr "La copia de seguridad de %s ha fallado"
401
+
402
+ #: ../classes/class-email.php:69
403
+ msgid "Send an email notification to %s"
404
+ msgstr "Enviar un email de notificación a %s"
405
+
406
+ #: ../classes/class-email.php:100
407
+ msgid "%s isn't a valid email"
408
+ msgstr "%s no es un email válido"
409
+
410
+ #: ../admin/schedule.php:4
411
+ msgid "Backups will be compressed and should be smaller than this."
412
+ msgstr "Las copias de seguridad serán comprimidas y deberían ser más pequeñas que esto."
413
+
414
+ #: ../classes/class-email.php:31
415
+ msgid "Email notification"
416
+ msgstr "Notificación de email"
417
+
418
+ #: ../admin/schedule.php:19
419
+ msgid "hourly on the hour"
420
+ msgstr ""
421
+
422
+ #: ../admin/schedule.php:25
423
+ msgid "daily at %s"
424
+ msgstr "diariamente a las %s"
425
+
426
+ #: ../admin/schedule-form.php:41
427
+ msgid "Number of backups to store on this server"
428
+ msgstr "Número de copias de seguridad a almacenar en el servidor"
429
+
430
+ #: ../admin/schedule-form.php:7
431
+ msgid "Schedule Settings"
432
+ msgstr "Configuración de frecuencia de copias de seguridad"
433
+
434
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
435
+ msgid "Close"
436
+ msgstr "Cerrar"
437
+
438
+ #: ../admin/menu.php:69
439
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
440
+ msgstr "La información indicadaes para la versión %1$s. Visita el archivo %2$s para ayuda específica sobre la versión %3$s."
441
+
442
+ #: ../admin/constants.php:23
443
+ msgid "The root directory that is backed up. Defaults to %s."
444
+ msgstr "Directorio raíz. Por defecto %s."
445
+
446
+ #: ../admin/constants.php:20
447
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
448
+ msgstr "Capacidad que se usa al llamar %1$s. Valor predeterminado es %2$s."
449
+
450
+ #: ../admin/constants.php:14
451
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
452
+ msgstr "La ruta hacia tu %1$s ejecutable. Se utilizará para hacer el archivo comprimido zip de tu %2$s y %3$s si está disponible."
453
+
454
+ #: ../backupwordpress.php:132
455
+ msgid "BackUpWordPress requires WordPress version %s or greater."
456
+ msgstr "BackUpWordPress necesita versión de WordPress %s o superior."
457
+
458
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
459
+ msgid "Cancel"
460
+ msgstr "Cancelar"
461
+
462
+ #: ../admin/constants.php:11
463
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
464
+ msgstr "La ruta hacia tu %1$s ejecutable. Se utilizará para la parte %2$s de la copia de seguridad si está disponible."
465
+
466
+ #: ../admin/constants.php:8 ../admin/constants.php:11
467
+ #: ../admin/constants.php:14 ../admin/constants.php:17
468
+ #: ../admin/constants.php:20 ../admin/constants.php:23
469
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
470
+ msgid "e.g."
471
+ msgstr "ej."
472
+
473
+ #: ../admin/constants.php:3
474
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
475
+ msgstr "Puedes %1$s cualquiera de los %2$s en tu %3$s para controlar opciones avanzadas. %4$s. %5$s establecidas verán destacadas."
476
+
477
+ #: ../admin/actions.php:250 ../admin/actions.php:256
478
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
479
+ msgstr "%1$s estaá devolviendo una respuesta %2$s lo que podría significar que procesos Cron no se están ejecutado correctamente. BackUpWordPress no puede funcionar sin que wp-cron haga copias de seguridad en un proceso aparte. Consulta %3$s para más información."
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "http://php.net/manual/en/features.safe-mode.php"
483
+ msgstr "http://www.php.net/manual/es/features.safe-mode.php"
484
+
485
+ #: ../functions/interface.php:78
486
+ msgid "Safe Mode"
487
+ msgstr "Modo seguro"
488
+
489
+ #: ../functions/interface.php:89
490
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
491
+ msgstr "Tu directorio personalizado de copias de seguridad %1$s no existe y no puede ser creado. En su lugar, las copias de seguridad se guardarán en %2$s."
492
+
493
+ #: ../functions/interface.php:100
494
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
495
+ msgstr "Tu directorio personalizado de copias de seguridad %1$s no se puede escribir. En su lugar, las copias de seguridad se guardarán en %2$s."
496
+
497
+ #: ../functions/interface.php:261
498
+ msgid "cancel"
499
+ msgstr "cancelar"
500
+
501
+ #: ../functions/interface.php:265
502
+ msgid "Settings"
503
+ msgstr "Configuración"
504
+
505
+ #: ../functions/interface.php:268
506
+ msgid "Excludes"
507
+ msgstr "Exclusiones"
508
+
509
+ #: ../functions/interface.php:29
510
+ msgid "Download"
511
+ msgstr "Descargar"
512
+
513
+ #: ../functions/interface.php:54 ../functions/interface.php:67
514
+ msgid "BackUpWordPress is almost ready."
515
+ msgstr "BackUpWordPress está casi listo."
516
+
517
+ #: ../functions/interface.php:111
518
+ msgid "BackUpWordPress detected issues with your last backup."
519
+ msgstr "BackUpWordPress ha detectado problemas con tu última copia de seguridad."
520
+
521
+ #: ../functions/interface.php:234
522
+ msgid "Database and Files"
523
+ msgstr "Base de datos y archivos"
524
+
525
+ #: ../functions/interface.php:240
526
+ msgid "Database"
527
+ msgstr "Base de datos"
528
+
529
+ #: ../admin/actions.php:250 ../admin/actions.php:256
530
+ #: ../functions/interface.php:78 ../functions/interface.php:89
531
+ #: ../functions/interface.php:100
532
+ msgid "BackUpWordPress has detected a problem."
533
+ msgstr "BackUpWordPress ha detectado un problema."
534
+
535
+ #: ../admin/actions.php:342
536
+ msgid "Backup type cannot be empty"
537
+ msgstr "Tipo de copia de seguridad no puede estar vacío"
538
+
539
+ #: ../admin/actions.php:345
540
+ msgid "Invalid backup type"
541
+ msgstr "Tipo de copia de seguridad no válido"
542
+
543
+ #: ../admin/actions.php:357
544
+ msgid "Schedule cannot be empty"
545
+ msgstr "Debe indicar una programación"
546
+
547
+ #: ../admin/actions.php:360
548
+ msgid "Invalid schedule"
549
+ msgstr "Programación no válida"
550
+
551
+ #: ../admin/actions.php:375
552
+ msgid "Max backups must be a number"
553
+ msgstr "Máximas copias de seguridad debe ser un número"
554
+
555
+ #: ../admin/actions.php:481
556
+ msgid "%s didn't match any files."
557
+ msgstr "%s no ah encontrado coincidencias."
558
+
559
+ #: ../admin/backups.php:40
560
+ msgid "add schedule"
561
+ msgstr "añadir programa"
562
+
563
+ #: ../admin/backups.php:71
564
+ msgid "Size"
565
+ msgstr "Tamaño"
566
+
567
+ #: ../admin/backups.php:72
568
+ msgid "Type"
569
+ msgstr "Tipo"
570
+
571
+ #: ../admin/backups.php:73
572
+ msgid "Actions"
573
+ msgstr "Acciones"
574
+
575
+ #: ../admin/constants.php:3
576
+ msgid "The Codex can help"
577
+ msgstr "El Codex puede ayudar"
578
+
579
+ #: ../admin/constants.php:8
580
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
581
+ msgstr "Ruta a la carpeta en la que te gustaría almacenar tus copias de seguridad. Por defecto %s."
582
+
583
+ #: ../admin/constants.php:11 ../admin/constants.php:14
584
+ msgid "database"
585
+ msgstr "base de datos"
586
+
587
+ #: ../admin/constants.php:14
588
+ msgid "files"
589
+ msgstr "archivos"
590
+
591
+ #: ../admin/constants.php:17
592
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
593
+ msgstr "Lista de archivos o directorios a excluir en las copias de seguridad, separados por comas."
594
+
595
+ #: ../admin/menu.php:10 ../admin/page.php:6
596
+ msgid "Manage Backups"
597
+ msgstr "Gestionar copias de seguridad"
598
+
599
+ #: ../admin/menu.php:10 ../admin/menu.php:34
600
+ msgid "Backups"
601
+ msgstr "Copias de seguridad"
602
+
603
+ #: ../admin/menu.php:69
604
+ msgid "You are not using the latest stable version of BackUpWordPress"
605
+ msgstr "No estás usando la última versión estable de BackUpWordPress"
606
+
607
+ #: ../admin/menu.php:77
608
+ msgid "FAQ"
609
+ msgstr "Preguntas frecuentes (FAQ)"
610
+
611
+ #: ../admin/constants.php:3 ../admin/menu.php:79
612
+ msgid "Constants"
613
+ msgstr "Constantes"
614
+
615
+ #: ../admin/menu.php:82
616
+ msgid "For more information:"
617
+ msgstr "Para más información:"
618
+
619
+ #: ../admin/menu.php:84
620
+ msgid "Support Forums"
621
+ msgstr "Foros de soporte"
622
+
623
+ #: ../admin/menu.php:85
624
+ msgid "Help with translation"
625
+ msgstr "Ayuda en la traducción"
626
+
627
+ #: ../admin/page.php:27
628
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
629
+ msgstr "Necesitas arreglar los problemas detallados antes de poder comenzar BackUpWordPress."
630
+
631
+ #: ../admin/schedule-form-excludes.php:17
632
+ msgid "Preview"
633
+ msgstr "Previsualizar"
634
+
635
+ #: ../admin/schedule-form-excludes.php:29
636
+ msgid "Exclude Rules"
637
+ msgstr "Reglas de exclusión"
638
+
639
+ #: ../admin/schedule-form-excludes.php:52
640
+ msgid "Remove"
641
+ msgstr "Eliminar"
642
+
643
+ #: ../admin/schedule-form-excludes.php:71
644
+ msgid "Excluded"
645
+ msgstr "Excluído"
646
+
647
+ #: ../admin/schedule-form-excludes.php:75
648
+ msgid "Included"
649
+ msgstr "Incluído"
650
+
651
+ #: ../admin/schedule-form-excludes.php:79
652
+ msgid "Unreadable"
653
+ msgstr "No legible"
654
+
655
+ #: ../admin/schedule-form-excludes.php:107
656
+ msgid "Unreadable files can't be backed up"
657
+ msgstr "No se puede hacer copia de seguridad de los archivos no legibles"
658
+
659
+ #: ../admin/schedule-form-excludes.php:113
660
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
661
+ msgstr "Tu sitio es %s. Las copias de seguridad se comprimirán y por tanto serán más pequeñas."
662
+
663
+ #: ../admin/schedule-form.php:11
664
+ msgid "Backup"
665
+ msgstr "Copia de seguridad"
666
+
667
+ #: ../admin/schedule-form.php:14
668
+ msgid "Both Database &amp; files"
669
+ msgstr "Base de datos y archivos"
670
+
671
+ #: ../admin/schedule-form.php:15
672
+ msgid "Files only"
673
+ msgstr "Archivos sólo"
674
+
675
+ #: ../admin/schedule-form.php:16
676
+ msgid "Database only"
677
+ msgstr "Base de datos sólo"
678
+
679
+ #: ../functions/interface.php:237
680
+ msgid "Files"
681
+ msgstr "Archivos"
682
+
683
+ #: ../admin/schedule-form-excludes.php:7
684
+ msgid "Manage Excludes"
685
+ msgstr "Gestiona las exclusiones"
686
+
687
+ #: ../admin/schedule-form.php:23
688
+ msgid "Schedule"
689
+ msgstr "Programa"
690
+
691
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
692
+ msgid "Update"
693
+ msgstr "Actualizar"
694
+
695
+ #: ../admin/schedule.php:19
696
+ msgid "hourly at %s minutes past the hour"
697
+ msgstr "cada hora, %s minutos después de las horas en punto"
698
+
699
+ #: ../functions/interface.php:275
700
+ msgid "Run now"
701
+ msgstr "Ejecutar ahora"
702
+
703
+ #: ../functions/interface.php:32 ../functions/interface.php:277
704
+ msgid "Delete"
705
+ msgstr "Eliminar"
706
+
707
+ #: ../classes/class-email.php:164
708
+ msgid "Backup of %s"
709
+ msgstr "Copia de seguridad de %s"
710
+
711
+ #: ../functions/core.php:334
712
+ msgid "This %s file ensures that other people cannot download your backup files."
713
+ msgstr "El archivo de seguridad %s evita que otros puedan descargar tus copias de seguridad."
languages/backupwordpress-eu.po CHANGED
@@ -1,709 +1,709 @@
1
- # Translation of 2.x in Basque
2
- # This file is distributed under the same license as the 2.x package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
- "X-Generator: Poedit 1.8.2\n"
11
- "Project-Id-Version: 2.x\n"
12
- "POT-Creation-Date: \n"
13
- "Last-Translator: \n"
14
- "Language-Team: \n"
15
- "Language: eu\n"
16
-
17
- #: ../backupwordpress.php:119
18
- msgid "BackUpWordPress requires PHP version %s or greater."
19
- msgstr ""
20
-
21
- #: ../admin/backups.php:100
22
- msgid "This is where your backups will appear once you have some."
23
- msgstr ""
24
-
25
- #: ../admin/backups.php:120
26
- msgid "% Backups Completed"
27
- msgstr ""
28
-
29
- #: ../admin/backups.php:122
30
- msgid "No Backups Completed"
31
- msgstr ""
32
-
33
- #: ../admin/backups.php:124
34
- msgid "1 Backup Completed"
35
- msgstr ""
36
-
37
- #: ../admin/enable-support.php:3
38
- msgid "Enable BackUpWordPress Support"
39
- msgstr ""
40
-
41
- #: ../admin/enable-support.php:5
42
- msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
- msgstr ""
44
-
45
- #: ../admin/enable-support.php:58
46
- msgid "You can disable support in the future by deactivating BackUpWordPress."
47
- msgstr ""
48
-
49
- #: ../admin/enable-support.php:68
50
- msgid "No thanks"
51
- msgstr ""
52
-
53
- #: ../admin/enable-support.php:70
54
- msgid "Yes I want to enable support"
55
- msgstr ""
56
-
57
- #: ../admin/page.php:10
58
- msgid "Support"
59
- msgstr ""
60
-
61
- #: ../admin/page.php:31
62
- msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
- msgstr ""
64
-
65
- #: ../admin/page.php:35
66
- msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
- msgstr ""
68
-
69
- #: ../admin/schedule-form-excludes.php:19
70
- msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
- msgstr ""
72
-
73
- #: ../admin/schedule-form.php:45
74
- msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
- msgstr ""
76
-
77
- #: ../admin/schedule.php:78
78
- msgid "store only the last backup on %s"
79
- msgstr ""
80
-
81
- #: ../admin/schedule.php:118
82
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
- msgstr ""
84
-
85
- #: ../classes/class-schedule.php:239
86
- msgid "Argument 1 for %s must be a valid integer"
87
- msgstr ""
88
-
89
- #: ../classes/class-schedule.php:491
90
- msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
- msgstr ""
92
-
93
- #: ../classes/class-schedule.php:811
94
- msgid "Argument 1 for %s must be a non empty string"
95
- msgstr ""
96
-
97
- #: ../classes/class-schedule.php:815
98
- msgid "%s dpesn't exist"
99
- msgstr ""
100
-
101
- #: ../classes/class-schedule.php:819
102
- msgid "That backup wasn't created by this schedule"
103
- msgstr ""
104
-
105
- #: ../classes/class-services.php:252
106
- msgid "Argument 1 for %s must be a valid filepath"
107
- msgstr ""
108
-
109
- #: ../classes/class-services.php:267
110
- msgid "Argument 1 for %s must be a registered service"
111
- msgstr ""
112
-
113
- #: ../classes/class-services.php:284
114
- msgid "Argument 1 for %s must be a valid class"
115
- msgstr ""
116
-
117
- #: ../functions/core.php:269
118
- msgid "You can only delete directories inside your WordPress installation"
119
- msgstr ""
120
-
121
- #: ../admin/actions.php:508
122
- msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
- msgstr ""
124
-
125
- #: ../admin/actions.php:512
126
- msgid "Your backup failed"
127
- msgstr ""
128
-
129
- #: ../classes/class-email.php:35
130
- msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
- msgstr ""
132
-
133
- #: ../classes/class-email.php:54
134
- msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
- msgstr ""
136
-
137
- #: ../admin/actions.php:520
138
- msgid "You can email details of this error to %s so they can look into the issue."
139
- msgstr ""
140
-
141
- #: ../functions/core.php:246
142
- msgid "Once Hourly"
143
- msgstr ""
144
-
145
- #: ../functions/core.php:247
146
- msgid "Twice Daily"
147
- msgstr ""
148
-
149
- #: ../functions/core.php:248
150
- msgid "Once Daily"
151
- msgstr ""
152
-
153
- #: ../functions/core.php:249
154
- msgid "Once Weekly"
155
- msgstr ""
156
-
157
- #: ../functions/core.php:250
158
- msgid "Once Fortnightly"
159
- msgstr ""
160
-
161
- #: ../functions/core.php:251
162
- msgid "Once Monthly"
163
- msgstr ""
164
-
165
- #: ../admin/actions.php:524
166
- msgid "Email to Support"
167
- msgstr ""
168
-
169
- #: ../admin/schedule-form-excludes.php:13
170
- msgid "New Exclude Rule[s]"
171
- msgstr ""
172
-
173
- #: ../admin/actions.php:516
174
- msgid "Here's the response from the server:"
175
- msgstr ""
176
-
177
- #: ../admin/page.php:33
178
- msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
- msgstr ""
180
-
181
- #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
- msgid "Starting Backup"
183
- msgstr ""
184
-
185
- #: ../classes/class-schedule.php:686
186
- msgid "Dumping Database %s"
187
- msgstr ""
188
-
189
- #: ../classes/class-schedule.php:691
190
- msgid "Verifying Database Dump %s"
191
- msgstr ""
192
-
193
- #: ../classes/class-schedule.php:696
194
- msgid "Creating zip archive %s"
195
- msgstr ""
196
-
197
- #: ../classes/class-schedule.php:701
198
- msgid "Verifying Zip Archive %s"
199
- msgstr ""
200
-
201
- #: ../classes/class-schedule.php:706
202
- msgid "Finishing Backup"
203
- msgstr ""
204
-
205
- #: ../classes/wp-cli.php:16
206
- msgid "BackUpWordPress may not work when php is running with %s on"
207
- msgstr ""
208
-
209
- #: ../functions/interface.php:78
210
- msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
- msgstr ""
212
-
213
- #: ../admin/constants.php:26
214
- msgid "The time that your schedules should run. Defaults to %s."
215
- msgstr ""
216
-
217
- #: ../backupwordpress.php:171
218
- msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
- msgstr ""
220
-
221
- #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
- #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
- msgid "'Cancel' to go back, 'OK' to delete."
224
- msgstr ""
225
-
226
- #: ../backupwordpress.php:172
227
- msgid "Are you sure you want to delete this backup?"
228
- msgstr ""
229
-
230
- #: ../backupwordpress.php:173
231
- msgid "Are you sure you want to remove this exclude rule?"
232
- msgstr ""
233
-
234
- #: ../backupwordpress.php:174
235
- msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
- msgstr ""
237
-
238
- #: ../admin/actions.php:372
239
- msgid "Max backups can't be empty"
240
- msgstr ""
241
-
242
- #: ../admin/actions.php:378
243
- msgid "Max backups must be greater than 0"
244
- msgstr ""
245
-
246
- #: ../admin/actions.php:486
247
- msgid "Exclude"
248
- msgstr ""
249
-
250
- #: ../admin/schedule-form-excludes.php:44
251
- msgid "default"
252
- msgstr ""
253
-
254
- #: ../admin/schedule-form-excludes.php:48
255
- msgid "defined"
256
- msgstr ""
257
-
258
- #: ../admin/schedule-form.php:27
259
- msgid "Manual Only"
260
- msgstr ""
261
-
262
- #: ../admin/schedule.php:4
263
- msgid "this shouldn't take long&hellip;"
264
- msgstr ""
265
-
266
- #: ../admin/schedule.php:4
267
- msgid "calculating the size of your site&hellip;"
268
- msgstr ""
269
-
270
- #: ../admin/schedule.php:12
271
- msgid "The next backup will be on %1$s at %2$s"
272
- msgstr ""
273
-
274
- #: ../admin/schedule.php:37
275
- msgid "every 12 hours at %1$s &amp; %2$s"
276
- msgstr ""
277
-
278
- #: ../admin/schedule.php:43
279
- msgid "weekly on %1$s at %2$s"
280
- msgstr ""
281
-
282
- #: ../admin/schedule.php:49
283
- msgid "fortnightly on %1$s at %2$s"
284
- msgstr ""
285
-
286
- #: ../admin/schedule.php:56
287
- msgid "on the %1$s of each month at %2$s"
288
- msgstr ""
289
-
290
- #: ../admin/schedule.php:62
291
- msgid "manually"
292
- msgstr ""
293
-
294
- #: ../admin/schedule.php:71
295
- msgid "this server"
296
- msgstr ""
297
-
298
- #: ../admin/schedule.php:84
299
- msgid "don't store any backups on %s"
300
- msgstr ""
301
-
302
- #: ../admin/schedule.php:90
303
- msgid "store only the last %1$s backups on %2$s"
304
- msgstr ""
305
-
306
- #: ../admin/schedule.php:120
307
- msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
- msgstr ""
309
-
310
- #: ../classes/class-email.php:156
311
- msgid "BackUpWordPress was unable to backup your site %1$s."
312
- msgstr ""
313
-
314
- #: ../classes/class-email.php:156
315
- msgid "Here are the errors that we're encountered:"
316
- msgstr ""
317
-
318
- #: ../classes/class-email.php:156
319
- msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
- msgstr ""
321
-
322
- #: ../classes/class-email.php:156
323
- msgid ""
324
- "Kind Regards,\n"
325
- "The Apologetic BackUpWordPress Backup Emailing Robot"
326
- msgstr ""
327
-
328
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
329
- msgid "BackUpWordPress has completed a backup of your site %1$s."
330
- msgstr ""
331
-
332
- #: ../classes/class-email.php:169
333
- msgid "The backup file should be attached to this email."
334
- msgstr ""
335
-
336
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
337
- msgid "You can download the backup file by clicking the link below:"
338
- msgstr ""
339
-
340
- #: ../classes/class-email.php:169 ../classes/class-email.php:178
341
- msgid ""
342
- "Kind Regards,\n"
343
- "The Happy BackUpWordPress Backup Emailing Robot"
344
- msgstr ""
345
-
346
- #: ../classes/class-email.php:178
347
- msgid "Unfortunately the backup file was too large to attach to this email."
348
- msgstr ""
349
-
350
- #: ../classes/wp-cli.php:19
351
- msgid "Backup: Dumping database..."
352
- msgstr ""
353
-
354
- #: ../classes/wp-cli.php:23
355
- msgid "Backup: Zipping everything up..."
356
- msgstr ""
357
-
358
- #: ../classes/wp-cli.php:38
359
- msgid "Invalid backup path"
360
- msgstr ""
361
-
362
- #: ../classes/wp-cli.php:43
363
- msgid "Invalid root path"
364
- msgstr ""
365
-
366
- #: ../classes/wp-cli.php:68
367
- msgid "Backup Complete: "
368
- msgstr ""
369
-
370
- #: ../classes/wp-cli.php:71
371
- msgid "Backup Failed"
372
- msgstr ""
373
-
374
- #: ../functions/core.php:229
375
- msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
376
- msgstr ""
377
-
378
- #: ../functions/interface.php:245
379
- msgid "Legacy"
380
- msgstr ""
381
-
382
- #: ../functions/interface.php:67
383
- msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
384
- msgstr ""
385
-
386
- #: ../functions/interface.php:54
387
- msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
388
- msgstr ""
389
-
390
- #: ../functions/core.php:229
391
- msgid "BackUpWordPress has setup your default schedules."
392
- msgstr ""
393
-
394
- #: ../classes/class-email.php:154
395
- msgid "Backup of %s Failed"
396
- msgstr ""
397
-
398
- #: ../classes/class-email.php:69
399
- msgid "Send an email notification to %s"
400
- msgstr ""
401
-
402
- #: ../classes/class-email.php:100
403
- msgid "%s isn't a valid email"
404
- msgstr ""
405
-
406
- #: ../admin/schedule.php:4
407
- msgid "Backups will be compressed and should be smaller than this."
408
- msgstr ""
409
-
410
- #: ../classes/class-email.php:31
411
- msgid "Email notification"
412
- msgstr ""
413
-
414
- #: ../admin/schedule.php:19
415
- msgid "hourly on the hour"
416
- msgstr ""
417
-
418
- #: ../admin/schedule.php:25
419
- msgid "daily at %s"
420
- msgstr ""
421
-
422
- #: ../admin/schedule-form.php:41
423
- msgid "Number of backups to store on this server"
424
- msgstr ""
425
-
426
- #: ../admin/schedule-form.php:7
427
- msgid "Schedule Settings"
428
- msgstr ""
429
-
430
- #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
431
- msgid "Close"
432
- msgstr ""
433
-
434
- #: ../admin/menu.php:69
435
- msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
436
- msgstr ""
437
-
438
- #: ../admin/constants.php:23
439
- msgid "The root directory that is backed up. Defaults to %s."
440
- msgstr ""
441
-
442
- #: ../admin/constants.php:20
443
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
444
- msgstr ""
445
-
446
- #: ../admin/constants.php:14
447
- msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
448
- msgstr ""
449
-
450
- #: ../backupwordpress.php:132
451
- msgid "BackUpWordPress requires WordPress version %s or greater."
452
- msgstr ""
453
-
454
- #: ../backupwordpress.php:170 ../admin/actions.php:487
455
- msgid "Cancel"
456
- msgstr ""
457
-
458
- #: ../admin/constants.php:11
459
- msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
460
- msgstr ""
461
-
462
- #: ../admin/constants.php:8 ../admin/constants.php:11
463
- #: ../admin/constants.php:14 ../admin/constants.php:17
464
- #: ../admin/constants.php:20 ../admin/constants.php:23
465
- #: ../admin/constants.php:26 ../classes/class-email.php:54
466
- msgid "e.g."
467
- msgstr ""
468
-
469
- #: ../admin/constants.php:3
470
- msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
471
- msgstr ""
472
-
473
- #: ../admin/actions.php:250 ../admin/actions.php:256
474
- msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
475
- msgstr ""
476
-
477
- #: ../functions/interface.php:78
478
- msgid "http://php.net/manual/en/features.safe-mode.php"
479
- msgstr ""
480
-
481
- #: ../functions/interface.php:78
482
- msgid "Safe Mode"
483
- msgstr ""
484
-
485
- #: ../functions/interface.php:89
486
- msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
487
- msgstr ""
488
-
489
- #: ../functions/interface.php:100
490
- msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
491
- msgstr ""
492
-
493
- #: ../functions/interface.php:261
494
- msgid "cancel"
495
- msgstr ""
496
-
497
- #: ../functions/interface.php:265
498
- msgid "Settings"
499
- msgstr ""
500
-
501
- #: ../functions/interface.php:268
502
- msgid "Excludes"
503
- msgstr ""
504
-
505
- #: ../functions/interface.php:29
506
- msgid "Download"
507
- msgstr ""
508
-
509
- #: ../functions/interface.php:54 ../functions/interface.php:67
510
- msgid "BackUpWordPress is almost ready."
511
- msgstr ""
512
-
513
- #: ../functions/interface.php:111
514
- msgid "BackUpWordPress detected issues with your last backup."
515
- msgstr ""
516
-
517
- #: ../functions/interface.php:234
518
- msgid "Database and Files"
519
- msgstr ""
520
-
521
- #: ../functions/interface.php:240
522
- msgid "Database"
523
- msgstr ""
524
-
525
- #: ../admin/actions.php:250 ../admin/actions.php:256
526
- #: ../functions/interface.php:78 ../functions/interface.php:89
527
- #: ../functions/interface.php:100
528
- msgid "BackUpWordPress has detected a problem."
529
- msgstr ""
530
-
531
- #: ../admin/actions.php:342
532
- msgid "Backup type cannot be empty"
533
- msgstr ""
534
-
535
- #: ../admin/actions.php:345
536
- msgid "Invalid backup type"
537
- msgstr ""
538
-
539
- #: ../admin/actions.php:357
540
- msgid "Schedule cannot be empty"
541
- msgstr ""
542
-
543
- #: ../admin/actions.php:360
544
- msgid "Invalid schedule"
545
- msgstr ""
546
-
547
- #: ../admin/actions.php:375
548
- msgid "Max backups must be a number"
549
- msgstr ""
550
-
551
- #: ../admin/actions.php:481
552
- msgid "%s didn't match any files."
553
- msgstr ""
554
-
555
- #: ../admin/backups.php:40
556
- msgid "add schedule"
557
- msgstr ""
558
-
559
- #: ../admin/backups.php:71
560
- msgid "Size"
561
- msgstr ""
562
-
563
- #: ../admin/backups.php:72
564
- msgid "Type"
565
- msgstr ""
566
-
567
- #: ../admin/backups.php:73
568
- msgid "Actions"
569
- msgstr ""
570
-
571
- #: ../admin/constants.php:3
572
- msgid "The Codex can help"
573
- msgstr ""
574
-
575
- #: ../admin/constants.php:8
576
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
577
- msgstr ""
578
-
579
- #: ../admin/constants.php:11 ../admin/constants.php:14
580
- msgid "database"
581
- msgstr ""
582
-
583
- #: ../admin/constants.php:14
584
- msgid "files"
585
- msgstr ""
586
-
587
- #: ../admin/constants.php:17
588
- msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
589
- msgstr ""
590
-
591
- #: ../admin/menu.php:10 ../admin/page.php:6
592
- msgid "Manage Backups"
593
- msgstr ""
594
-
595
- #: ../admin/menu.php:10 ../admin/menu.php:34
596
- msgid "Backups"
597
- msgstr ""
598
-
599
- #: ../admin/menu.php:69
600
- msgid "You are not using the latest stable version of BackUpWordPress"
601
- msgstr ""
602
-
603
- #: ../admin/menu.php:77
604
- msgid "FAQ"
605
- msgstr ""
606
-
607
- #: ../admin/constants.php:3 ../admin/menu.php:79
608
- msgid "Constants"
609
- msgstr ""
610
-
611
- #: ../admin/menu.php:82
612
- msgid "For more information:"
613
- msgstr ""
614
-
615
- #: ../admin/menu.php:84
616
- msgid "Support Forums"
617
- msgstr ""
618
-
619
- #: ../admin/menu.php:85
620
- msgid "Help with translation"
621
- msgstr ""
622
-
623
- #: ../admin/page.php:27
624
- msgid "You need to fix the issues detailed above before BackUpWordPress can start."
625
- msgstr ""
626
-
627
- #: ../admin/schedule-form-excludes.php:17
628
- msgid "Preview"
629
- msgstr ""
630
-
631
- #: ../admin/schedule-form-excludes.php:29
632
- msgid "Exclude Rules"
633
- msgstr ""
634
-
635
- #: ../admin/schedule-form-excludes.php:52
636
- msgid "Remove"
637
- msgstr ""
638
-
639
- #: ../admin/schedule-form-excludes.php:71
640
- msgid "Excluded"
641
- msgstr ""
642
-
643
- #: ../admin/schedule-form-excludes.php:75
644
- msgid "Included"
645
- msgstr ""
646
-
647
- #: ../admin/schedule-form-excludes.php:79
648
- msgid "Unreadable"
649
- msgstr ""
650
-
651
- #: ../admin/schedule-form-excludes.php:107
652
- msgid "Unreadable files can't be backed up"
653
- msgstr ""
654
-
655
- #: ../admin/schedule-form-excludes.php:113
656
- msgid "Your site is %s. Backups will be compressed and so will be smaller."
657
- msgstr ""
658
-
659
- #: ../admin/schedule-form.php:11
660
- msgid "Backup"
661
- msgstr ""
662
-
663
- #: ../admin/schedule-form.php:14
664
- msgid "Both Database &amp; files"
665
- msgstr ""
666
-
667
- #: ../admin/schedule-form.php:15
668
- msgid "Files only"
669
- msgstr ""
670
-
671
- #: ../admin/schedule-form.php:16
672
- msgid "Database only"
673
- msgstr ""
674
-
675
- #: ../functions/interface.php:237
676
- msgid "Files"
677
- msgstr ""
678
-
679
- #: ../admin/schedule-form-excludes.php:7
680
- msgid "Manage Excludes"
681
- msgstr ""
682
-
683
- #: ../admin/schedule-form.php:23
684
- msgid "Schedule"
685
- msgstr ""
686
-
687
- #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
688
- msgid "Update"
689
- msgstr ""
690
-
691
- #: ../admin/schedule.php:19
692
- msgid "hourly at %s minutes past the hour"
693
- msgstr ""
694
-
695
- #: ../functions/interface.php:275
696
- msgid "Run now"
697
- msgstr ""
698
-
699
- #: ../functions/interface.php:32 ../functions/interface.php:277
700
- msgid "Delete"
701
- msgstr ""
702
-
703
- #: ../classes/class-email.php:164
704
- msgid "Backup of %s"
705
- msgstr ""
706
-
707
- #: ../functions/core.php:334
708
- msgid "This %s file ensures that other people cannot download your backup files."
709
- msgstr ""
1
+ # Translation of 2.x in Basque
2
+ # This file is distributed under the same license as the 2.x package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2015-07-18 15:52+0100\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.2\n"
11
+ "Project-Id-Version: 2.x\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: eu\n"
16
+
17
+ #: ../backupwordpress.php:119
18
+ msgid "BackUpWordPress requires PHP version %s or greater."
19
+ msgstr ""
20
+
21
+ #: ../admin/backups.php:100
22
+ msgid "This is where your backups will appear once you have some."
23
+ msgstr ""
24
+
25
+ #: ../admin/backups.php:120
26
+ msgid "% Backups Completed"
27
+ msgstr ""
28
+
29
+ #: ../admin/backups.php:122
30
+ msgid "No Backups Completed"
31
+ msgstr ""
32
+
33
+ #: ../admin/backups.php:124
34
+ msgid "1 Backup Completed"
35
+ msgstr ""
36
+
37
+ #: ../admin/enable-support.php:3
38
+ msgid "Enable BackUpWordPress Support"
39
+ msgstr ""
40
+
41
+ #: ../admin/enable-support.php:5
42
+ msgid "BackUpWordPress uses %s to provide support. In addition to allowing you to send and receive messages we also send the following server information along with your requests:"
43
+ msgstr ""
44
+
45
+ #: ../admin/enable-support.php:58
46
+ msgid "You can disable support in the future by deactivating BackUpWordPress."
47
+ msgstr ""
48
+
49
+ #: ../admin/enable-support.php:68
50
+ msgid "No thanks"
51
+ msgstr ""
52
+
53
+ #: ../admin/enable-support.php:70
54
+ msgid "Yes I want to enable support"
55
+ msgstr ""
56
+
57
+ #: ../admin/page.php:10
58
+ msgid "Support"
59
+ msgstr ""
60
+
61
+ #: ../admin/page.php:31
62
+ msgid "If you're finding BackUpWordPress useful, please %1$s rate it on the plugin directory. %2$s"
63
+ msgstr ""
64
+
65
+ #: ../admin/page.php:35
66
+ msgid "Wish you could store your backups in a safer place? Our %1$spremium extensions%2$s enable automatic backups to Dropbox, FTP, Google Drive and more."
67
+ msgstr ""
68
+
69
+ #: ../admin/schedule-form-excludes.php:19
70
+ msgid "Enter new exclude rules as a comma separated list, e.g. %s"
71
+ msgstr ""
72
+
73
+ #: ../admin/schedule-form.php:45
74
+ msgid "Past this limit older backups will be deleted automatically. This schedule will store a maximum of %s of backups"
75
+ msgstr ""
76
+
77
+ #: ../admin/schedule.php:78
78
+ msgid "store only the last backup on %s"
79
+ msgstr ""
80
+
81
+ #: ../admin/schedule.php:118
82
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s Send a copy of each backup to %6$s."
83
+ msgstr ""
84
+
85
+ #: ../classes/class-schedule.php:239
86
+ msgid "Argument 1 for %s must be a valid integer"
87
+ msgstr ""
88
+
89
+ #: ../classes/class-schedule.php:491
90
+ msgid "Argument 1 for %s must be a valid cron reoccurrence or \"manually\""
91
+ msgstr ""
92
+
93
+ #: ../classes/class-schedule.php:811
94
+ msgid "Argument 1 for %s must be a non empty string"
95
+ msgstr ""
96
+
97
+ #: ../classes/class-schedule.php:815
98
+ msgid "%s dpesn't exist"
99
+ msgstr ""
100
+
101
+ #: ../classes/class-schedule.php:819
102
+ msgid "That backup wasn't created by this schedule"
103
+ msgstr ""
104
+
105
+ #: ../classes/class-services.php:252
106
+ msgid "Argument 1 for %s must be a valid filepath"
107
+ msgstr ""
108
+
109
+ #: ../classes/class-services.php:267
110
+ msgid "Argument 1 for %s must be a registered service"
111
+ msgstr ""
112
+
113
+ #: ../classes/class-services.php:284
114
+ msgid "Argument 1 for %s must be a valid class"
115
+ msgstr ""
116
+
117
+ #: ../functions/core.php:269
118
+ msgid "You can only delete directories inside your WordPress installation"
119
+ msgstr ""
120
+
121
+ #: ../admin/actions.php:508
122
+ msgid "Your backup completed but with the following errors / warnings, it's probably ok to ignore these."
123
+ msgstr ""
124
+
125
+ #: ../admin/actions.php:512
126
+ msgid "Your backup failed"
127
+ msgstr ""
128
+
129
+ #: ../classes/class-email.php:35
130
+ msgid "Receive a notification email when a backup completes, if the backup is small enough (&lt; %s) then it will be attached to the email. Separate multiple email address's with a comma."
131
+ msgstr ""
132
+
133
+ #: ../classes/class-email.php:54
134
+ msgid "The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s."
135
+ msgstr ""
136
+
137
+ #: ../admin/actions.php:520
138
+ msgid "You can email details of this error to %s so they can look into the issue."
139
+ msgstr ""
140
+
141
+ #: ../functions/core.php:246
142
+ msgid "Once Hourly"
143
+ msgstr ""
144
+
145
+ #: ../functions/core.php:247
146
+ msgid "Twice Daily"
147
+ msgstr ""
148
+
149
+ #: ../functions/core.php:248
150
+ msgid "Once Daily"
151
+ msgstr ""
152
+
153
+ #: ../functions/core.php:249
154
+ msgid "Once Weekly"
155
+ msgstr ""
156
+
157
+ #: ../functions/core.php:250
158
+ msgid "Once Fortnightly"
159
+ msgstr ""
160
+
161
+ #: ../functions/core.php:251
162
+ msgid "Once Monthly"
163
+ msgstr ""
164
+
165
+ #: ../admin/actions.php:524
166
+ msgid "Email to Support"
167
+ msgstr ""
168
+
169
+ #: ../admin/schedule-form-excludes.php:13
170
+ msgid "New Exclude Rule[s]"
171
+ msgstr ""
172
+
173
+ #: ../admin/actions.php:516
174
+ msgid "Here's the response from the server:"
175
+ msgstr ""
176
+
177
+ #: ../admin/page.php:33
178
+ msgid "If you need help getting things working then check the FAQ by clicking on help in the top right hand corner of this page."
179
+ msgstr ""
180
+
181
+ #: ../classes/class-schedule.php:609 ../functions/interface.php:261
182
+ msgid "Starting Backup"
183
+ msgstr ""
184
+
185
+ #: ../classes/class-schedule.php:686
186
+ msgid "Dumping Database %s"
187
+ msgstr ""
188
+
189
+ #: ../classes/class-schedule.php:691
190
+ msgid "Verifying Database Dump %s"
191
+ msgstr ""
192
+
193
+ #: ../classes/class-schedule.php:696
194
+ msgid "Creating zip archive %s"
195
+ msgstr ""
196
+
197
+ #: ../classes/class-schedule.php:701
198
+ msgid "Verifying Zip Archive %s"
199
+ msgstr ""
200
+
201
+ #: ../classes/class-schedule.php:706
202
+ msgid "Finishing Backup"
203
+ msgstr ""
204
+
205
+ #: ../classes/wp-cli.php:16
206
+ msgid "BackUpWordPress may not work when php is running with %s on"
207
+ msgstr ""
208
+
209
+ #: ../functions/interface.php:78
210
+ msgid "%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on."
211
+ msgstr ""
212
+
213
+ #: ../admin/constants.php:26
214
+ msgid "The time that your schedules should run. Defaults to %s."
215
+ msgstr ""
216
+
217
+ #: ../backupwordpress.php:171
218
+ msgid "Are you sure you want to delete this schedule? All of it's backups will also be deleted."
219
+ msgstr ""
220
+
221
+ #: ../backupwordpress.php:171 ../backupwordpress.php:172
222
+ #: ../backupwordpress.php:173 ../backupwordpress.php:174
223
+ msgid "'Cancel' to go back, 'OK' to delete."
224
+ msgstr ""
225
+
226
+ #: ../backupwordpress.php:172
227
+ msgid "Are you sure you want to delete this backup?"
228
+ msgstr ""
229
+
230
+ #: ../backupwordpress.php:173
231
+ msgid "Are you sure you want to remove this exclude rule?"
232
+ msgstr ""
233
+
234
+ #: ../backupwordpress.php:174
235
+ msgid "Reducing the number of backups that are stored on this server will cause some of your existing backups to be deleted, are you sure that's what you want?"
236
+ msgstr ""
237
+
238
+ #: ../admin/actions.php:372
239
+ msgid "Max backups can't be empty"
240
+ msgstr ""
241
+
242
+ #: ../admin/actions.php:378
243
+ msgid "Max backups must be greater than 0"
244
+ msgstr ""
245
+
246
+ #: ../admin/actions.php:486
247
+ msgid "Exclude"
248
+ msgstr ""
249
+
250
+ #: ../admin/schedule-form-excludes.php:44
251
+ msgid "default"
252
+ msgstr ""
253
+
254
+ #: ../admin/schedule-form-excludes.php:48
255
+ msgid "defined"
256
+ msgstr ""
257
+
258
+ #: ../admin/schedule-form.php:27
259
+ msgid "Manual Only"
260
+ msgstr ""
261
+
262
+ #: ../admin/schedule.php:4
263
+ msgid "this shouldn't take long&hellip;"
264
+ msgstr ""
265
+
266
+ #: ../admin/schedule.php:4
267
+ msgid "calculating the size of your site&hellip;"
268
+ msgstr ""
269
+
270
+ #: ../admin/schedule.php:12
271
+ msgid "The next backup will be on %1$s at %2$s"
272
+ msgstr ""
273
+
274
+ #: ../admin/schedule.php:37
275
+ msgid "every 12 hours at %1$s &amp; %2$s"
276
+ msgstr ""
277
+
278
+ #: ../admin/schedule.php:43
279
+ msgid "weekly on %1$s at %2$s"
280
+ msgstr ""
281
+
282
+ #: ../admin/schedule.php:49
283
+ msgid "fortnightly on %1$s at %2$s"
284
+ msgstr ""
285
+
286
+ #: ../admin/schedule.php:56
287
+ msgid "on the %1$s of each month at %2$s"
288
+ msgstr ""
289
+
290
+ #: ../admin/schedule.php:62
291
+ msgid "manually"
292
+ msgstr ""
293
+
294
+ #: ../admin/schedule.php:71
295
+ msgid "this server"
296
+ msgstr ""
297
+
298
+ #: ../admin/schedule.php:84
299
+ msgid "don't store any backups on %s"
300
+ msgstr ""
301
+
302
+ #: ../admin/schedule.php:90
303
+ msgid "store only the last %1$s backups on %2$s"
304
+ msgstr ""
305
+
306
+ #: ../admin/schedule.php:120
307
+ msgid "Backup my %1$s %2$s %3$s, %4$s. %5$s"
308
+ msgstr ""
309
+
310
+ #: ../classes/class-email.php:156
311
+ msgid "BackUpWordPress was unable to backup your site %1$s."
312
+ msgstr ""
313
+
314
+ #: ../classes/class-email.php:156
315
+ msgid "Here are the errors that we're encountered:"
316
+ msgstr ""
317
+
318
+ #: ../classes/class-email.php:156
319
+ msgid "If the errors above look like Martian, forward this email to %3$s and we'll take a look"
320
+ msgstr ""
321
+
322
+ #: ../classes/class-email.php:156
323
+ msgid ""
324
+ "Kind Regards,\n"
325
+ "The Apologetic BackUpWordPress Backup Emailing Robot"
326
+ msgstr ""
327
+
328
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
329
+ msgid "BackUpWordPress has completed a backup of your site %1$s."
330
+ msgstr ""
331
+
332
+ #: ../classes/class-email.php:169
333
+ msgid "The backup file should be attached to this email."
334
+ msgstr ""
335
+
336
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
337
+ msgid "You can download the backup file by clicking the link below:"
338
+ msgstr ""
339
+
340
+ #: ../classes/class-email.php:169 ../classes/class-email.php:178
341
+ msgid ""
342
+ "Kind Regards,\n"
343
+ "The Happy BackUpWordPress Backup Emailing Robot"
344
+ msgstr ""
345
+
346
+ #: ../classes/class-email.php:178
347
+ msgid "Unfortunately the backup file was too large to attach to this email."
348
+ msgstr ""
349
+
350
+ #: ../classes/wp-cli.php:19
351
+ msgid "Backup: Dumping database..."
352
+ msgstr ""
353
+
354
+ #: ../classes/wp-cli.php:23
355
+ msgid "Backup: Zipping everything up..."
356
+ msgstr ""
357
+
358
+ #: ../classes/wp-cli.php:38
359
+ msgid "Invalid backup path"
360
+ msgstr ""
361
+
362
+ #: ../classes/wp-cli.php:43
363
+ msgid "Invalid root path"
364
+ msgstr ""
365
+
366
+ #: ../classes/wp-cli.php:68
367
+ msgid "Backup Complete: "
368
+ msgstr ""
369
+
370
+ #: ../classes/wp-cli.php:71
371
+ msgid "Backup Failed"
372
+ msgstr ""
373
+
374
+ #: ../functions/core.php:229
375
+ msgid "By default BackUpWordPress performs a daily backup of your database and a weekly backup of your database &amp; files. You can modify these schedules."
376
+ msgstr ""
377
+
378
+ #: ../functions/interface.php:245
379
+ msgid "Legacy"
380
+ msgstr ""
381
+
382
+ #: ../functions/interface.php:67
383
+ msgid "Your backups directory isn't writable, run %1$s or %2$s or set the permissions yourself."
384
+ msgstr ""
385
+
386
+ #: ../functions/interface.php:54
387
+ msgid "The backups directory can't be created because your %1$s directory isn't writable, run %2$s or %3$s or create the folder yourself."
388
+ msgstr ""
389
+
390
+ #: ../functions/core.php:229
391
+ msgid "BackUpWordPress has setup your default schedules."
392
+ msgstr ""
393
+
394
+ #: ../classes/class-email.php:154
395
+ msgid "Backup of %s Failed"
396
+ msgstr ""
397
+
398
+ #: ../classes/class-email.php:69
399
+ msgid "Send an email notification to %s"
400
+ msgstr ""
401
+
402
+ #: ../classes/class-email.php:100
403
+ msgid "%s isn't a valid email"
404
+ msgstr ""
405
+
406
+ #: ../admin/schedule.php:4
407
+ msgid "Backups will be compressed and should be smaller than this."
408
+ msgstr ""
409
+
410
+ #: ../classes/class-email.php:31
411
+ msgid "Email notification"
412
+ msgstr ""
413
+
414
+ #: ../admin/schedule.php:19
415
+ msgid "hourly on the hour"
416
+ msgstr ""
417
+
418
+ #: ../admin/schedule.php:25
419
+ msgid "daily at %s"
420
+ msgstr ""
421
+
422
+ #: ../admin/schedule-form.php:41
423
+ msgid "Number of backups to store on this server"
424
+ msgstr ""
425
+
426
+ #: ../admin/schedule-form.php:7
427
+ msgid "Schedule Settings"
428
+ msgstr ""
429
+
430
+ #: ../admin/actions.php:523 ../admin/schedule-form-excludes.php:119
431
+ msgid "Close"
432
+ msgstr ""
433
+
434
+ #: ../admin/menu.php:69
435
+ msgid "The information below is for version %1$s. View the %2$s file for help specific to version %3$s."
436
+ msgstr ""
437
+
438
+ #: ../admin/constants.php:23
439
+ msgid "The root directory that is backed up. Defaults to %s."
440
+ msgstr ""
441
+
442
+ #: ../admin/constants.php:20
443
+ msgid "The capability to use when calling %1$s. Defaults to %2$s."
444
+ msgstr ""
445
+
446
+ #: ../admin/constants.php:14
447
+ msgid "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
448
+ msgstr ""
449
+
450
+ #: ../backupwordpress.php:132
451
+ msgid "BackUpWordPress requires WordPress version %s or greater."
452
+ msgstr ""
453
+
454
+ #: ../backupwordpress.php:170 ../admin/actions.php:487
455
+ msgid "Cancel"
456
+ msgstr ""
457
+
458
+ #: ../admin/constants.php:11
459
+ msgid "The path to your %1$s executable. Will be used for the %2$s part of the back up if available."
460
+ msgstr ""
461
+
462
+ #: ../admin/constants.php:8 ../admin/constants.php:11
463
+ #: ../admin/constants.php:14 ../admin/constants.php:17
464
+ #: ../admin/constants.php:20 ../admin/constants.php:23
465
+ #: ../admin/constants.php:26 ../classes/class-email.php:54
466
+ msgid "e.g."
467
+ msgstr ""
468
+
469
+ #: ../admin/constants.php:3
470
+ msgid "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. Defined %5$s will be highlighted."
471
+ msgstr ""
472
+
473
+ #: ../admin/actions.php:250 ../admin/actions.php:256
474
+ msgid "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired properly. BackUpWordPress relies on wp-cron to run scheduled back ups. See the %3$s for more details."
475
+ msgstr ""
476
+
477
+ #: ../functions/interface.php:78
478
+ msgid "http://php.net/manual/en/features.safe-mode.php"
479
+ msgstr ""
480
+
481
+ #: ../functions/interface.php:78
482
+ msgid "Safe Mode"
483
+ msgstr ""
484
+
485
+ #: ../functions/interface.php:89
486
+ msgid "Your custom backups directory %1$s doesn't exist and can't be created, your backups will be saved to %2$s instead."
487
+ msgstr ""
488
+
489
+ #: ../functions/interface.php:100
490
+ msgid "Your custom backups directory %1$s isn't writable, new backups will be saved to %2$s instead."
491
+ msgstr ""
492
+
493
+ #: ../functions/interface.php:261
494
+ msgid "cancel"
495
+ msgstr ""
496
+
497
+ #: ../functions/interface.php:265
498
+ msgid "Settings"
499
+ msgstr ""
500
+
501
+ #: ../functions/interface.php:268
502
+ msgid "Excludes"
503
+ msgstr ""
504
+
505
+ #: ../functions/interface.php:29
506
+ msgid "Download"
507
+ msgstr ""
508
+
509
+ #: ../functions/interface.php:54 ../functions/interface.php:67
510
+ msgid "BackUpWordPress is almost ready."
511
+ msgstr ""
512
+
513
+ #: ../functions/interface.php:111
514
+ msgid "BackUpWordPress detected issues with your last backup."
515
+ msgstr ""
516
+
517
+ #: ../functions/interface.php:234
518
+ msgid "Database and Files"
519
+ msgstr ""
520
+
521
+ #: ../functions/interface.php:240
522
+ msgid "Database"
523
+ msgstr ""
524
+
525
+ #: ../admin/actions.php:250 ../admin/actions.php:256
526
+ #: ../functions/interface.php:78 ../functions/interface.php:89
527
+ #: ../functions/interface.php:100
528
+ msgid "BackUpWordPress has detected a problem."
529
+ msgstr ""
530
+
531
+ #: ../admin/actions.php:342
532
+ msgid "Backup type cannot be empty"
533
+ msgstr ""
534
+
535
+ #: ../admin/actions.php:345
536
+ msgid "Invalid backup type"
537
+ msgstr ""
538
+
539
+ #: ../admin/actions.php:357
540
+ msgid "Schedule cannot be empty"
541
+ msgstr ""
542
+
543
+ #: ../admin/actions.php:360
544
+ msgid "Invalid schedule"
545
+ msgstr ""
546
+
547
+ #: ../admin/actions.php:375
548
+ msgid "Max backups must be a number"
549
+ msgstr ""
550
+
551
+ #: ../admin/actions.php:481
552
+ msgid "%s didn't match any files."
553
+ msgstr ""
554
+
555
+ #: ../admin/backups.php:40
556
+ msgid "add schedule"
557
+ msgstr ""
558
+
559
+ #: ../admin/backups.php:71
560
+ msgid "Size"
561
+ msgstr ""
562
+
563
+ #: ../admin/backups.php:72
564
+ msgid "Type"
565
+ msgstr ""
566
+
567
+ #: ../admin/backups.php:73
568
+ msgid "Actions"
569
+ msgstr ""
570
+
571
+ #: ../admin/constants.php:3
572
+ msgid "The Codex can help"
573
+ msgstr ""
574
+
575
+ #: ../admin/constants.php:8
576
+ msgid "The path to folder you would like to store your backup files in, defaults to %s."
577
+ msgstr ""
578
+
579
+ #: ../admin/constants.php:11 ../admin/constants.php:14
580
+ msgid "database"
581
+ msgstr ""
582
+
583
+ #: ../admin/constants.php:14
584
+ msgid "files"
585
+ msgstr ""
586
+
587
+ #: ../admin/constants.php:17
588
+ msgid "Comma separated list of files or directories to exclude, the backups directory is automatically excluded."
589
+ msgstr ""
590
+
591
+ #: ../admin/menu.php:10 ../admin/page.php:6
592
+ msgid "Manage Backups"
593
+ msgstr ""
594
+
595
+ #: ../admin/menu.php:10 ../admin/menu.php:34
596
+ msgid "Backups"
597
+ msgstr ""
598
+
599
+ #: ../admin/menu.php:69
600
+ msgid "You are not using the latest stable version of BackUpWordPress"
601
+ msgstr ""
602
+
603
+ #: ../admin/menu.php:77
604
+ msgid "FAQ"
605
+ msgstr ""
606
+
607
+ #: ../admin/constants.php:3 ../admin/menu.php:79
608
+ msgid "Constants"
609
+ msgstr ""
610
+
611
+ #: ../admin/menu.php:82
612
+ msgid "For more information:"
613
+ msgstr ""
614
+
615
+ #: ../admin/menu.php:84
616
+ msgid "Support Forums"
617
+ msgstr ""
618
+
619
+ #: ../admin/menu.php:85
620
+ msgid "Help with translation"
621
+ msgstr ""
622
+
623
+ #: ../admin/page.php:27
624
+ msgid "You need to fix the issues detailed above before BackUpWordPress can start."
625
+ msgstr ""
626
+
627
+ #: ../admin/schedule-form-excludes.php:17
628
+ msgid "Preview"
629
+ msgstr ""
630
+
631
+ #: ../admin/schedule-form-excludes.php:29
632
+ msgid "Exclude Rules"
633
+ msgstr ""
634
+
635
+ #: ../admin/schedule-form-excludes.php:52
636
+ msgid "Remove"
637
+ msgstr ""
638
+
639
+ #: ../admin/schedule-form-excludes.php:71
640
+ msgid "Excluded"
641
+ msgstr ""
642
+
643
+ #: ../admin/schedule-form-excludes.php:75
644
+ msgid "Included"
645
+ msgstr ""
646
+
647
+ #: ../admin/schedule-form-excludes.php:79
648
+ msgid "Unreadable"
649
+ msgstr ""
650
+
651
+ #: ../admin/schedule-form-excludes.php:107
652
+ msgid "Unreadable files can't be backed up"
653
+ msgstr ""
654
+
655
+ #: ../admin/schedule-form-excludes.php:113
656
+ msgid "Your site is %s. Backups will be compressed and so will be smaller."
657
+ msgstr ""
658
+
659
+ #: ../admin/schedule-form.php:11
660
+ msgid "Backup"
661
+ msgstr ""
662
+
663
+ #: ../admin/schedule-form.php:14
664
+ msgid "Both Database &amp; files"
665
+ msgstr ""
666
+
667
+ #: ../admin/schedule-form.php:15
668
+ msgid "Files only"
669
+ msgstr ""
670
+
671
+ #: ../admin/schedule-form.php:16
672
+ msgid "Database only"
673
+ msgstr ""
674
+
675
+ #: ../functions/interface.php:237
676
+ msgid "Files"
677
+ msgstr ""
678
+
679
+ #: ../admin/schedule-form-excludes.php:7
680
+ msgid "Manage Excludes"
681
+ msgstr ""
682
+
683
+ #: ../admin/schedule-form.php:23
684
+ msgid "Schedule"
685
+ msgstr ""
686
+
687
+ #: ../backupwordpress.php:169 ../admin/schedule-form.php:58
688
+ msgid "Update"
689
+ msgstr ""
690
+
691
+ #: ../admin/schedule.php:19
692
+ msgid "hourly at %s minutes past the hour"
693
+ msgstr ""
694
+
695
+ #: ../functions/interface.php:275
696
+ msgid "Run now"
697
+ msgstr ""
698
+
699
+ #: ../functions/interface.php:32 ../functions/interface.php:277
700
+ msgid "Delete"
701
+ msgstr ""
702
+
703
+ #: ../classes/class-email.php:164
704
+ msgid "Backup of %s"
705
+ msgstr ""
706
+
707
+ #: ../functions/core.php:334
708
+ msgid "This %s file ensures that other people cannot download your backup files."
709
+ msgstr ""
languages/backupwordpress-fr_FR.po CHANGED
@@ -1,1325 +1,1325 @@
1
- # Translation of 3.x in French (France)
2
- # This file is distributed under the same license as the 3.x package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: 3.x\n"
6
- "Report-Msgid-Bugs-To: backupwordpress@hmn.md\n"
7
- "POT-Creation-Date: 2015-02-24 08:44:19+00:00\n"
8
- "PO-Revision-Date: 2015-07-18 15:53+0100\n"
9
- "Last-Translator: Human Made Limited <backupwordpress@hmn.md>\n"
10
- "Language-Team: \n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "Plural-Forms: nplurals=2; plural=n > 1;\n"
15
- "X-Generator: Poedit 1.8.2\n"
16
- "Language: fr_FR\n"
17
-
18
- #: admin/actions.php:215
19
- msgid "The schedule ID was not provided. Aborting."
20
- msgstr "L'identifiant d'horaire non fourni. Execution interrompue."
21
-
22
- #: admin/actions.php:265
23
- msgid "Backup type cannot be empty"
24
- msgstr "Le type de sauvegarde doit être indiqué"
25
-
26
- #: admin/actions.php:269
27
- msgid "Invalid backup type"
28
- msgstr "Type de sauvegarde inexistant"
29
-
30
- #: admin/actions.php:283
31
- msgid "Schedule cannot be empty"
32
- msgstr "La planification doit être indiquée"
33
-
34
- #: admin/actions.php:287
35
- msgid "Invalid schedule"
36
- msgstr "Horaire incorrect"
37
-
38
- #: admin/actions.php:301
39
- msgid "Day of the week must be a valid lowercase day name"
40
- msgstr "Le jour de la semain doit être un nom de jour existant en minuscules"
41
-
42
- #: admin/actions.php:320
43
- msgid "Day of month must be between 1 and 31"
44
- msgstr "La valeur pour jour du mois doit être un nombre entre 1 et 31"
45
-
46
- #: admin/actions.php:339
47
- msgid "Hours must be between 0 and 23"
48
- msgstr "La valeur pour les heures doit être entre 0 et 23"
49
-
50
- #: admin/actions.php:358
51
- msgid "Minutes must be between 0 and 59"
52
- msgstr "Doit être un nombre entre 0 et 59"
53
-
54
- #: admin/actions.php:372
55
- msgid "Max backups can't be empty"
56
- msgstr "Le nombre maximum de sauvegarde doit être indiqué"
57
-
58
- #: admin/actions.php:376
59
- msgid "Max backups must be a number"
60
- msgstr "Le nombre maximum de sauvegardes doit être un nombre"
61
-
62
- #: admin/actions.php:380
63
- msgid "Max backups must be greater than 0"
64
- msgstr "Le nombre maximum de sauvegardes doit être supérieur à 0"
65
-
66
- #: admin/actions.php:732 admin/actions.php:738
67
- msgid "BackUpWordPress has detected a problem."
68
- msgstr "BackUpWordPress a détecté un problème."
69
-
70
- #: admin/actions.php:732 admin/actions.php:738
71
- msgid ""
72
- "%1$s is returning a %2$s response which could mean cron jobs aren't getting fired "
73
- "properly. BackUpWordPress relies on wp-cron to run scheduled backups. See the %3$s for "
74
- "more details."
75
- msgstr ""
76
- "%1$s retourne une réponse %2$s ce qui signifie que les tâches cron ne sont pas lancées "
77
- "correctement. BackUpWordPress dépend du bon fonctionnement de wp-cron pour lancer les "
78
- "sauvegardes programmées. Voir %3$s pour plus de détails."
79
-
80
- #: admin/backups-table.php:8 admin/schedule-form-excludes.php:98
81
- msgid "Size"
82
- msgstr "Taille"
83
-
84
- #: admin/backups-table.php:9 admin/schedule-form-excludes.php:100
85
- msgid "Type"
86
- msgstr "Type"
87
-
88
- #: admin/backups-table.php:10
89
- msgid "Actions"
90
- msgstr "Actions"
91
-
92
- #: admin/backups-table.php:35
93
- msgid "This is where your backups will appear once you have some."
94
- msgstr "Vos sauvegardes seront disponibles ici"
95
-
96
- #: admin/backups.php:22
97
- msgid "add schedule"
98
- msgstr "ajouter un horaire"
99
-
100
- #: admin/backups.php:26
101
- msgid "Support"
102
- msgstr "Support"
103
-
104
- #: admin/backups.php:32
105
- msgid "Enable Support"
106
- msgstr "Activer le support"
107
-
108
- #: admin/constants.php:3
109
- msgid ""
110
- "You can %1$s any of the following %2$s in your %3$s to control advanced settings. %4$s. "
111
- "Defined %5$s will be highlighted."
112
- msgstr ""
113
- "Vous pouvez %1$s chacun des prochains %2$s dans votre %3$s pour régler les paramètres "
114
- "avancés. %4$s. %5$s défini sera souligné."
115
-
116
- #: admin/constants.php:3 admin/menu.php:69
117
- msgid "Constants"
118
- msgstr "Constantes"
119
-
120
- #: admin/constants.php:3
121
- msgid "The Codex can help"
122
- msgstr "Le Codex peut aider"
123
-
124
- #: admin/constants.php:14 admin/constants.php:30 admin/constants.php:46
125
- #: admin/constants.php:62 admin/constants.php:78 admin/constants.php:94
126
- #: admin/constants.php:110 classes/class-email-service.php:60
127
- msgid "You've set it to: %s"
128
- msgstr "Vous l'avez défini comme suit: %s"
129
-
130
- #: admin/constants.php:17
131
- msgid "The path to folder you would like to store your backup files in, defaults to %s."
132
- msgstr "Le chemin du dossier de sauvegarde. Par défaut : %s."
133
-
134
- #: admin/constants.php:17 admin/constants.php:33 admin/constants.php:49
135
- #: admin/constants.php:65 admin/constants.php:81 admin/constants.php:97
136
- #: admin/constants.php:113 classes/class-email-service.php:63
137
- msgid "e.g."
138
- msgstr "par exemple"
139
-
140
- #: admin/constants.php:33
141
- msgid ""
142
- "The path to your %1$s executable. Will be used for the %2$s part of the back up if "
143
- "available."
144
- msgstr ""
145
- "Le chemin de l'exécutable %1$s. Il sera utilisé pour la partie %2$s de la sauvegarde, "
146
- "s'il est présent."
147
-
148
- #: admin/constants.php:33 admin/constants.php:49
149
- msgid "database"
150
- msgstr "base de données"
151
-
152
- #: admin/constants.php:49
153
- msgid ""
154
- "The path to your %1$s executable. Will be used to zip up your %2$s and %3$s if available."
155
- msgstr ""
156
- "Le chemin vers l'exécutable %1$s. Il sera utilisé pour compresser %2$s et %3$s s'il est "
157
- "présent."
158
-
159
- #: admin/constants.php:49
160
- msgid "files"
161
- msgstr "fichiers"
162
-
163
- #: admin/constants.php:65
164
- msgid ""
165
- "Comma separated list of files or directories to exclude, the backups directory is "
166
- "automatically excluded."
167
- msgstr ""
168
- "Liste, séparée par des virgules, des dossiers à exclure. Le dossier de sauvegarde est "
169
- "automatiquement exclu."
170
-
171
- #: admin/constants.php:81
172
- msgid "The capability to use when calling %1$s. Defaults to %2$s."
173
- msgstr "La capacité à utiliser quand %1$s est appelé. Par défaut : %2$s."
174
-
175
- #: admin/constants.php:97
176
- msgid "The root directory that is backed up. Defaults to %s."
177
- msgstr "Le répertoire racine à sauvegarder. Par défaut : %s."
178
-
179
- #: admin/constants.php:113
180
- msgid "The time that your schedules should run. Defaults to %s."
181
- msgstr "L'heure à laquelle vos sauvegardes seront effectuées. Par défaut : %s."
182
-
183
- #: admin/enable-support.php:3
184
- msgid "Enable BackUpWordPress Support"
185
- msgstr "Activer le support "
186
-
187
- #: admin/enable-support.php:5
188
- msgid ""
189
- "BackUpWordPress uses %s to provide support. In addition to allowing you to send and "
190
- "receive messages we also send the following server information along with your requests:"
191
- msgstr ""
192
- "BqckUpWordPress utilise %s pour fournir du support technique. En plus de vous permettre "
193
- "d'envoyer et recevoir des messages, de l'information concernant la configuration du "
194
- "serveur est également jointe."
195
-
196
- #: admin/enable-support.php:58
197
- msgid "You can disable support in the future by deactivating BackUpWordPress."
198
- msgstr "Vous pouvez désactiver le support tecnique en désactivant BackUpWordPress."
199
-
200
- #: admin/enable-support.php:60
201
- msgid "No thanks"
202
- msgstr "Non merci"
203
-
204
- #: admin/enable-support.php:61
205
- msgid "Yes I want to enable support"
206
- msgstr "Oui, je veux activer le support technique"
207
-
208
- #: admin/faq.php:2
209
- msgid "Where does BackUpWordPress store the backup files?"
210
- msgstr "Où sont stockées les sauvegardes ?"
211
-
212
- #: admin/faq.php:4
213
- msgid ""
214
- "Backups are stored on your server in <code>/wp-content/backups</code>, you can change the "
215
- "directory."
216
- msgstr ""
217
- "Les sauvegardes sont stockées sur votre serveur sous <code>/wp-content/backups</code>, "
218
- "vous pouvez changer ce répertoire."
219
-
220
- #: admin/faq.php:6
221
- msgid ""
222
- "Important: By default BackUpWordPress backs up everything in your site root as well as "
223
- "your database, this includes any non WordPress folders that happen to be in your site "
224
- "root. This does mean that your backup directory can get quite large."
225
- msgstr ""
226
- "Important: Par défault, BackUpWordPress sauvegarde tout ce que contient la racine de "
227
- "votre site ainsi que votre base de données, y compris d'éventuels répertoires externes à "
228
- "WordPress. Ceci peut causer des archives de taille conséquente."
229
-
230
- #: admin/faq.php:8
231
- msgid "What if I want to back up my site to another destination?"
232
- msgstr "Et si je désire stocker mes sauvegardes ailleurs que sur l'hébergement ?"
233
-
234
- #: admin/faq.php:10
235
- msgid ""
236
- "BackUpWordPress Pro supports Dropbox, Google Drive, Amazon S3, Rackspace, Azure, "
237
- "Dream