Where can I find a list of all the WordPress hooks and over-ridable functions (pluggable, scriptable, etc)?
Edit: Plugin is here: http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339
|
Where can I find a list of all the WordPress hooks and over-ridable functions (pluggable, scriptable, etc)? Edit: Plugin is here: http://wordpress.stackexchange.com/questions/307/where-can-i-find-a-list-of-wordpress-hooks/339#339 |
||||
|
|
|
@Arlen: As Keith S points out Adam Brown's List of Hooks is the defacto resource of hooks for WordPress. However, it's not perfect:
So while Adam's list is a great resource especially for understanding when hooks were historically added it's not nearly as useful as if you were able to instrument the hooks on any given page on your own site. I've been toying with this idea for a while so your question triggered me to write a plugin called "Instrument Hooks for WordPress." You can find the full source below the screen shot and can you can also download it from gist here. So here's a screenshot of what the instrumentation looks like:
You trigger the instrumentation by using the URL parameter And as promised, here's the source (or download it here.):
|
|||||||||||||||||
|
|
This is my go-to site when I'm looking for hook info... WordPress Hooks Database |
|||
|
|
|
The Codex has an Action Reference and a Filter Reference. Adam Brown created a hook database that has all hooks in the source code, and adds the documentation from the wiki pages, version information and links to the source code. You can improve it by writing documentation in the Codex. Of course, some hooks are dynamic, depending on other data. Take the
If you register a custom post type |
|||||
|
|
|||
|
|
|
Although primitive, perhaps this plugin code can help? Switch "add_action" with "add_filter" if you want to look at filters instead. Load the plugin and then refresh the homepage of the site. Once loaded, it's a serious pain to deactivate, so just rename the plugin file under the plugins folder and refresh the site again -- it will deactivate automatically. I've used this trick many a time to troubleshoot things or find a place where I can insert something.
|
|||
|
|