[wp-hackers] Way to tell what hooks are supported

David Chait davebytes at comcast.net
Fri Aug 12 18:11:43 GMT 2005


I don't understand the concept of 'all the hoks that are supported'.  Do you 
mean 'all the hooks that are called internally by WordPress'?

Obviously, there are a number of hooks that are called from within 
templates/themes, and none of those would necessarily be 'advertised' (as 
it'd be improper to do so).  Also, just because a hook is advertised doesn't 
guarantee it is getting called upon -- that could also depend on the page, 
or the template.  Sticky issue...

I mean, otherwise, this is sort of like querying OpenGL for 'what extensions 
are supported'... So I'm all for it, just think in real-life coding it will 
only be of use in certain circumstances.

-d

----- Original Message ----- 
From: "Mark Jaquith" <mark.wordpress at txfx.net>
To: "Wordpress Hackers List" <wp-hackers at lists.automattic.com>
Sent: Friday, August 12, 2005 7:49 AM
Subject: [wp-hackers] Way to tell what hooks are supported


>I was wondering if I could get some feedback on this idea:
> http://trac.wordpress.org/ticket/1579
>
> Basically, it's an array of all the hooks that are supported, plus a 
> function, hook_exists('hook_name') which returns does an in_array call 
> which returns true or false.  Might make it easier for plugin authors to 
> know if a hook is supported, instead of having to do version voodoo and 
> research.  It would also make the hooks known for people using SVN 
> versions, where version number voodoo may be impossible.  I can think of 
> one con: as new hooks are added, we'll have to add to the list.  But heck, 
> I'd volunteer to monitor the changelog for new hooks and remind the devs 
> to add them to the list. 



More information about the wp-hackers mailing list