Created
October 21, 2016 14:11
-
-
Save yumyo/96cd15aad32cb2a26c7ac8537a248104 to your computer and use it in GitHub Desktop.
Log all php includes in WordPress
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
/* | |
SHUTDOWN LOG INCLUDED FILES | |
========================================================================== */ | |
add_action( 'shutdown', __NAMESPACE__ . '\\my_shutdown_callback' ); | |
function my_shutdown_callback() { | |
$included_files = get_included_files(); | |
foreach ($included_files as $filename) { | |
error_log("$filename\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment