Skip to content

Instantly share code, notes, and snippets.

@thefuxia
Last active September 5, 2024 01:51
Show Gist options
  • 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