Last active
August 29, 2015 14:05
-
-
Save neoighodaro/38581b71489309855e6d to your computer and use it in GitHub Desktop.
WordPress Custom Login functions file
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
if ( ! function_exists( 'ck_custom_login_css' ) ) | |
{ | |
/** | |
* Load the custom login page CSS. | |
* | |
* @return void. | |
*/ | |
function ck_custom_login_css() | |
{ | |
echo '<link rel="stylesheet" type="text/css" href="'.get_stylesheet_directory_uri().'/login.css" />'; | |
} | |
} | |
add_action('login_head', 'ck_custom_login_css'); | |
if ( ! function_exists('ck_rememberme_checked')) | |
{ | |
/** | |
* Checks the "remember me" by default. | |
* | |
* @return void | |
*/ | |
function ck_rememberme_checked() | |
{ | |
echo "<script>document.getElementById('rememberme').checked = true;</script>"; | |
} | |
} | |
add_action('login_footer', 'ck_rememberme_checked'); | |
// Hides the login error message | |
add_filter( 'login_errors', create_function( '$a', "return null;" ) ); | |
// Changes login logo URL to your homepage | |
add_filter( 'login_headerurl', create_function( '$a', "return '".get_bloginfo('url')."';" ) ); | |
// Change logo link title to your site name | |
add_filter( 'login_headertitle', create_function( '$a', "return '".get_bloginfo('name')."';" ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment