Skip to content

@toscho /debug-hook.php
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
T5 Debug Hook
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Debug Hook
* Description: Adds a list of registered filters and action for a hook. Call a page with <code>?hook=NAME</code> to see it.
*/
add_action( 'shutdown', 't5_debug_hook' );
function t5_debug_hook()
{
if ( ! isset ( $_GET['hook'] ) or ! current_user_can( 'update_core') )
{
return;
}
$f = $GLOBALS['wp_filter'];
if ( ! isset ( $f[ $_GET['hook'] ] ) )
{
print 'Nothing found for ' . esc_html( $_GET['hook'] );
return;
}
print '<pre>' . esc_html( var_export( $f[ $_GET['hook'] ], TRUE ) ) . '</pre>';
}
@dougcassidy

Howdy, I'm getting a Fatal error: Nesting level too deep - recursive dependency?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.