WordPress.org

Forums

Uber Login Logo
[resolved] WP 3.8 truncates the custom login logo to width: 80px (14 posts)

  1. ymf
    Member
    Posted 1 year ago #

    WordPress 3.8 introduced the new CSS

    .login h1 a {
    width: 80px;
    }

    that truncates the custom login logo to width: 80px.

    http://wordpress.org/plugins/uber-login-logo/

  2. kitchin
    Member
    Posted 1 year ago #

    See http://wordpress.org/support/topic/wp-38-fix for my fix of a similar plugin.

  3. Harish Chouhan
    Member
    Posted 1 year ago #

    Having background-size: auto auto !important; in the output can resolve this. I have this in my other plugin http://wordpress.org/plugins/custom-login-logo/.

  4. Harish Chouhan
    Member
    Posted 1 year ago #

    I would suggest sharing the link of your login page, so we can check if there is any other plugin adding the code. So far when I check this plugins code, it also adds proper background size automatically and overrides default WP css.

  5. dan77
    Member
    Posted 1 year ago #

    thanks harish!

    I changed to width: auto; in line 177 of uber-login-logo.php
    and it works!

    public static function replaceLoginLogo()
        {
            $img_data = get_option('uber_login_logo');
    
            // use https for background-image if on ssl
            if (is_ssl()) {
                $img_data['src'] = preg_replace( "/^http:/i", "https:", $img_data['src'] );
            }
    
            if ($img_data) {
                $style = '<style type="text/css">';
                $style .= sprintf('.login h1 a { background: transparent url("%s") no-repeat center top; width: auto !important; background-size:%spx %spx; height: %spx;}', $img_data['src'], $img_data['width'], $img_data['height'], $img_data['height']);
    			$style .= '</style>';
                $style .= "\r\n" . '<!-- Uber Login Logo ' . self::VERSION . ' ' . self::UBERURL . ' -->' . "\r\n";
                echo $style;
            }
        }
  6. intrepid9
    Member
    Posted 1 year ago #

    I was going to say it broke but the code above fixed it :)

  7. Btchek
    Member
    Posted 1 year ago #

    thanks dan77 & Harish :-)

  8. ymf
    Member
    Posted 1 year ago #

    Thanks!

  9. 3cstudio
    Member
    Posted 1 year ago #

    Would rather this not have to be implemented for 40+ sites!
    Is this in the works as an update to the plugin itself?

  10. Harish Chouhan
    Member
    Posted 1 year ago #

    @3cstudio, you an try to find the developers contact details and let them know. I am sure they would fix it asap. I had the similar issue in my plugin which I just updated. You can try it in the meanwhile http://wordpress.org/plugins/custom-login-logo/

  11. uberweb
    Member
    Plugin Author

    Posted 1 year ago #

    Shouldn't be a huge fix. Will get something out today.

  12. 3cstudio
    Member
    Posted 1 year ago #

    Thanks Alex! Worked like a charm... and if anyone has many sites, I recommend you use something like WP Remote to update All, if you don't have a process already in place. :)

    Thanks again,

    Steve C.
    3Cstudio

  13. csbecker
    Member
    Posted 1 year ago #

    Alternatively, and without a plugin, you could add this to your functions.php:

    /******* Customize Login Logo ******/
    function my_custom_login_logo() {
        echo '<style type="text/css">
           #login h1 a { background-image:url('.get_bloginfo('stylesheet_directory').'/images/login_logo.png) !important; background-size: 320px 123px !important; height: 123px !important; width: 320px !important; }
        </style>';
    }
    add_action('login_head', 'my_custom_login_logo');

    Chris.

  14. Harish Chouhan
    Member
    Posted 1 year ago #

    @csbecker the plugin uses similar code, but best practise is to use a plugin for such things, or else when changing theme the customizations are lost.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.