Last active
November 23, 2017 19:41
-
-
Save ahmadawais/0ae9a4e20728cd8273b9c496d00f41f2 to your computer and use it in GitHub Desktop.
WP: Check the Remember Me checkbox on WP Login Page automatically.
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
/** | |
* Check Remember me. | |
* | |
* Check the Remember Me checkbox on WP Login Page automatically. | |
* | |
* @since 1.0.0 | |
* @author AhmadAwais (https://AhmadAwais.com/) | |
*/ | |
function aa_auto_remember_me() { | |
add_filter( 'login_footer', function() { | |
echo "<script>document.getElementById('rememberme').checked = true;</script>"; | |
} ); | |
} | |
add_action( 'init', 'aa_auto_remember_me' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment