WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] After updating to 3.4 the "login_headerurl" & "login_headertitle" stoped wor

[Resolved] After updating to 3.4 the "login_headerurl" & "login_headertitle" stoped wor

  • I like to redesign the default login screen by changing the image, the image URL and image title.

    Since updating to 3.4 the “login_headerurl” & “login_headertitle” filters stoped working.

    // Change Login URL
    function bdihot_login_url() {
    	echo get_home_url();
    }
    add_filter( 'login_headerurl', 'bdihot_login_url' );
    
    // Change Login Title
    function bdihot_login_title() {
    	echo get_bloginfo('name');
    }
    add_filter( 'login_headertitle', 'bdihot_login_title' );
Viewing 8 replies - 1 through 8 (of 8 total)
  • Confirmed that in 3 different sites.
    (All the sites are RTL – he_IL)

    Any solutions ?

    ascottmccauley
    Member

    @ascottmccauley

    Same problem here with a local install. A quick look at the core, and I don’t see any reason for the problem either.

    $login_header_url   = apply_filters( 'login_headerurl',   $login_header_url   );
    $login_header_title = apply_filters( 'login_headertitle', $login_header_title );
    ...
    ...
    <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1>

    found my mistake – it should be “return” not “echo”.

    ascottmccauley
    Member

    @ascottmccauley

    Aha! didn’t catch that, but thanks.

    lawless
    Participant

    @lawless

    Something definitely changed in core to break the old way of doing it. I had echo statements too and had to change them to return.

    I also noticed they now have a CSS background-size: 274px 63px; that has to be overwritten if you’re using a custom login logo. I’m having to write in a CSS style for .login h1 a to set the background-size to the exact size of my custom login logo.

    DougJoseph
    Member

    @dougjoseph

    Post moved elsewhere since this is marked resolved, and does not really address what I need.

    Harish Chouhan
    Participant

    @hchouhan

    @lawless For background-size, you can also use auto as that works and is better to add the dimensions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] After updating to 3.4 the "login_headerurl" & "login_headertitle" stoped wor’ is closed to new replies.