[wp-hackers] How do I prevent activation of plugin is below PHP5?
Navjot Singh
navjotjsingh at gmail.com
Fri Jul 9 07:48:38 UTC 2010
Making it not available for activation is not a wise idea. Otherwise people
will be left confused why its not appearing in active plugins and will
complain to you. Showing a nice error message as suggested by Otto should
work. Plus people will automatically know they need to get PHP5 to run your
plugin.
Navjot
On Fri, Jul 9, 2010 at 12:42 PM, Raj <list at expost.org> wrote:
> Thanks for the response Piyush. Is there any value the activation hook
> should return so that Wordpress doesn't mark the plugin activated in the
> plugins list. Sure I can check if the version is below 5 using a eregi()
> and
> phpversion() but how do I communicate to wordpress that the plugin should
> not be marked as activated? If possible, anyway to make sure that the
> plugin
> is not even available for activation?
>
> Raj
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Piyush
> Mishra
> Sent: Friday, July 09, 2010 12:28 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] How do I prevent activation of plugin is below
> PHP
> 5?
>
> make an activation hook to check version and keep an option or
> something for activation. set that to 0 with the hook if php version
> is less thn 5 for more thn 5 set it to 1 and use that as a check...
>
> On 7/9/10, Raj <list at expost.org> wrote:
> > Hi all,
> >
> >
> >
> > I am getting a lot of emails from users of my plugin who are running it
> on
> > PHP 4.x and are seeing errors. How do I prevent the plugin from being
> > activated if the version of PHP is below PHP 5-? What should a plugin do
> to
> > not get activated? Meaning.. to signal to Wordpress that the activation
> > should be cancelled.
> >
> >
> >
> > Raj
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
> --
> Regards
> Piyush Mishra
> http://www.piyushmishra.com/
> Life's Short, Live it to the maximum
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> 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