Skip to content

Instantly share code, notes, and snippets.

@thefuxia
Last active August 29, 2015 14:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thefuxia/307ce75f87ee152dd6cb to your computer and use it in GitHub Desktop.
Save thefuxia/307ce75f87ee152dd6cb to your computer and use it in GitHub Desktop.
Debug request
<?php
/**
* Plugin Name: T5 Debug Request
*/
is_admin() || add_action( 'shutdown', function() {
if ( ! current_user_can( 'update_core' ) )
return;
print '<pre>REQUEST';
print_r( $_REQUEST );
print "\n\nSESSION";
if ( empty ( $_SESSION ) )
print '(no session)';
else
print_r( $_SESSION );
print '</pre>';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment