I have written a lot of custom code for WP, but this is my first attempt at creating a 'true' plugin. I am making an updated version of my sitemap generator script. I just have two little questions :)
1) Currently I am using an action hook to first check if the phrase "generate_sitemap()" is found in the content. If it is, the plugin generates the sitemap, and does a str_replace to put the sitemap on the page. I think this is a decent way to do this, but I just wanted to be sure :)
2) Since I will be setting up an options page for the plugin configuration, I will need to create the table for this. I have been reading the documentation, and have a pretty good feel of it, but I did not see any mention of removing the table when the plugin is de-activated. Is it common practice to do this? Or do most plugins just leave the table there in - so that the options are kept if it is re-enabled?
Thanks for any feedback!