Exemplo n.º 1
0
">

	<?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>' . $type . '</span>', $filesize, $reoccurrence, $backup_to_keep);
if ($email_msg) {
    $sentence .= sprintf(__('%s. ', 'backupwordpress'), $email_msg);
}
if ($services) {
    $sentence .= sprintf(__('Send a copy of each backup to %s.', 'backupwordpress'), implode(', ', array_filter($services)));
}
echo $sentence;
?>

	<?php 
if (HMBKP_Schedules::get_instance()->get_schedule($schedule->get_id())) {
    hmbkp_schedule_status($schedule);
}
?>

	<?php 
require HMBKP_PLUGIN_PATH . 'admin/schedule-settings.php';
?>

</div>

<?php 
/**
 * Returns a formatted string containing the calculated total site size or a message
 * to indicate it is being calculated.
 *
 * @param HMBKP_Scheduled_Backup $schedule
Exemplo n.º 2
0
/**
 * Display the running status via ajax
 */
function hmbkp_ajax_is_backup_in_progress()
{
    check_ajax_referer('hmbkp_nonce', 'nonce');
    if (empty($_POST['hmbkp_schedule_id'])) {
        die;
    }
    $schedule = new HMBKP_Scheduled_Backup(sanitize_text_field(urldecode($_POST['hmbkp_schedule_id'])));
    if (!$schedule->get_status()) {
        echo 0;
    } else {
        hmbkp_schedule_status($schedule);
    }
    die;
}