[wp-hackers] prevent plugin activation if conditions are not met

Otto otto at ottodestruct.com
Sun Aug 31 15:44:33 GMT 2008

My Automatic Timezone plugin shows a way to prevent activation, but it
doesn't throw a particularly pretty error message at the moment.

See here: http://wordpress.org/extend/plugins/automatic-timezone/

On Sun, Aug 31, 2008 at 9:45 AM, David Barbakadze <jayarjo at gmail.com> wrote:
> hello, people!
> I'm new to this list and to wordpress. nice to meet you therefore :)
> wordpress code really does look as a poetry.
> I'm working on a little add-on for NextGEN library. I'm writing it in
> the form of plugin, but I want to prevent it's activation if some
> confitions (installed NextGEN library) are not met. I'm able to throw
> an error message with admin_notices hook, but cannot stop activation
> process. Plugin does activate anyway. Then if I just do exit; it does
> prevent it, but throws rather non-informative message: Plugin could
> not be activated because it triggered a fatal error.
> Is there a trick to combine both of them. I mean to throw beautiful
> error and cancel plugin activation process?
> Regards,
> Dave
> _______________________________________________
> 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