Skip to main content
5 events
when toggle format what by license comment
Mar 4, 2015 at 10:57 comment added henrywright Thanks for replying. 5.2 is currently used by 16.6% of WordPress websites according to these stats. Probably explains why the namespace feature hasn't been used by many yet.
Mar 4, 2015 at 5:15 comment added EAMann There are two alternatives: function prefixing (meaning everything starts with my_unique_prefix_) or real PHP namespaces. The former works but is bulky, inflexible, and leads to incredibly ugly and hard-to-maintain/reuse-across-projects code. The latter only works if you're dropping WordPress' default PHP 5.2 backwards compatibility.
Mar 3, 2015 at 19:27 comment added henrywright Is creating a class merely to avoid potential naming collisions good practice? There must be an alternative, maybe just use a unique prefix? Or is there another benefit to having the function as part of a class?
Oct 30, 2011 at 11:51 vote accept ProfK
Oct 28, 2011 at 17:26 history answered EAMann CC BY-SA 3.0