Print all WordPress hooks

Ever needed to print out all the hooks in the sequence they are being called (for example to find a good hook to modify a particular behavior)?

add_filter( 'all', function( $tag ) {
	echo "apply_filters($tag)<br/>";
} );
add_action( 'all', function( $tag ) {
	echo "do_action($tag)<br/>";
} );

Is a quick and easy way to do this via a small modification in wp-settings.php (after plugin.php is included).

Posted in Web

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.