[wp-hackers] Best way to abort Plugin installation
Keith P. Graham
kpgraham at gmail.com
Fri Mar 26 19:45:37 UTC 2010
I have a plugin that requires PHP 5 and SimpleXML. I would like to
check the requirements on installation and show a message if the
installation can't proceed.
I think that this belongs in the activation hook, but the only
suggestion that I can find is to perform a die() with my message. This
will show up as a fatal error.
I think that a fatal error is not what is called for. I'd like a more
graceful way to back out of the installation and die() seems too
What I would like to see is the opportunity to display a well
formatted message explaining what is wrong and some possible
solutions, but without the user seeing some scary error messages which
cause them to go running over and giving the plugin a zero rating.
Has anyone done this?
More information about the wp-hackers