Skip to content

Instantly share code, notes, and snippets.

@zamoose
Created March 19, 2012 16:27
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 zamoose/2118086 to your computer and use it in GitHub Desktop.
Save zamoose/2118086 to your computer and use it in GitHub Desktop.
Hook output
<?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