What's the best way to cleanly abort a Wordpress plugin activation

Is there a standard/recommended way to abort your plugin's activation if its minimum requirements haven't been met?  There doesn't seem to be any obvious way to return from the activation hook with a "don't activate" flag.

jashawAsked:
Who is Participating?
 
Julian MatzJoint ChairpersonCommented:
Are you concerned about a particular plugin, or are you developing a plugin and would like to know how to check the requirements before activating the plugin?

I'm going to assume the latter.

You could create a class. The constructor function could check the min. requirements before any changes are made to the database. If the requirements are not met, you could simply by-pass the activation functions and return an error message.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.