[wp-hackers] Plugins: Best practice for conditional loading of actions and file includes

Ozh ozh at planetozh.com
Fri Feb 5 22:20:32 UTC 2010


On Fri, Feb 5, 2010 at 9:48 PM, Otto <otto at ottodestruct.com> wrote:
> So, best practice: Keep hooks near the functions they are hooking. If
> you don't like the way that looks, then at least keep them in the same
> file.
>

I prefer grouping all the hooks at the same place instead of spreading
them all across the file(s), because having them in one place makes it
easier in one glance to understand the flow of things and what happens
when.

This said, I don't think the location of the hooks (near their
functions or all grouped in one place) is a matter of "best practice"
(assuming they're correctly declared in both case of course)

Ozh
-- 
http://planetOzh.com ~ Blog and WordPress Stuff
http://FrenchFragFactory.net ~ Daily Quake News


More information about the wp-hackers mailing list