/** * Revert the installation to remove everything the plugin added */ public function uninstall() { WiziappDB::getInstance()->uninstall(); // Remove scheduled tasks wp_clear_scheduled_hook('wiziapp_daily_function_hook'); wp_clear_scheduled_hook('wiziapp_weekly_function_hook'); wp_clear_scheduled_hook('wiziapp_monthly_function_hook'); // Deactivate the blog with the global services try { $cms = new WiziappCms(); $cms->deactivate(); } catch (Exception $e) { // If it failed, it's ok... move on } // Remove all options - must be done last delete_option('wiziapp_screens'); delete_option('wiziapp_components'); delete_option('wiziapp_pages'); delete_option('wiziapp_last_processed'); WiziappConfig::getInstance()->uninstall(); }