Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.