[Plugin From Where You Came ] – redirect after login or logout
-
Simple, easy, new plugin to redirect you to where you were when you logged in or out.
Download at https://files.viper007bond.com/wordpress/fromwhereyoucame.zip
Plugin Name: From Where You Came Version: 1.0.0 Description: Makes the "Login" and "Logout" links take you back from where you came. Author: Viper007Bond Author URI: https://www.viper007bond.com/ add_filter( 'loginout', 'fromwhereyoucame' ); function fromwhereyoucame( $link ) { $currenturl = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; if ( !is_user_logged_in() ) $link = str_replace( '">', '?redirect_to=' . urlencode( $currenturl ) . '">', $link ); else $link = str_replace( '">', '&redirect_to=' . urlencode( $currenturl ) . '">', $link ); return $link; } ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Plugin From Where You Came ] – redirect after login or logout’ is closed to new replies.