timple-c
11/29/2017 - 8:11 PM

Change TEXT login Wordpress

Change TEXT login Wordpress

add_filter( 'gettext', 'wpse17709_gettext', 10, 2 );
function wpse17709_gettext( $custom_translation, $login_texts ) {

    // Login Main Page
    if ( 'Username' == $login_texts ) { return ''; } // Username Label
    if ( 'Password' == $login_texts ) { return ''; } // Password Label
    if ( 'Remember Me' == $login_texts ) { return ''; } // Remember Checkbox
    if ( 'Log In' == $login_texts ) { return ''; } // Login Button
    if ( 'Lost your password?' == $login_texts ) { return ''; } // Lost Password Link
    if ( '← Back to %s' == $login_texts ) { return ''; } // Back to website

    // Login New Password
    if ( 'Please enter your username or email address. You will receive a link to create a new password via email.' == $login_texts ) { return ''; } // Message after logo
    if ( 'Username or E-mail:' == $login_texts ) { return ''; } // Label of username input
    if ( 'Log in' == $login_texts ) { return ''; } // Log In Link Text
    if ( 'Get New Password' == $login_texts ) { return ''; } // Button

    // Messages
    if ( 'You are now logged out.' == $login_texts ) { return ''; } // Log out message
    if ( 'User registration is currently not allowed.' == $login_texts ) { return ''; } // User registration disabled
    if ( 'Check your e-mail for the confirmation link.' == $login_texts ) { return ''; } // Check link confirmation on email
    if ( 'Check your e-mail for your new password.' == $login_texts ) { return ''; } // Check new password on email
    if ( 'Registration complete. Please check your e-mail.' == $login_texts ) { return ''; } // Registration complete
    if ( 'Your session has expired. Please log-in again.' == $login_texts ) { return ''; } // Expired Session
    if ( '<strong>You have successfully updated WordPress!</strong> Please log back in to experience the awesomeness.' == $login_texts ) { return ''; } // Sucessfully Wordpress Updated

    return $translation;

}