Ready to get started?Download WordPress


REQ: Plugin Activation Hook (3 posts)

  1. TechGnome
    Posted 10 years ago #

    This is hopefully a failry simple request: The ability to hook an action when a plugin is activated or de-activated. Here's my thinking: If a plugin requires say a table or some other setup is needed before the plugin can really be used, it would be nice to be able to have a hook that would call an activate function that would do the setup.... same for deactivation, would allow a plugin to clean up after itself.
    Or am I nutz?

  2. Sebbi
    Posted 10 years ago #

    Interesting idea. On the other hand you could simply include a link for deinstallation in your plugin-description and if the plugin requires something done the first time it is run, then simply do it :-) It is not that hard to detect missing tables/files/etc from within the plugin :-)

  3. TechGnome
    Posted 10 years ago #

    True, and that's what I'll end up doing, but it would be nice to do it upfront, rather than each time the plugin runs. It would also be nice if plugins had a way to clean up after themselves. Not every WP user is savy when it comes to phpMyAdmin. Oooooh, I see your point about a deinstallation link... interesting idea. It's going the other direction - I was thinking of having an installation link! Hmmmmm... Thanks for the idea, now I've got something to work with.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.