-
-
Save ajtatum/8e20f51b1d1dfe739b59f68e64fceb96 to your computer and use it in GitHub Desktop.
Meta Box Login Redirect Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('rwmb_profile_redirect', function($redirect, $config) { | |
if ($config['form_id'] == 'form_login_mb') | |
{ | |
$redirect_to = 'https://ajtatumdigital.com/account/logged-in/'; | |
if (isset($_GET['redirect_to']) && !empty($_GET['redirect_to'])) | |
{ | |
$redirect_to = filter_var($_GET['redirect_to'], FILTER_SANITIZE_URL); | |
} | |
$redirect = $redirect_to; | |
} | |
return $redirect; | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment