jimboobrien
2/6/2017 - 6:52 PM

list-hooked-functions.php

<?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 />&gt;&gt;&gt;&gt;&gt;\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
?>