How to see all the actions attached to an “add_action” hook in WordPress

As was discussed in a previous post, the WordPress ‘add_action‘ hooks are quite useful. If you’re wondering who else (plugins, WordPress framework etc.) has been using your favorite hook (for example, ‘wp_head‘), here’s a simple way to list all the functions hooked to a specific hook: <?php global $wp_filter; var_dump( $wp_filter['wp_head'] ); ?> Of course, you may replace the 'wp_head' above with the hook you’re interested in. Final clarification note: Where and how should that PHP code be executed? Well, you can hook it yourself to be executed somewhere, as demonstrated in our previous post. For reference purposes, here’s a complete example — edit your Child Theme‘s functions.php file to contain this: (but be careful! see our WARNING at the bottom of our previous post) <?php function my_add_stuff_to_head() { ?> <!-- This is an HTML comment that will appear in the head of every page, for the sake of this example, because it's being hooked to 'wp_head'. <?php global $wp_filter; var_dump( $wp_filter['wp_head'] ); ?> --> <?php } add_action('wp_head','my_add_stuff_to_head'); ?>