Created
October 22, 2015 20:50
-
-
Save eduardozulian/c3d07f77e05fd2a41b9e to your computer and use it in GitHub Desktop.
Displays the registered WordPress Site Icon as a logo on the Login Form
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
<?php | |
/** | |
* Displays the registered Site Icon as a logo on the Login Form | |
*/ | |
function fltnt_add_site_icon_to_login() { | |
if ( function_exists( 'has_site_icon' ) && has_site_icon() ) { | |
?> | |
<style type="text/css"> | |
.login h1 a { | |
background-image: url(<?php site_icon_url(); ?>); | |
} | |
</style> | |
<?php | |
} | |
} | |
add_action( 'login_enqueue_scripts', 'fltnt_add_site_icon_to_login' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment