Add support for server query string data after user login

Add support for server query string data after user login
This commit is contained in:
2016-03-06 09:38:18 +07:00
parent 91a44630cf
commit b43e3a7571
+8
View File
@@ -21,6 +21,14 @@
if ( isset( $_REQUEST['redirect_to'] ) && !empty( $_REQUEST['redirect_to'] ) ) {
$redirect = add_query_arg( 'redirect_to', $_REQUEST['redirect_to'], $redirect );
}
/* ---------- */
//Add support query string data after user login
if($_SERVER['QUERY_STRING']) {
$redirect .= '?'.$_SERVER['QUERY_STRING'];
}
/* ---------- */
exit( wp_redirect( $redirect ) );
}