Skip to content

Commit

Permalink
Use the site information on login page
Browse files Browse the repository at this point in the history
Improves the login page by settings site information on login logo.
Even if it can seem legit, it's not expected to go to wordpress.org
when clicking on the WordPress logo on the login page of YOUR site.
  • Loading branch information
7studio committed Jan 23, 2017
1 parent 798e148 commit c66554a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,31 @@ function thistle_hide_default_post_format_option() {
}
}
add_action( 'admin_head-options-writing.php', 'thistle_hide_default_post_format_option' );

if ( ! function_exists( 'thistle_login_headerurl' ) ) {
/**
* Sets the link URL of the header logo above login form with
* the Site Address. By default WordPress uses `https://wordpress.org/`.
*
* @param string $login_header_url Login header logo URL.
* @return string
*/
function thistle_login_headerurl( $url ) {
return get_home_url( '/' );
}
}
add_filter( 'login_headerurl', 'thistle_login_headerurl' );

if ( ! function_exists( 'thistle_login_headertitle' ) ) {
/**
* Sets the title attribute of the header logo above login form with
* the Site Title. By default WordPress uses "Powered by WordPress".
*
* @param string $login_header_title Login header logo title attribute.
* @return string
*/
function thistle_login_headertitle( $title ) {
return get_bloginfo( 'name', 'display' );
}
}
add_filter( 'login_headertitle', 'thistle_login_headertitle' );

0 comments on commit c66554a

Please sign in to comment.