Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( ! function_exists( 'videotube_login_redirect' ) ){
- /**
- *
- * @param url $redirect_to
- * @param unknown $request
- * @param object $user
- * @return url
- */
- function videotube_login_redirect( $redirect_to, $request, $user ) {
- if( isset( $user->ID ) ){
- $redirect_to = get_author_posts_url( $user->ID );
- }
- return $redirect_to;
- }
- add_filter( 'login_redirect', 'videotube_login_redirect', 10, 3 );
- }
- if( ! function_exists( 'videotube_logged_redirect_to' ) ){
- /**
- * @param url $redirect_to
- * @param object $user
- * @param array $data
- * @return url
- */
- function videotube_logged_redirect_to( $redirect_to, $user , $data ) {
- return get_author_posts_url( $user->ID );
- }
- add_filter( 'vt_logged_redirect_to', 'videotube_logged_redirect_to', 10, 3 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement