当前位置: 首页>>代码示例>>PHP>>正文


PHP backupbuddy_core::getNotifications方法代码示例

本文整理汇总了PHP中backupbuddy_core::getNotifications方法的典型用法代码示例。如果您正苦于以下问题:PHP backupbuddy_core::getNotifications方法的具体用法?PHP backupbuddy_core::getNotifications怎么用?PHP backupbuddy_core::getNotifications使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在backupbuddy_core的用法示例。


在下文中一共展示了backupbuddy_core::getNotifications方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

            }
            // End foreach.
            unset($item);
            unset($item_name);
        }
        // End foreach.
        unset($event);
        unset($hook_name);
    }
    // End if is_numeric.
}
// End foreach.
unset($cron_item);
unset($time);
// Cleanup any old notifications.
$notifications = backupbuddy_core::getNotifications();
// Load notifications.
$updateNotifications = false;
$maxTimeDiff = pb_backupbuddy::$options['max_notifications_age_days'] * 24 * 60 * 60;
foreach ($notifications as $i => $notification) {
    if (time() - $notification['time'] > $maxTimeDiff) {
        unset($notifications[$i]);
        $updateNotifications = true;
    }
}
if (true === $updateNotifications) {
    pb_backupbuddy::status('details', 'Periodic cleanup: Replacing notifications.');
    backupbuddy_core::replaceNotifications($notifications);
}
@clearstatcache();
// Clears file info stat cache.
开发者ID:Offirmo,项目名称:base-wordpress,代码行数:31,代码来源:_periodicCleanup.php

示例2: _test_recent_sync_notifications

 private static function _test_recent_sync_notifications()
 {
     $notifications = backupbuddy_core::getNotifications();
     // Remove non-Stash Live notifications.
     foreach ($notifications as $key => $notification) {
         if ('live_error' != $notification['slug']) {
             unset($notifications[$key]);
             continue;
         }
     }
     if (count($notifications) > 0) {
         self::$_results['highlights'][] = '`' . count($notifications) . '` recent Stash Live Sync error notifications.';
     }
     // Limit to X number of most recent notifications.
     self::$_results['recent_sync_notifications'] = array_slice($notifications, -1 * self::$_settings['max_notifications'], self::$_settings['max_notifications'], $preserve_key = false);
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:16,代码来源:_troubleshooting.php

示例3: backupbuddy_sync_add_notices

function backupbuddy_sync_add_notices($arguments, $urgent = false)
{
    require_once pb_backupbuddy::plugin_path() . '/classes/core.php';
    $notifications = backupbuddy_core::getNotifications();
    foreach ($notifications as &$notification) {
        // Skip if in the inapplicable mode.
        if (false === $urgent && true === $notification['urgent']) {
            // If NOT seeking urgents, skip urgents.
            continue;
        }
        if (true === $urgent && false === $notification['urgent']) {
            // If seeking urgents, skip non-urgents.
            continue;
        }
        if (true === $notification['syncSent']) {
            // Only send once.
            continue;
        }
        $notification['syncSent'] = true;
        // Compile data.
        //$data = array();
        $data = $notification['data'];
        /*
        if ( ! empty( $arguments['verbose'] ) ) { // The verbose argument can be checked for in order to provide additional information that may not always be necessary.
        	$data = $notification['data'];
        }
        */
        // Send notice.
        if (false === $urgent) {
            ithemes_sync_add_notice('backupbuddy', $notification['slug'], $notification['title'], $notification['message'], $data);
        } elseif (true === $urgent) {
            ithemes_sync_send_urgent_notice('backupbuddy', $notification['slug'], $notification['title'], $notification['message'], $data);
        }
    }
    backupbuddy_core::replaceNotifications($notifications);
    // Save with syncSent updates for all notifications.
    return true;
}
开发者ID:shelbyneilsmith,项目名称:wptools,代码行数:38,代码来源:init_global.php

示例4: backupbuddy_sync_add_notices

function backupbuddy_sync_add_notices($arguments, $urgent = false)
{
    require_once pb_backupbuddy::plugin_path() . '/classes/core.php';
    $notifications = backupbuddy_core::getNotifications();
    foreach ($notifications as &$notification) {
        // Skip if in the inapplicable mode.
        if (false === $urgent && true === $notification['urgent']) {
            // If NOT seeking urgents, skip urgents.
            continue;
        }
        if (true === $urgent && false === $notification['urgent']) {
            // If seeking urgents, skip non-urgents.
            continue;
        }
        if (true === $notification['syncSent']) {
            // Only send once.
            continue;
        }
        $notification['syncSent'] = true;
        $notification['data']['datestamp'] = date('Y-m-d', $notification['time']);
        // Added v6.3.3.10.
        // Send notice.
        if (false === $urgent) {
            ithemes_sync_add_notice('backupbuddy', $notification['slug'], $notification['title'], $notification['message'], $notification['data']);
        } elseif (true === $urgent) {
            ithemes_sync_send_urgent_notice('backupbuddy', $notification['slug'], $notification['title'], $notification['message'], $notification['data']);
        }
    }
    backupbuddy_core::replaceNotifications($notifications);
    // Save with syncSent updates for all notifications.
    return true;
}
开发者ID:Brandonsmith23,项目名称:prodgyr,代码行数:32,代码来源:init_global.php

示例5: trim_old_notifications

 public static function trim_old_notifications()
 {
     $notifications = backupbuddy_core::getNotifications();
     // Load notifications.
     $updateNotifications = false;
     $maxTimeDiff = pb_backupbuddy::$options['max_notifications_age_days'] * 24 * 60 * 60;
     foreach ($notifications as $i => $notification) {
         if (time() - $notification['time'] > $maxTimeDiff) {
             unset($notifications[$i]);
             $updateNotifications = true;
         }
     }
     if (true === $updateNotifications) {
         pb_backupbuddy::status('details', 'Periodic cleanup: Replacing notifications.');
         backupbuddy_core::replaceNotifications($notifications);
     }
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:17,代码来源:housekeeping.php


注:本文中的backupbuddy_core::getNotifications方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。