Last active
January 26, 2019 21:39
-
-
Save adamcapriola/58e3b1cd4050e6a74131d92ed3ca2819 to your computer and use it in GitHub Desktop.
Filter WordPress login form labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter login form labels | |
* | |
* @link https://wpartisan.me/?p=444 | |
* | |
*/ | |
add_action( 'login_head', 'ac_login_head_form_labels' ); | |
function ac_login_head_form_labels() { | |
add_filter( 'gettext', 'ac_login_form_labels', 20, 3 ); | |
function ac_login_form_labels( $translated_text, $text, $domain ) { | |
if ( 'Username or Email Address' === $text ) { | |
$translated_text = 'Email Address'; | |
} | |
return $translated_text; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment