Skip to content

Instantly share code, notes, and snippets.

@michaeluno
Created February 15, 2013 13:04
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 michaeluno/4960261 to your computer and use it in GitHub Desktop.
Save michaeluno/4960261 to your computer and use it in GitHub Desktop.
WordPress function. Retrieves the number of callbacks registered to the given hook.
function GetNumberOfCallbacks( $strHook='' ) {
global $wp_filter;
if( empty( $strHook ) || !isset( $wp_filter[$strHook] ) ) return;
return count( $wp_filter[$strHook] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment