[wp-hackers] Best way to abort Plugin installation
Otto
otto at ottodestruct.com
Fri Mar 26 20:23:51 UTC 2010
Use a wp_die(). It's a prettier version of die.
-Otto
On Fri, Mar 26, 2010 at 2:45 PM, Keith P. Graham <kpgraham at gmail.com> wrote:
> 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
> drastic.
>
> 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?
>
> Keith
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list