-
-
Save ravinderk/d44f4fdfa3baa0a161aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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