コード例 #1
0
ファイル: admin.status.php プロジェクト: ryanurban/Orbit
    	<?php 
    $offset = current_time('timestamp') - time();
    $schedules = wp_get_schedules();
    $schedule = $schedules[wp_get_schedule('hmbkp_schedule_backup_hook')]['display'];
    printf(__('Your %s will be automatically backed up <code>%s</code>. The next backup will occur at %s on %s and be saved to %s.', 'hmbkp'), $what_to_backup, $schedule, '<code>' . date_i18n(get_option('time_format'), wp_next_scheduled('hmbkp_schedule_backup_hook') + $offset) . '</code>', '<code title="' . sprintf(__('It\'s currently %s', 'hmbkp'), date_i18n(get_option('time_format'))) . '">' . date_i18n(get_option('date_format'), wp_next_scheduled('hmbkp_schedule_backup_hook') + $offset) . '</code>', '<code>' . hmbkp_path() . '</code>');
    ?>

<?php 
}
?>

</p>

<p>&#10003; <span class="hmbkp_estimated-size"><?php 
printf(__('Your site is %s. Backups will be compressed and should be smaller than this.', 'hmbkp'), get_transient('hmbkp_estimated_filesize') ? '<code>' . hmbkp_calculate() . '</code>' : '<code class="calculate">' . __('Calculating Size...', 'hmbkp') . '</code>');
?>
</span></p>

<?php 
if (hmbkp_get_email_address()) {
    ?>
<p>&#10003; <?php 
    printf(__('A copy of each backup will be emailed to %s.', 'hmbkp'), '<code>' . hmbkp_get_email_address() . '</code>');
    ?>
</p>
<?php 
}
?>

<?php 
コード例 #2
0
ファイル: admin.actions.php プロジェクト: ryanurban/Orbit
/**
 * Display the calculated size via ajax
 *
 * @return void
 */
function hmbkp_ajax_calculate_backup_size()
{
    echo hmbkp_calculate();
    exit;
}