DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

WordPress hooks are very useful because they allow you to “surcharge” an existing WP function with your own code. But when things goes wrong, it should be useful to be able to list all hooked WordPress functions. Here is the code to it.

The first thing to do is to paste the following function in your functions.php file:

function list_hooked_functions($tag=false){
 global $wp_filter;
 if ($tag) {
  if (!is_array($hook[$tag])) {
  trigger_error("Nothing found for '$tag' hook", E_USER_WARNING);
 else {
 echo '<pre>';
 foreach($hook as $tag => $priority){
  echo "<br />&gt;&gt;&gt;&gt;&gt;\t<strong>$tag</strong><br />";
  foreach($priority as $priority => $function){
  echo $priority;
  foreach($function as $name => $properties) echo "\t$name<br />";
 echo '</pre>';

Once done, simply call the list_hooked_functions() function to print on the screen all hooked WordPress functions. Please note that this function is for debugging purposes only.


Thanks to Rarst for contributing to WpRecipes with this very useful function! If you’d like to contribute to WpRecipes, don’t hesitate to contact me.


One Comment

  1. Thanks for this post. Actually i was very confused, but now i get the way to find out what i really need!

Leave a Comment

Your email address will not be published. Required fields are marked *