Created
February 5, 2025 12:30
-
-
Save ipokkel/85f64e1d3f54b2d82aae036c46a82540 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* 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