Last active
June 22, 2020 18:53
-
-
Save jimboobrien/597fed60d1199d1884d198716973d9fb 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 | |
/* put this in functions.php */ | |
function list_hooked_functions( $tag=false ){ | |
global $wp_filter; | |
if ( $tag ) { | |
$hook[ $tag ] = $wp_filter[ $tag ]; | |
if ( !is_array( $hook[$tag] ) ) { | |
trigger_error( "Nothing found for '$tag' hook", E_USER_WARNING ); | |
return; | |
} | |
}else{ | |
$hook = $wp_filter; | |
ksort( $hook ); | |
} | |
echo '<pre>'; | |
foreach( $hook as $tag => $priority ){ | |
echo "<br />>>>>>\t<strong>$tag</strong><br />"; | |
ksort( $priority ); | |
foreach( $priority as $priority => $function ){ | |
echo $priority; | |
foreach( $function as $name => $properties ) { | |
echo "\t$name<br />" | |
}; | |
} | |
} | |
echo '</pre>'; | |
return; | |
} | |
/* THEN USE THIS ON A PAGE */ | |
list_hooked_functions(); | |
/* WHAT THE OUTPUT SHOULD LOOK LIKE ON THE PAGE */ | |
>>>>> the_content | |
8 000000001d3591230000000096d6f3b0run_shortcode | |
000000001d3591230000000096d6f3b0autoembed | |
10 wptexturize | |
convert_smilies | |
convert_chars | |
wpautop | |
shortcode_unautop | |
prepend_attachment | |
11 capital_P_dangit | |
do_shortcode | |
>>>>> the_content_rss | |
8 ent2ncr | |
>>>>> the_excerpt | |
10 wptexturize | |
convert_smilies | |
convert_chars | |
wpautop | |
shortcode_unautop | |
>>>>> the_excerpt_rss | |
8 ent2ncr | |
10 convert_chars | |
>>>>> the_posts | |
10 _close_comments_for_old_posts | |
>>>>> the_title | |
10 wptexturize | |
convert_chars | |
trim | |
11 capital_P_dangit | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment