Your snippet works fine for me.
Although, you should be testing the second argument, rather than the first. See the codex. You are testing for text that may already have been translated, so your string comparison could fail.
function custom_login_text ( $translated_text, $untranslated_text ) {
if (in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) )) {
if ( '← Back to %s' == $untranslated_text ){
$translated_text="Test";
}
return $translated_text;
}
}
add_filter( 'gettext', 'custom_login_text', 20, 2 );
Related Posts:
- Disable Or Redirect WP-login.php
- login_enqueue_scripts does not ovewrite the default styles
- Modify wp-login.php labels: Username to Email
- How to change “Registration complete. Please check your e-mail.” in wp-login.php
- How to use wp-login.php page only for logout?
- change register url on wp-login page
- Can’t access wp-admin
- How do you add a custom link to the wordpress login page?
- wp-login.php register/lost password links to buttons?
- How to trigger a login form notice message?
- A child theme version of wp-login
- reset password label text change
- Add text on wordpress admin login page
- Is it possible to remove the version number from the wp-login.php page?
- wp_login_form() redirect not redirecting users < admin
- Login redirect on wp theme
- Can’t log in. Log in button missing [closed]
- Require WP login for outside access
- Modify WP-Login Page With Javascript?
- if username or password is incorrect wp-login returns a blank page
- Where is the email content for retrieve_password_message stored?
- What is the CODEX intercept for wp-login.php?action=lostpassword
- Call header and footer on login page
- Prevent redirect on custom wordpress login form
- Replace standard Login and Register form for Woocommerce [closed]
- How to destroy sessions after a user logout [closed]
- How to add required attribute to wp_login_form fields?
- WordPress “remember me” – How should it work?
- Changing the title of “
- Log In & Log Out Code In Header
- How to fix Sign In option in WordPress
- How can I redirect on a url after successful registration?
- I lock the site’s contents, click on a post, redirect to login, enter uname+password but fail to redirect to article
- How to access the actual input html of the login form
- Creating a custom login on site.
- Login page wordpress tagline remove [duplicate]
- Adding line break in esc_html__
- Copying My account/Login/Register button outside header
- Issue with cookies in wp-login
- Add content in wp login page
- Is it possible to check if password is correct in wp_authenticate_user?
- Modify login page after clicking “login” button, and before it arrives at redirect
- How to enable “remember me” checkbox in login forms by default?
- custom login query for custom login form?
- WordPress reCAPTCHA Problem
- Customizing WordPress Login URL
- It is possible that to get data in wp_login.php to your own php file in wordpress?
- Add video to wordpress login page
- WordPress login form with fancybox
- I wanna create a custom login form template
- Add custom field in wp_login_form()
- Retrieve password only by login. Users with same email
- wp-login.php not returning error messages / or gives 404
- Registration page background color covering 1 screen not covering full page
- Custom error messages for login and lost password forms
- Custom login form
- Adding “Remember Me” in custom login
- How do I change the language of only the login page?
- How to keep always logged in development environment
- custom login page redirect to logged in user profile page
- send users logging in from wp-login.php directly to home page of site, rather than dashboard
- Attach to wp-login.php and xmlrpc.php
- How to auto login after registration? [duplicate]
- Why can’t /wp-login.php be load balanced?
- Customizing the WordPress login form
- Login error redirecting to wp-login page
- CSS style button For WP Login Function in page template
- Password reset – Disabled for LDAP accounts
- Replace dash with space in username on login
- Autologin only working the second time
- wp-admin – 404 after custom login form
- Redirect already logged in users away from a page to a specific page base on user role
- Auto login between word press subdomain and a .net website
- WordPress error on log out ‘Not Permitted’ and can’t log out
- force login and redirect to custom login page
- Accessing my site using wp-admin does not load
- Is wp_login_form secure on a non secure page?
- Enqueue stylesheet in plugin for wp-login.php
- Login and Forgot password in Lightbox
- Forcing frontend login with UI switch
- Change default login auth
- Where is the php file, that does the checks for login information?
- Show errormessages on wrong username/password on custom loginform?
- When i try to open Localhost/wordpress/wp-admin . An Error appears ” Registration Has been Disabled” . No login page is shown in the browser
- How do I change the language of the login page to Arabic?
- Hiding the WordPress login and password fields from login page
- Login form does not store/remember/suggest users password
- Infinite loop when logging out using custom login form
- WordPress Login & Register works in localhost but don’t work on server
- Custom password set/reset link in same URL format as default does’t work
- Using wp_login vs login_redirect to redirect based on user-meta
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Login Form Redirection
- WordPress Failed to Login (DB Error)
- How to place wp-login.php in page or page template?
- Theme Development for a Newbie
- Hide wp-login.php but not the widget
- How to validate password length in wordpress
- Login form- no feedback
- How to Disable Pre-population of Password on Password Reset