Last active
October 11, 2015 05:37
-
-
Save sheabunge/3810641 to your computer and use it in GitHub Desktop.
Automatically checks the "Remember Me" box on the WordPress login page
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: Remember Me Checked | |
* Plugin URI: http://bungeshea.com/remember-me-checked/ | |
* Description: Automatically checks the "Remember Me" box on the WordPress login page | |
* Author: Shea Bunge | |
* Author URI: http://bungeshea.com | |
* Version: 1.0 | |
*/ | |
if( ! function_exists( 'remember_me_checked' ) ) : | |
function remember_me_checked() { | |
?> | |
<script type="text/javascript"> | |
function checkit() { | |
document.getElementById('rememberme').checked = true; | |
} | |
window.onload = checkit; | |
</script> | |
<?php | |
} | |
add_action( 'login_head', 'remember_me_checked' ); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment