Created
March 19, 2012 16:27
-
-
Save zamoose/2118086 to your computer and use it in GitHub Desktop.
Hook output
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 lbc_hook_check(){ | |
global $wp_filter; | |
$tmp_filters = $wp_filter; | |
foreach( $tmp_filters as $key => $values ) { | |
if( preg_match( '/^lblg/', $key ) ) { | |
add_action($key, 'lbc_hook_echo'); | |
} | |
} | |
} | |
add_action( 'init', 'lbc_hook_check' ); | |
function lbc_hook_echo(){ | |
echo "<span class=\"lblg-hook\">" . current_filter() . "</span>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment