Skip to content

Instantly share code, notes, and snippets.

@mustafauysal
Created November 29, 2022 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafauysal/f0a25fea812ebf4846dfb1069cfbb5d2 to your computer and use it in GitHub Desktop.
Save mustafauysal/f0a25fea812ebf4846dfb1069cfbb5d2 to your computer and use it in GitHub Desktop.
Change magic login strings
<?php
add_filter( 'gettext', 'change_magic_login_strings', 10, 3 );
function change_magic_login_strings( $translated_text, $untranslated_text, $domain ) {
if ( 'magic-login' !== $domain ) {
return $translated_text;
}
if ( 'Username or Email Address' === $untranslated_text ) {
$translated_text = 'Email Address';
}
if ( 'Please enter your username or email address. You will receive an email message to log in.' === $untranslated_text ) {
$translated_text = 'Please enter your email address. You will receive an email message to log in.'; // you can update the message
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment