Skip to content

Commit 66697bc

Browse files
committed
Added the mpt_login_redirect filter to specify a custom success login redirect url
1 parent 73c4a73 commit 66697bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/shortcodes/class-shortcode-login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public static function init() {
6969
// Need to look at the URL the way it will end up in wp_redirect()
7070
$redirect_to = wp_sanitize_redirect($redirect_to);
7171
$redirect_to = wp_validate_redirect($redirect_to, home_url('/'));
72-
73-
wp_redirect( $redirect_to );
72+
73+
wp_redirect( apply_filters( 'mpt_login_redirect', $redirect_to ) );
7474
exit();
7575
}
7676

0 commit comments

Comments
 (0)