[wp-hackers] Checking if hock exists

CK c at kouloumbris.com
Sun Jan 29 23:31:05 GMT 2006


Hi all,

I was wondering if there is an easy way to check if an action exists  
before calling it. I'll give an example because I am sure not many of  
you have understand my query.

Since wp2.0.1 we can use the add_action('dbx_post_advance',  
'my_function'); instead of add_action('edit_form_advance',  
'my_function'); What I wan't is to check if dbx_post_advance exists  
before calling it or call edit_form_advance so my plugin will be  
compatible with both wp2.0 and wp.2.0.1.

Any Ideas, I've tried function_exists but it doesn't work since it's  
a hock no a function.

Constantinos

--
GPG: 0x2502604D
http://kouloumbris.com

"A bus station is where a bus stops. A train station is where a train  
stops. On my desk, I have a workstation…go figure."
~ Steven Wright ~




More information about the wp-hackers mailing list