Created
January 28, 2013 14:11
-
-
Save rachelbaker/4655802 to your computer and use it in GitHub Desktop.
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
/** | |
* 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