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
// Custom remove admin login redirect | |
function admin_login_redirect( $redirect_to, $request, $user ) | |
{ | |
global $user; | |
if( isset( $user->roles ) && is_array( $user->roles ) ) { | |
if( in_array( "administrator", $user->roles ) ) { | |
return $redirect_to; | |
} else { | |
return home_url(); | |
} |
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
// Set Remember Met to checked | |
function login_checked_remember_me() { | |
add_filter( 'login_footer', 'rememberme_checked' ); | |
} | |
add_action( 'init', 'login_checked_remember_me' ); | |
function rememberme_checked() { | |
echo "<script>document.getElementById('rememberme').checked = true;</script>"; | |
} | |
// END set Remember Me |