Created
March 25, 2018 13:31
-
-
Save jakubmikita/a4b7e013477f162b5504f1e360e934b8 to your computer and use it in GitHub Desktop.
Saving all the executed actions during WordPress call
This file contains 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
add_action( 'shutdown', function() { | |
foreach( $GLOBALS['wp_actions'] as $action => $count ) { | |
$action = sprintf( '%s (%d)', $action, $count ); | |
file_put_contents( dirname( __FILE__ ) . '/actions.log', print_r( $action, true ) . "\r\n", FILE_APPEND ); | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment