Created
January 6, 2020 00:28
-
-
Save dtbaker/3f19a3eb7fa7456b732738f42b8085fe to your computer and use it in GitHub Desktop.
WordPress hook call stack debug
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
// WordPress hook call stack debug: | |
$debug = debug_backtrace(); | |
foreach($debug as $item){ | |
echo $item['file'] .':' .$item['line'] .' - '.$item['function'].'()' ."\n"; | |
if(!empty($item['args']) && is_array($item['args']) && isset($item['args'][1]) && is_string($item['args'][1])){ | |
echo ' --- '. $item['args'][1] ."\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment