web_development:wordpress:list-hooked-functions

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();
add_action('wp_head','wpse86994_remove_action',1); // prioroty of 1, but can be anything higher (lower number) then the priority of the action

	function wpse86994_remove_action() {
	  remove_action( 'wp_footer', 'et_pb_maybe_add_advanced_styles' );
	}


http://wordpress.stackexchange.com/questions/86992/remove-action-in-a-theme

  • web_development/wordpress/list-hooked-functions.txt
  • Last modified: 2020/10/09 03:54
  • by jimboobrien