Skip to content

Instantly share code, notes, and snippets.

@WordBits
Created June 24, 2018 05:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WordBits/a084436924c5459d1087e7fdd8bb29aa to your computer and use it in GitHub Desktop.
Save WordBits/a084436924c5459d1087e7fdd8bb29aa to your computer and use it in GitHub Desktop.
Prints all actions that have fired within a particular request. Useful for debugging.
<?php
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/list-all-wordpress-actions-fired/
// Created by: jeffmatson
?>
<?php
add_action( 'shutdown', function(){
foreach( $GLOBALS['wp_actions'] as $action => $count )
printf( '%s (%d) <br/>' . PHP_EOL, $action, $count );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment