I’ve recently started using the Hikari Hooks plugin for WordPress as it seems to allow you to get a good idea of what do_actions are being called on the page, so that you can easily find out where potential hooks for plugin code might lie.
Are there better tools/plugins for accomplishing the same thing?
In particular I was looking for one that might notify me of post status transition actions such as new_to_publish and draft_to_publish…It appears that Hikari Hooks does notify you of such changes but not that they are available, only if you’re already added them as an action.
It is usually easy to find most hooks in documentation or source. It can be much more tricky for hooks that are dynamically generated, like post transitions. Essentially it doesn’t exist in source as specific hook – it is hook that is getting generated dynamically at runtime, depending on variables.
At local test stack I often just add
var_dump()
on variables to source code to see what is going on. Dirty, but easy and fast. Obviously highly not recommended for production environment.Note sure if this is a better way but I wrote a plugin to display the active hook on a page for this answer:
Less of a tool and more of a reference, the Plugin API/Filter Reference is a great list and it’s sorted by type.