WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] After updating to 3.4 the "login_headerurl" & "login_headertitle" stoped wor (9 posts)

  1. Rami Yushuvaev
    Member
    Posted 2 years ago #

    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' );
  2. Rami Yushuvaev
    Member
    Posted 2 years ago #

    Confirmed that in 3 different sites.
    (All the sites are RTL - he_IL)

  3. Dr.Wily
    Member
    Posted 2 years ago #

    Any solutions ?

  4. ascottmccauley
    Member
    Posted 2 years ago #

    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>
  5. Rami Yushuvaev
    Member
    Posted 2 years ago #

    found my mistake - it should be "return" not "echo".

  6. ascottmccauley
    Member
    Posted 2 years ago #

    Aha! didn't catch that, but thanks.

  7. lawless
    Member
    Posted 2 years ago #

    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.

  8. DougJoseph
    Member
    Posted 2 years ago #

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

  9. Harish Chouhan
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.