Where can I find a list of all the WordPress hooks and over-ridable functions (pluggable, scriptable, etc)?
Edit: Plugin is listed here.
Where can I find a list of all the WordPress hooks and over-ridable functions (pluggable, scriptable, etc)?
Edit: Plugin is listed here.
You must be logged in to post a comment.
@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
instrument=hooks
, i.e.:And as promised, here’s the source (or download it here.):
Debug Bar Action Hooks plugin
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
wp_transition_post_status
function:If you register a custom post type
event
and a custom post statuscancelled
, you will have acancelled_event
action hook.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.
I use thiss to find the order of hooks. To get the the
filters
just changeadd_action
toadd_filter
.As @kaiser suggest do not post only links i am improving it. but it is not possible to use entire code here so i am using few image here to explain that how it have a complete list for WordPress hooks with describe each. you can find it here for hooks, classes, functions, plugins,
to describe each
You can just use a query monitor plugin: https://wordpress.org/plugins/query-monitor/