Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Irfan-Ansari/9505338 to your computer and use it in GitHub Desktop.
Save Irfan-Ansari/9505338 to your computer and use it in GitHub Desktop.
<?php
function debug_get_functions_for_hook( $hook ) {
global $wp_filter;
if( ! isset( $wp_filter[$hook] ) )
return;
$functions = array();
foreach( (array) $wp_filter[$hook] as $key => $actions ) {
//$functions = array_merge( $functions, $actions );
$functions['priority_' . $key] = array_keys( $actions );
}
ksort( $functions );
return $functions;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment