Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( ! function_exists( 'redirect_user_to_submit_page_after_successful_login' ) ){
- /**
- * @param unknown_type $redirect_to
- * @param unknown_type $request
- * @param unknown_type $user
- * @return Ambigous <string, mixed>|unknown
- */
- function redirect_user_to_submit_page_after_successful_login( $redirect_to, $request = null, $user = null ) {
- /**
- * Submit page ID
- * @var int
- *
- */
- $submit_page_id = '100';
- if( isset( $user ) || absint( $request ) ){
- return esc_url( get_permalink( $submit_page_id ) );
- }
- return $redirect_to;
- }
- add_filter( 'login_redirect' , 'redirect_user_to_submit_page_after_successful_login', 100, 3 );
- add_filter( 'vt_logged_redirect_to' , 'redirect_user_to_submit_page_after_successful_login', 100, 2 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement