• I’m going to play around with the code in wp-login.php, but I’m wondering why on Chrome and Firefox the Login box says “Username or Email” while in IE8 it says “Username.”

    The issue is that people at my company have an irrational love for IE8, and hate usernames.

    I have BM Custom Login installed too. Would this make a difference?

    http://wordpress.org/extend/plugins/wp-email-login/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Beau Lebens

    (@beaulebens)

    This plugin uses Javascript to replace some values on that page to change the label. It’s possible that that code is not compatible with Internet Explorer (I haven’t tested to be honest).

    Do you get any Javascript errors on that page?

    If you find a solution I’d be happy to include it in the plugin.

    Hi Beau – this is jlankford on another account (didn’t realize I had this one). The following is happening:

    Message: ‘childNodes.0’ is null or not an object
    Line: 96
    Char: 3
    Code: 0
    URI: http://www.richsrecipes.net/wp-login.php?redirect_to=http%3A%2F%2Fwww.richsrecipes.net%2F

    Also, as you can see, there’s a redirect in there too.

    Not entirely sure if this reply should have its own thread, but the main ‘Username’ label could be filtered by something like this:

    add_filter( 'gettext', 'email_login_username_label', 10, 2 );
    function email_login_username_label( $translation, $text ) {
    	global $pagenow;
    	if ( ! is_user_logged_in() || 'wp-login.php' == $pagenow ) {
    		if ( $text === 'Username' ) {
    			$translation = __( 'Username or email', 'wp-email-login' );
    		}
    	}
    	return $translation;
    }

    I’m not really sure about the error notices however (and haven’t really paid attention to yet).

    I believe they can be included in the same filter, but it might be better to use the authenticate filter for these (which is the part I’m not really sure about).

    On second thought, equal should be identical:

    if ( ! is_user_logged_in() || 'wp-login.php' == $pagenow ) {

    should be

    if ( ! is_user_logged_in() || 'wp-login.php' === $pagenow ) {

    The first turned out to be the easiest solution:

    add_filter( 'gettext', 'username_or_email_login', 10, 2 );
    function username_or_email_login( $translation, $text ) {
    	global $pagenow;
    	if ( 'wp-login.php' === $pagenow ) {
    		if ( $text === 'Username' ) {
    			$translation = __( 'Username or email', 'wp-email-login' );
    		}
    		if ( $text === '<strong>ERROR</strong>: The username field is empty.' ) {
    			$translation = __( '<strong>ERROR</strong>: The username or email field is empty.', 'wp-email-login' );
    		}
    	}
    	return $translation;
    }

    Since the language files will have to be regenerated anyway I’ve changed “email” from the first string and “username or email” from the second string to all lowercase.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP Email Login] Internet Explorer Text Display Issue’ is closed to new replies.