[wp-hackers] Facebook API and WordPress Plugin Development - Insight / Best Practice

Mike Schinkel mike at newclarity.net
Thu Nov 15 05:39:21 UTC 2012

On Nov 15, 2012, at 12:34 AM, John Blackbourn <johnbillion+wp at gmail.com> wrote:
> No, you would namespace it according to your plugin, not according to
> the library. So for example:
> namespace myplugin;
> class wp_tlc_transients { ... }
> And another plugin might use:
> namespace foo_plugin;
> class wp_tlc_transients { ... }
> People use classes for namespacing their functions in the same way.

That still requires modifying the library's source code, correct?

> Correct of course, and this is unfortunate, but it doesn't rule out
> plugins having PHP requirements higher than WordPress'. Even
> Automattic publishes plugins which require PHP 5.3.

It does rule out requiring 5.3 for people who don't want to be limited to the subset of users who do not run PHP5.3.  Over 66% of users, currently:


According to comment I've seen made by Nacin, it's going to be a long time before WordPress moves to requiring 5.3 so waiting would mean waiting a long time.


More information about the wp-hackers mailing list