Skip to content

Instantly share code, notes, and snippets.

@megmorsie
Created May 24, 2018 16:10
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 megmorsie/a97d1b64725e2552f5f635031df6d929 to your computer and use it in GitHub Desktop.
Save megmorsie/a97d1b64725e2552f5f635031df6d929 to your computer and use it in GitHub Desktop.
<?php
/**
* Function to list filters on a specified hook.
* Source: https://stackoverflow.com/a/5225021
*/
function rose_print_filters_for( $hook = '' ) {
global $wp_filter;
if ( empty($hook) || !isset($wp_filter[$hook]) ) {
return;
}
print '<pre>';
print_r($wp_filter[$hook]);
print '</pre>';
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment