/** * Make necessary database updates on admin_init * * @return void */ public function run_updates() { if (!class_exists('Tribe__Events__Updater')) { return; // core needs to be updated for compatibility } $updater = new Tribe__Events__Pro__Updater(self::VERSION); if ($updater->update_required()) { $updater->do_updates(); } }
/** * Set a flag to indicate that the plugin has been deactivated * and needs to be reinitialized if it is reactivated * * @return void */ private function set_flags() { $updater = new Tribe__Events__Pro__Updater(Tribe__Events__Pro__Main::VERSION); $updater->reset(); }