I want to get the list of all available hooks from active theme / from a specific plugin.

I was tried to get it from global variables $wp_actions & $wp_filter But, They are showing all registered hooks.


global $wp_actions, $wp_filter;
echo '<pre>';

E.g. If theme or plugin register the action in after_setup_theme then it'll list in [after_setup_theme] key from global $wp_filter.

I was tried one of the best plugin Simply Show Hooks. But, It'll also, show all the registered hooks.

Is there any way to get the specific hooks from theme / plugin?

  • Don't you have a documentation of them, or in the theme/plugin website? – knif3r Jul 12 '16 at 10:25
  • I've always just used the search feature in my IDE to scan the source code path for the "do_" function calls. – C C Jul 12 '16 at 12:31
  • 1
    You could run the WordPress PHPDoc parser over the plugin's code (wp parser parse .), which will create a list of hooks (in addition to all functions/classes/etc.). – J.D. Jul 12 '16 at 13:09

As of 2016-09-25, there is no ideal solution.

The WP-Parser does the job, but you need to set up a special WP site to run it. WooCommerce's Hook-docs is something much simpler, and can be easily tweaked.

I just wrote a long comment on the topic here:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.