本文整理汇总了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);
}