Created
May 24, 2018 16:10
-
-
Save megmorsie/a97d1b64725e2552f5f635031df6d929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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