die('Access Denied.'); } // Ignore anything older than 5 min. $max_cron_age = 60 * 5; if (time() - pb_backupbuddy::_POST('backupbuddy_time') > $max_cron_age) { die('Cron action too old.'); } // Try to prevent any caching layer. @header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); @header("Cache-Control: no-store, no-cache, must-revalidate"); @header("Cache-Control: post-check=0, pre-check=0", false); @header("Pragma: no-cache"); // Process. require_once pb_backupbuddy::plugin_path() . '/classes/core.php'; backupbuddy_core::process_backup(pb_backupbuddy::_POST('backupbuddy_serial')); die('`' . microtime(true) . '`'); } // Make localization happen. if (!defined('PB_STANDALONE') && '1' != pb_backupbuddy::$options['disable_localization']) { load_plugin_textdomain('it-l10n-backupbuddy', false, dirname(plugin_basename(__FILE__)) . '/lang'); } /********** ACTIONS (global) **********/ /********** AJAX (global) **********/ /********** CRON (global) **********/ pb_backupbuddy::add_cron('cron', backupbuddy_constants::DEFAULT_CRON_PRIORITY, 3); // Master CRON handler as of v6.4.0.9. Pass all cron functionality through this. Params: cron_method, args, reschedulecount(optional). /********** FILTERS (global) **********/ pb_backupbuddy::add_filter('cron_schedules'); // Add schedule periods such as bimonthly, etc into cron. By default passes 1 param at priority 10. if ('1' == pb_backupbuddy::$options['disable_https_local_ssl_verify']) {
function _process_backup($serial = 'blank') { require_once pb_backupbuddy::plugin_path() . '/classes/core.php'; backupbuddy_core::process_backup($serial); }