Support » Plugin: Email Login » Fix for wp-email-login in IE8/WP 3.8

  • In this config, the stock wp-email-login plugin will give you “node not found” javascript errors and here is a fix (just replace this function).

    Gives identical behavior to existing version:

    function username_or_email_login() {
    	if ( 'wp-login.php' != basename( $_SERVER['SCRIPT_NAME'] ) )
    		return;
    
    	?><script type="text/javascript">
    	// Form Label
    
    	(function(){
    	  var label = jQuery('body.login div#login form#loginform p label[for="user_login"]');
    	  var label_html = label[0];
    	  var text = label_html.innerHTML;
    	  var replacement_text = text.replace("Username", "Username or Email Address");
    	  label_html.innerHTML = replacement_text;
    	}());
    
    	// Error Messages
    	if ( document.getElementById('login_error') )
    		document.getElementById('login_error').innerHTML = document.getElementById('login_error').innerHTML.replace( '<?php echo esc_js( __( 'username' ) ); ?>', '<?php echo esc_js( __( 'Username or Email' , 'email-login' ) ); ?>' );
    
    	// Error Messages
    	</script><?php
    }

    https://wordpress.org/plugins/wp-email-login/

  • The topic ‘Fix for wp-email-login in IE8/WP 3.8’ is closed to new replies.