Skip to content

Instantly share code, notes, and snippets.

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 femiyb/e3ad3ee822f7c2bda17a1ef5a6d0f87b to your computer and use it in GitHub Desktop.
Save femiyb/e3ad3ee822f7c2bda17a1ef5a6d0f87b to your computer and use it in GitHub Desktop.
Replace "Email Address" with "Username or Email Address" on PMPro Login Form
<?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 to your PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
add_filter( 'the_content', 'register_text', 25 );
function register_text( $text ) {
global $pmpro_pages;
if (is_page( $pmpro_pages['login'] ) ) {
$text = str_replace( 'Email Address', 'Username or Email Address', $text );
}
return $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment