Example #1
0
}
if (!isset($cron_warnings)) {
    $cron_warnings = array();
}
// Loop through each cron time to create $crons array for displaying later.
$crons = array();
foreach ((array) $cron as $time => $cron_item) {
    if (is_numeric($time)) {
        // Loop through each schedule for this time
        foreach ((array) $cron_item as $hook_name => $event) {
            foreach ((array) $event as $item_name => $item) {
                // Determine period.
                if (!empty($item['schedule'])) {
                    // Recurring schedule.
                    $period = '';
                    if (false !== ($prettyInterval = backupbuddy_core::prettyCronInterval($item['interval']))) {
                        $period .= '<span title="Interval tag: `' . $prettyInterval[0] . '`.">' . $prettyInterval[1] . '</span>';
                    } else {
                        $period .= '<span title="Interval tag: `' . $item['schedule'] . '`.">' . $item['schedule'] . '</span>';
                    }
                } else {
                    // One-time only cron.
                    $period = __('one time only', 'it-l10n-backupbuddy');
                }
                // Determine interval.
                if (!empty($item['interval'])) {
                    $interval = $item['interval'] . ' seconds';
                } else {
                    $interval = __('one time only', 'it-l10n-backupbuddy');
                }
                // Determine arguments.