post icon

In WordPress, prefix everything

“It’s a simple concept. Anything you create in the global namespace has the potential to conflict with a theme, another plugin (including one you wrote), and WordPress core itself. Thus, prefix everything with a unique-enough character set. For example, all functions I write always start with “nacin_”, and I make sure that my functions are unique across all of my plugins. Even when I send a code snippet over the wp-hackers mailing list, I use nacin_ or myplugin_.”

-Andrew Nacin

read more @ http://www.andrewnacin.com

13. May, 2010

No comments yet.

Leave a comment