Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save paulund/5295960 to your computer and use it in GitHub Desktop.
Save paulund/5295960 to your computer and use it in GitHub Desktop.
There is a login box on the Wordpress admin area login page to make sure this is always checked use the following snippet. Only use this if you know the only time admin users access the admin area is going to be on a private computer. Example of using it is http://www.paulund.co.uk/set-remember-me-to-be-always-checked
<?php
function login_checked_remember_me() {
add_filter( 'login_footer', 'rememberme_checked' );
}
add_action( 'init', 'login_checked_remember_me' );
function rememberme_checked() {
echo "document.getElementById('rememberme').checked = true;";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment