Skip to content

Instantly share code, notes, and snippets.

@rachelbaker
Created January 28, 2013 14:11
Show Gist options
  • Save rachelbaker/4655802 to your computer and use it in GitHub Desktop.
Save rachelbaker/4655802 to your computer and use it in GitHub Desktop.
/**
* ChromePHP Debugging
* Author: Rachel Baker
*/
function chromePHPDebugTool()
{
global $wp_scripts;
global $post;
include('ChromePhp.php');
// ChromePhp::log($_GET);
// ChromePhp::log($_REQUEST);
// ChromePhp::log($_SERVER);
// ChromePhp::log($wp_scripts);
// // using labels
if (isset($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
ChromePhp::log($key, $value);
}
}
if (isset($_POST)) {
foreach ($_POST as $key => $value) {
ChromePhp::log($key, $value);
}
}
// // warnings and errors
// ChromePhp::warn('this is a warning');
// ChromePhp::error('this is an error');
}
add_action('init', 'chromePHPDebugTool');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment