/** * Deletes old backup files * * @return null */ function hmbkp_delete_old_backups() { $files = hmbkp_get_backups(); if (count($files) <= hmbkp_max_backups()) { return; } foreach (array_slice($files, hmbkp_max_backups()) as $file) { hmbkp_delete_backup(base64_encode($file)); } }
_e('files only', 'hmbkp'); ?> </option> </select> </td> </tr> <tr align="top"> <th scope="row"><label for="hmbkp_backup_number"><?php _e('Number of backups', 'hmbkp'); ?> </label></th> <td><label for="hmbkp_backup_number"><?php printf(__('The last %s backups will be stored on the server.', 'hmbkp'), '<input type="text" class="small-text ' . (defined('HMBKP_MAX_BACKUPS') ? 'disabled' : '') . '" value="' . hmbkp_max_backups() . '" id="hmbkp_backup_number" name="hmbkp_backup_number"' . disabled(defined('HMBKP_MAX_BACKUPS'), true, false) . '>'); ?> </label></td> </tr> <tr valign="top"> <th scope="row"><label for="hmbkp_email_address"><?php _e('Email backups', 'hmbkp'); ?> </label></th> <td><input name="hmbkp_email_address" type="text" id="hmbkp_email_address" value="<?php echo hmbkp_get_email_address(); ?> " class="regular-text <?php if (defined('HMBKP_EMAIL')) { echo 'disabled';