Skip to content

Instantly share code, notes, and snippets.

@sheabunge
Last active October 11, 2015 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheabunge/3810641 to your computer and use it in GitHub Desktop.
Save sheabunge/3810641 to your computer and use it in GitHub Desktop.
Automatically checks the "Remember Me" box on the WordPress login page
<?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