| @@ -690,9 +690,15 @@ | ||
| 690 | 690 | if(isAPI){ |
| 691 | 691 | target_url += "&lz_api=1"; |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | - target_url += "&ref='.esc_url((is_ssl() ? 'https://' : 'http://').$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']).'" | |
| 694 | + let redirect_to = "'.(!empty($_GET['redirect_to']) ? wp_validate_redirect(esc_url($_GET['redirect_to'])) : '') .'"; | |
| 695 | + | |
| 696 | + if(redirect_to.length){ | |
| 697 | + target_url += "&ref="+redirect_to; | |
| 698 | + } else { | |
| 699 | + target_url += "&ref='.esc_url((is_ssl() ? 'https://' : 'http://').$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']).'" | |
| 700 | + } | |
| 695 | 701 | |
| 696 | 702 | if(lz_target_window == "same"){ |
| 697 | 703 | jQuery("#loginizer-social-loader-wrap").css("display", "flex"); |
| 698 | 704 | |