Is there any way for a plugin to determine when it's deactivated so it can run some cleanup code? I am testing a plugin that modifies .htaccess, and would like to remove some rewrite rules if the plugin is deactivated. TIA Terrence Wood.