Created
October 22, 2017 16:11
-
-
Save kodie/50454a0370fabcdb8a36f25bb04e425b to your computer and use it in GitHub Desktop.
This file contains 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 | |
function sideroad_login_logo() { | |
$ratio = (get_custom_header()->height / get_custom_header()->width); | |
$width = 320; | |
$height = ($width * $ratio); | |
?> | |
<style type="text/css"> | |
#login h1 a, .login h1 a { | |
background-image: url('<?php header_image(); ?>'); | |
width: <?php echo $width; ?>px; | |
height: <?php echo $height; ?>px; | |
background-size: <?php echo $width; ?>px <?php echo $height; ?>px; | |
background-repeat: no-repeat; | |
padding-bottom: 30px; | |
} | |
</style> | |
<?php } | |
add_action( 'login_enqueue_scripts', 'sideroad_login_logo' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment