function housekeeping() { if (!class_exists('backupbuddy_core')) { require_once pb_backupbuddy::plugin_path() . '/classes/core.php'; } backupbuddy_core::periodic_cleanup(); }
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.'); } }