No subject
Tue Apr 20 23:23:57 UTC 2010
All the functions in your Plugin need to have unique names that are differe=
nt from functions in the WordPress core, other Plugins, and themes. For tha=
t reason, it is a good idea to use a unique function name prefix on all of =
your Plugin's functions. Another possibility is to define your Plugin funct=
ions inside a class (which also needs to have a unique name).
________________________________
From: Curtis McHale <curtis at curtismchale.ca>
Reply-To: <wp-hackers at lists.automattic.com>
Date: Tue, 31 Aug 2010 19:52:23 -0400
To: <wp-hackers at lists.automattic.com>
Subject: Re: [wp-hackers] plugin activation help
I thought that was already the recommended best practice. Every function
you write for a plugin or a theme should be prefixed to make sure it
doesn't duplicate another plugin or theme.
Raj wrote:
> If only I had a dime for every time that happens. I'd be making more than=
I
> am through donations.
>
> It seems everybody likes to name their functions:
>
> sanitize()
> validateEmail()
> validate()
> strip()
> ... and so on.
>
> Perhaps we could all adopt the gentleman's code - prefix every single
> function uniquely :P
>
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Rich Pedley
> Sent: Wednesday, September 01, 2010 3:18 AM
> To: wp-hackers at lists.automattic.com
> Subject: [wp-hackers] plugin activation help
>
> I'm getting a couple of people post about some issues when activating
> my plugin eShop.
>
> Fatal error: Cannot redeclare add_user() (previously declared in
> C:\Inetpub\vhosts\ellcee.com\httpdocs\blog\wordpressDEV\wp-admin\includes=
\us
> er.php:23)
> in
> C:\Inetpub\vhosts\ellcee.com\httpdocs\blog\wordpressDEV\wp-admin\includes=
\us
> er.php
> on line 44
>
> &
>
> Fatal error: Cannot redeclare add_user() (previously declared in
> C:\inetpub\vhosts\mydomain.com\httpdocs\store\wp-admin\includes\user.php:=
23)
>
> in
> C:\inetpub\vhosts\mydomain.com\httpdocs\store\wp-admin\includes\user.php
> on line 44
>
>
> Obviously I can't replicate this myself.
>
> Any ideas on what would be causing this? Or tips on how to help them
> without access to anything at their end?
>
> Any help appreciated.
>
> Rich
> _______________________________________________
> 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
--
Curtis McHale
604.751.3482
http://curtismchale.ca
http://twitter.com/curtismchale
http://ca.linkedin.com/in/curtismchale
_______________________________________________
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