コード例 #1
0
if ($backup_info->is_imported()) {
    $status = __('Imported', 'fw');
    $time = $backup_info->get_storage_file_time();
} elseif ($backup_info->is_completed()) {
    $status = false;
    $time = $backup_info->get_storage_file_time();
} elseif ($backup_info->is_cancelled()) {
    if ($backup_info->is_finished()) {
        $status = __('Cancelled', 'fw');
    } else {
        $status = __('Cancelling', 'fw');
    }
    $time = $backup_info->get_cancelled_at();
} elseif ($backup_info->is_failed()) {
    $status = __('Failed', 'fw');
    $time = $backup_info->get_failed_at();
} elseif ($backup_info->is_started()) {
    $status = __('Running', 'fw');
    $time = time();
} elseif ($backup_info->is_queued()) {
    $status = __('Queued', 'fw');
    $time = $backup_info->get_queued_at();
}
if ($href = $backup->action()->url_backup_download($post_id)) {
    $action_list[] = fw_html_tag('a', compact('href'), __('Download', 'fw'));
}
if ($href = $backup->action()->url_backup_cancel($post_id)) {
    $action_list[] = fw_html_tag('a', compact('href'), __('Cancel', 'fw'));
}
if ($backup_info->is_finished()) {
    $action_list[] = fw_html_tag('a', array('href' => $backup->action()->url_backup_trash($post_id)), __('Delete', 'fw'));