';
// Uncomment, if you want to sort by name of the filter hooks
// ksort( $_wp_filter );
foreach ( $_wp_filter as $tag => $data ) {
// Print tag name
printf(
'
%s
',
esc_html( $tag )
);
// Sort by priority
ksort( $data );
foreach ( $data as $priority => $functions ) {
// Print priority once
printf(
'%s',
$priority
);
// Go through each function
foreach ( $functions as $function ) {
$_function = $function['function'];
$_args = $function['accepted_args'];
// Check function type
if ( is_array( $_function ) ) {
// Object class calling
if ( is_object( $_function[0] ) )
$class = get_class( $_function[0] );
else
$class = $_function[0];
$name = $class . '::' . $_function[1];
} else {
// Static calling
$name = $_function;
}
// Print function name and number of accepted arguments
printf(
"\t%s() (%s)
",
esc_html( $name ),
sprintf(
_n(
'1 accepted argument',
'%s accepted arguments',
$_args
),
$_args
)
);
}
}
}
echo '';
}