Created
November 6, 2022 16:59
-
-
Save yuriinalivaiko/6e10677c2b8d1cf59187364304233e27 to your computer and use it in GitHub Desktop.
Hook um_login_redirect_url
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 | |
/** | |
* Hook: um_login_redirect_url | |
* | |
* Type: filter | |
* | |
* Description: Change redirect URL after successful login. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/um-actions-login.php#L258 | |
* | |
* @package um\core | |
* @see um_user_login() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param srting $url Redirect URL. | |
* @param int $user_id User ID | |
* | |
* @return string Redirect URL. | |
*/ | |
function my_login_redirect_url( $url, $user_id ) { | |
// your code here. | |
return $url; | |
} | |
add_filter( 'um_login_redirect_url', 'my_login_redirect_url', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment