Skip to content

Instantly share code, notes, and snippets.

@eduardozulian
Created October 22, 2015 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardozulian/c3d07f77e05fd2a41b9e to your computer and use it in GitHub Desktop.
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
<?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