| 1 |
<?php |
| 2 |
|
| 3 |
// Files can easily get way too big for this method |
| 4 |
|
| 5 |
class UpdraftPlus_BackupModule_email { |
| 6 |
|
| 7 |
function backup($backup_array) { |
| 8 |
|
| 9 |
global $updraftplus; |
| 10 |
|
| 11 |
foreach ($backup_array as $type => $file) { |
| 12 |
$fullpath = trailingslashit(get_option('updraft_dir')).$file; |
| 13 |
wp_mail(get_option('updraft_email'), "WordPress Backup ".date('Y-m-d H:i',$updraftplus->backup_time), "Backup is of the $type. Be wary; email backups may fail because of file size limitations on mail servers.", null, array($fullpath)); |
| 14 |
$updraftplus->uploaded_file($file); |
| 15 |
} |
| 16 |
|
| 17 |
$updraftplus->prune_retained_backups("local", null, null); |
| 18 |
} |
| 19 |
|
| 20 |
function config_print() { |
| 21 |
return false; |
| 22 |
} |
| 23 |
|
| 24 |
} |
| 25 |
|
| 26 |
?> |