Last active
March 21, 2016 22:35
-
-
Save JeppeSigaard/881ff4d82b391336f945 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 | |
/* | |
Plugin name: Jeppes login logo | |
Description: tilføj eget logo til loginsiden. | |
*/ | |
// Hvis ikke indstillet, tilføj custom header theme-support | |
if (!current_theme_supports('custom-header'){ | |
$args = array( | |
'flex-width' => true, | |
'width' => 80, | |
'flex-height' => true, | |
'height' => 80, | |
); | |
add_theme_support( 'custom-header', $args ); | |
} | |
// Erstat wordpress logo, hvis header image er indstillet | |
function jio_login_logo() { | |
$image = get_header_image(); | |
if ($image !== '') : ?> | |
<style type="text/css"> | |
.login h1 a { | |
background-image: url(<?php echo $image; ?>); | |
padding-bottom: 30px; | |
background-size: contain; | |
} | |
</style> | |
<?php endif; } | |
add_action( 'login_enqueue_scripts', 'jio_login_logo' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment