Custom admin logo not showing after wordpress 4.5 upgrade

I have just upgraded to wordpress 4.5 and now my custom logo for the admin doesn’t work, the theme which I built uses the following in the theme functions.php:

/* change admin logo */
function my_login_logo() { ?>
<style type="text/css">
    .login h1 a {
        background-image: url(<?php echo get_field('logo','options'); ?>);
        background-position: center center;
        background-repeat: no-repeat;
        background-size: cover;
        width: 320px !important;
        height: 99px !important;
        margin-bottom: 20px !important;
    }

    .login form {
        margin-top: 0px;
    }
</style>
<?php }

add_action( 'login_enqueue_scripts', 'my_login_logo' );

I cannot find a work around for this, can anyone help?

Solutions Collecting From Web of "Custom admin logo not showing after wordpress 4.5 upgrade"

I think you have the logo called from the Theme Options try updating your Theme Options alternatively you have many plugins that can help you achieve that.
Like:
https://wordpress.org/plugins/add-logo-to-admin/

You can always refer to the WordPress Codes

https://codex.wordpress.org/Customizing_the_Login_Form

Add !important; to EVERYTHING and that should solve your problem. You don’t have your first 4 background items as !important; so they are being overridden. This is why it doesn’t work anymore.

You might try changing the class login to an id login. Replace .login h1 a {…} with #login h1 a {…}.

I just added the id (#login h1 a) to the function and that worked fine.

function my_login_logo() { ?>
    <style type="text/css">
        #login h1 a, .login h1 a {
            background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/login-logo_320px.png);
            padding-bottom: 30px;background-size:160px 160px;width:160px;height:160px;
        }
        .login form {
            background: #f1f1f1 none repeat scroll 0 0;
            border: 1px solid rgba(14, 118, 188, 0.5);
            box-shadow: 0 0 0 rgba(0, 0, 0, 0.13);
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );