Skip to content

Instantly share code, notes, and snippets.

@xafarali
Created June 9, 2013 23:37
Show Gist options
  • Save xafarali/5745726 to your computer and use it in GitHub Desktop.
Save xafarali/5745726 to your computer and use it in GitHub Desktop.
Customize Login Screen
/* ===============================================
--------- 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