Skip to content

Instantly share code, notes, and snippets.

@Shininglow
Last active Sep 28, 2021
Embed
What would you like to do?
// CUSTOM ADMIN LOGIN HEADER LOGO
function my_custom_login_logo()
{
echo '<style type="text/css"'> h1 a { background-image:url(' . get_stylesheet_directory_uri() . '/assets/images/logo_admin.png) !important; } '</style'>';
}
add_action('login_head', 'my_custom_login_logo');
@koraysels

This comment has been minimized.

Copy link

@koraysels koraysels commented Sep 28, 2021

euhhmmm this is very wrongly escaped and probably never tested... the correct escaped verison is this

    echo '<style  type="text/css"> h1 a {  background-image:url(' . get_stylesheet_directory_uri()  . '/logo_admin.png)  !important; } </style>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment