Skip to content

Instantly share code, notes, and snippets.

@sunilw
Created October 14, 2013 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunilw/6968727 to your computer and use it in GitHub Desktop.
Save sunilw/6968727 to your computer and use it in GitHub Desktop.
<ul>
<?php
foreach ( $GLOBALS['wp_filter'] as $tag => $priority_sets )
{
echo '<li><strong>' . $tag . '</strong><ul>' ;
/* Each [priority] */
foreach ( $priority_sets as $priority => $idxs ) {
echo '<li>' . $priority . '<ul>';
/* Each [callback] */
foreach ( $idxs as $idx => $callback ) {
if ( gettype($callback['function']) == 'object' ) $function = '{ closure }';
else if ( is_array( $callback['function'] ) ) {
$function = print_r( $callback['function'][0], true );
$function .= ':: '.print_r( $callback['function'][1], true );
}
else $function = $callback['function'];
echo '<li>' ;
echo $function ;
echo '<i>' ;
echo '(' ;
echo $callback['accepted_args'] ;
echo ' arguments)</i></li>' ;
}
echo '</ul></li>';
}
echo '</ul></li>';
}
?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment