[wp-hackers] Checking if hock exists

Mark Jaquith mark.wordpress at txfx.net
Mon Jan 30 00:51:26 GMT 2006


On Jan 29, 2006, at 6:31 PM, CK wrote:

> I was wondering if there is an easy way to check if an action  
> exists before calling it.

Not currently.  The best thing you can do now is check against the WP  
version number, or maybe check for the existence of a function that  
was introduced in the same version that the hook you want was  
introduced.  I've proposed a function for checking for the existence  
of WP core hooks.  The idea has been given a relatively lukewarm  
reception.  If this is something the devs would put in, I'd gladly  
code it, as I am already up to my elbows in hooks with http:// 
wphooks.flatearth.org/

--
Mark Jaquith
http://txfx.net/




More information about the wp-hackers mailing list