Created
September 16, 2018 06:46
-
-
Save dmhendricks/d3904c52968dbfc7df4423f3b0d3d204 to your computer and use it in GitHub Desktop.
A hack to automatically tick "Remember Me" checkbox at WordPress login to save support headaches
This file contains hidden or 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 | |
| /** | |
| * Add the following to your child theme's functions.php file to remove | |
| * automatically tick the "Remember Me" checkbox at WordPress login. | |
| */ | |
| add_action( 'init', function() { | |
| add_filter( 'login_footer', function() { | |
| echo "<script>document.getElementById('rememberme').checked = true;</script>"; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment