本文整理汇总了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.