Last active
December 6, 2023 09:23
-
-
Save MarkKevin08/ac4f03a2ef1daf71a377692b1565cca4 to your computer and use it in GitHub Desktop.
Auto check WPUM login page's "remember me" field
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
add_filter( 'login_form_fields', 'remember_me_checked' ); | |
function remember_me_checked($fields) { | |
if ( isset( $fields['login']['remember'] ) ) { | |
?> | |
<script type="text/javascript"> | |
function checkit() { | |
document.getElementById('remember').checked = true; | |
} | |
window.onload = checkit; | |
</script> | |
<?php | |
} | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment