Skip to content

Instantly share code, notes, and snippets.

@dtbaker
Created January 6, 2020 00:28
Show Gist options
  • Save dtbaker/3f19a3eb7fa7456b732738f42b8085fe to your computer and use it in GitHub Desktop.
Save dtbaker/3f19a3eb7fa7456b732738f42b8085fe to your computer and use it in GitHub Desktop.
WordPress hook call stack debug
// 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