Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ipokkel/85f64e1d3f54b2d82aae036c46a82540 to your computer and use it in GitHub Desktop.
Save ipokkel/85f64e1d3f54b2d82aae036c46a82540 to your computer and use it in GitHub Desktop.
<?php
/**
* Change the wording of the Register link for the MemberLite theme.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_change_memberlite_register_wording( $translated_text, $text, $domain ) {
// only change the wording for the memberlite text domain.
if ( 'memberlite' !== $domain ) {
return $translated_text;
}
switch( $text ) {
case 'Register':
$translated_text = __( 'Sign Up', 'memberlite' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_change_memberlite_register_wording', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment