Ejemplo n.º 1
0
/**
 * Display the row of actions for a schedule
 *
 * @access public
 * @param HM\BackUpWordPress\Scheduled_Backup $schedule
 * @return void
 */
function hmbkp_schedule_status(HM\BackUpWordPress\Scheduled_Backup $schedule, $echo = true)
{
    ob_start();
    ?>

	<span class="hmbkp-status"<?php 
    if ($schedule->get_status()) {
        ?>
 title="<?php 
        printf(__('Started %s ago', 'backupwordpress'), human_time_diff($schedule->get_schedule_running_start_time()));
        ?>
"<?php 
    }
    ?>
>
		<?php 
    echo $schedule->get_status() ? wp_kses_data($schedule->get_status()) : __('Starting Backup', 'backupwordpress');
    ?>
		<a href="<?php 
    echo hmbkp_admin_action_url('request_cancel_backup', array('hmbkp_schedule_id' => $schedule->get_id()));
    ?>
"><?php 
    _e('cancel', 'backupwordpress');
    ?>
</a>
	</span>

	<?php 
    $output = ob_get_clean();
    if (!$echo) {
        return $output;
    }
    echo $output;
}