Skip to content

Instantly share code, notes, and snippets.

Created February 19, 2011 14:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/835087 to your computer and use it in GitHub Desktop.
Save anonymous/835087 to your computer and use it in GitHub Desktop.
<?php
if ( isset( $_GET['author'] ) || ( $_GET['author'] != $current_user->ID ) )
$location = remove_query_arg('author', $location);
$location = add_query_arg( 'author', $current_user->ID, $location);
wp_redirect($location);
exit();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment