Plugin self deactivation


Jake Goldman wrote up how to make a WordPress plugin deactivate itself given a specific version of WordPress. Why? His plugin was folded in core with 3.5, so there’s no point to running both the plugin and the latest version of WordPress. His technique includes a status message explaining why the plugin was deactivated.

Very clever. Though I would probably add a link to a blog post with more information on the update.

3 thoughts on “Plugin self deactivation

  1. I wrote about something similar over a year ago. 🙂

    When one of my Plugins used the wp_editor() function, which is only available in WordPress 3.3+, I needed an elegant way to automatically deactivate the Plugin.

    Like Jake I was surprised that there wasn’t more information on how to do this so I wrote my own utility function!

    I have recently tweaked the output of the function, and updated the screenshot on the blog post to reflect this.

Comments are closed.