Created
June 9, 2013 23:37
-
-
Save xafarali/5745726 to your computer and use it in GitHub Desktop.
Customize Login Screen
This file contains hidden or 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 Login Screen -------------- | |
================================================== */ | |
add_action("login_head", "sepiaLogin"); | |
function sepiaLogin() { | |
project_admin_css(); | |
} | |
add_filter('login_headerurl', "mydomain"); | |
function mydomain() { | |
return get_bloginfo('url'); | |
} | |
add_filter('login_headertitle', 'sw_loginTitle'); | |
function sw_loginTitle() { | |
return get_bloginfo('name'); | |
} | |
add_filter("login_message", "myloginmsg"); | |
function myloginmsg() { | |
/*$msg = "<h2>welcome to the Site</h2>"; | |
return $msg;*/ | |
} | |
function str_lreplace($needle, $replace, $haystack) | |
{ | |
/* | |
int strrpos ( string $haystack , string $needle [, int $offset = 0 ] ) | |
Find the numeric position of the last occurrence of needle in the haystack string. | |
*/ | |
$pos = strrpos($haystack, $needle); | |
if($pos !== false) | |
{ | |
$subject = substr_replace($haystack, $replace, $pos, strlen($needle)); | |
} | |
return $subject; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment