Last active
December 21, 2015 00:19
-
-
Save rctay/6219624 to your computer and use it in GitHub Desktop.
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 | |
/* | |
Plugin Name: Login, Relaxed | |
Description: Logins to the admin dashboard are always redirected to `siteurl` by default. This plugin relaxes this to allow logins from URLs apart from `siteurl`. This is useful if you are logging in to WordPress from localhost. | |
Plugin URI: https://gist.github.com/rctay/6219624 | |
Version: 0.1 | |
Author: Tay Ray Chuan | |
*/ | |
function wp_login_loginform_action_blank($url, $path, $orig_scheme=null) | |
{ | |
if ($path !== 'wp-login.php' || $orig_scheme !== 'login_post') | |
return $url; | |
return ''; | |
} | |
add_filter('site_url', 'wp_login_loginform_action_blank', 10, 3); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment