I am having trouble in getting the url of the page from where I click the register link.
Scenario:
The url of the login page is:
http://abcd.com/wp-login.php?redirect_to=http%3A%2F%2Fabcd.com%2Fxtreme%2F&page=1406
And I when I click register link it should add the redirect_to link in the register page like this:
http://abcd.com/wp-login.php?action=register&redirect_to=http%3A%2F%2Fabcd.com%2Fxtreme%2F&page=1406
I have used the following code but its not taking redirect_to parameter:
add_action( 'registration_redirect', 'redirection_link' );
function redirection_link( $redirect_to ) {
wp_redirect($GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI']);
exit;
}