Forked from MaryOJob/my_pmpro_replace_mail_emailandusername.php
Last active
September 11, 2026 12:30
-
-
Save kimwhite/a441f8fec2cec552d6886df80542cb4a to your computer and use it in GitHub Desktop.
Replace "Username or Email Address" with "Uswername" with on PMPro Login Form Example
This file contains hidden or 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 // Do not copy this line please. Copy from below. | |
| /** | |
| * This filter will search your codebase for translatable strings and replace when an exact match is found. | |
| * Replace "Email Address" with "Username or Email Address" on PMPro Login Form | |
| * Add this code with a Snippet Plugin or your own custom plugin. | |
| * This is an example to get you started. Use at your own risk. | |
| */ | |
| add_filter( 'gettext', 'register_text' ); | |
| function register_text( $translating ) { | |
| $translated = str_ireplace( 'Username or Email Address', 'Username', $translating ); | |
| return $translated; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment