[wp-hackers] debugging a wordpress hook

Jeremy Clarke jer at simianuprising.com
Mon Mar 22 16:01:07 UTC 2010


FWIW you could have also found the array that held all registered
hooks by going to add_action() in the source and tracking down how
they are saved.

In this case add_action() calls add_filter() which does global
$wp_filter then adds the filter to the specified $tag. It's often a
fairly short road from an API call to the root data management, though
obviously many cases are more convoluted than this one ;)

I use an IDE (netbeans.org) to make it easy to jump to the definition
of a function from a call to it, but you can also use PHPXref's of WP
to jump around the source code, its pretty easy:
http://phpxref.ftwr.co.uk/wordpress/_functions/index.html

-- 
Jeremy Clarke | http://jeremyclarke.org
Code and Design | http://globalvoicesonline.org


More information about the wp-hackers mailing list