本文整理匯總了PHP中backupbuddy_core::periodic_cleanup方法的典型用法代碼示例。如果您正苦於以下問題:PHP backupbuddy_core::periodic_cleanup方法的具體用法?PHP backupbuddy_core::periodic_cleanup怎麽用?PHP backupbuddy_core::periodic_cleanup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::periodic_cleanup方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: housekeeping
function housekeeping()
{
if (!class_exists('backupbuddy_core')) {
require_once pb_backupbuddy::plugin_path() . '/classes/core.php';
}
backupbuddy_core::periodic_cleanup();
}
示例2:
if (pb_backupbuddy::_POST('reset_defaults') == $plugin_slug) {
if (call_user_func('pb_' . $plugin_slug . '::reset_options', true) === true) {
pb_backupbuddy::alert('Plugin settings have been reset to defaults for plugin `' . $data['name'] . '`.');
} else {
pb_backupbuddy::alert('Unable to reset plugin settings. Verify you are running the latest version.');
}
}
?>
<?php
}
// end plugin_information().
// User forced cleanup.
if (pb_backupbuddy::_GET('cleanup_now') != '') {
pb_backupbuddy::alert('Performing cleanup procedures now.');
backupbuddy_core::periodic_cleanup(0);
// clean up everything.
}
// Reset log.
if (pb_backupbuddy::_GET('reset_log') != '') {
if (file_exists($log_file)) {
@unlink($log_file);
}
if (file_exists($log_file)) {
// Didnt unlink.
pb_backupbuddy::alert('Unable to clear log file. Please verify permissions on file `' . $log_file . '`.');
} else {
// Unlinked.
pb_backupbuddy::alert('Cleared log file.');
}
}