disconnect_site(); // Remove OAuth token $auth = new Agents24x7_Auth(); $auth->disconnect(); // Remove plugin options delete_option('agents24x7_version'); flush_rewrite_rules(); } register_activation_hook(__FILE__, 'agents24x7_activate'); register_deactivation_hook(__FILE__, 'agents24x7_deactivate'); function agents24x7_init() { new Agents24x7_Plugin(); } add_action('plugins_loaded', 'agents24x7_init');