Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BronsonQuick/1bb286eab8e3da2de7b1 to your computer and use it in GitHub Desktop.
Save BronsonQuick/1bb286eab8e3da2de7b1 to your computer and use it in GitHub Desktop.
Better backtracing in WordPress
<?php
/*
* Better backtracing to fix dodgy themes and plugins. Pop this into mu-plugins
*/
function sennza_backtrace() {
echo implode( '<br>', explode( ',', wp_debug_backtrace_summary( null, 4 ) ) );
};
add_action( 'deprecated_function_run', 'sennza_backtrace' );
add_action( 'deprecated_argument_run', 'sennza_backtrace' );
add_action( 'doing_it_wrong_run', 'sennza_backtrace' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment