本文整理匯總了PHP中backupbuddy_core::validateSchedules方法的典型用法代碼示例。如果您正苦於以下問題:PHP backupbuddy_core::validateSchedules方法的具體用法?PHP backupbuddy_core::validateSchedules怎麽用?PHP backupbuddy_core::validateSchedules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::validateSchedules方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: glob
<?php
// LOADED FROM: core.php, periodic_cleanup().
// INCOMING VARIABLES: $backup_age_limit = 172800, $die_on_fail = true
$max_site_log_size = pb_backupbuddy::$options['max_site_log_size'] * 1024 * 1024;
// in bytes.
pb_backupbuddy::status('message', 'Starting cleanup procedure for BackupBuddy v' . pb_backupbuddy::settings('version') . '.');
if (!isset(pb_backupbuddy::$options)) {
pb_backupbuddy::load();
}
// Validate that all internal schedules are properly registered in the WordPress cron
backupbuddy_core::validateSchedules();
// Clean up any old rollback undo files hanging around.
$files = (array) glob(ABSPATH . 'backupbuddy_rollback*');
foreach ($files as $file) {
$file_stats = stat($file);
if (time() - $file_stats['mtime'] > backupbuddy_constants::CLEANUP_MAX_STATUS_LOG_AGE) {
@unlink($file);
}
}
// If temp directory exists (should only be transient but just in case it is hanging around) make sure it's secured. BB will try to delete this directory but if it can't it will at least be checked to be secure.
if (file_exists(backupbuddy_core::getTempDirectory())) {
pb_backupbuddy::anti_directory_browsing(backupbuddy_core::getTempDirectory(), $die = false);
}
// Clean up any old cron file transfer locks.
$files = (array) glob(backupbuddy_core::getLogDirectory() . 'cronSend-*');
foreach ($files as $file) {
$file_stats = stat($file);
if (time() - $file_stats['mtime'] > backupbuddy_constants::CLEANUP_MAX_STATUS_LOG_AGE) {
@unlink($file);
}