本文整理匯總了PHP中backupbuddy_core::prettyCronInterval方法的典型用法代碼示例。如果您正苦於以下問題:PHP backupbuddy_core::prettyCronInterval方法的具體用法?PHP backupbuddy_core::prettyCronInterval怎麽用?PHP backupbuddy_core::prettyCronInterval使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::prettyCronInterval方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
}
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.