Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Forked from ipokkel/change_text_example.php
Last active December 7, 2023 21:36
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 kimwhite/e78dc430dee8c89ee1c350342180cee2 to your computer and use it in GitHub Desktop.
Save kimwhite/e78dc430dee8c89ee1c350342180cee2 to your computer and use it in GitHub Desktop.
gettext change Resend Email Text
<?php
// Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
add_filter( 'gettext', 'change_my_cost_example', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
add_filter( 'gettext', 'change_my_cost_example', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function change_my_cost_example( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Resend Confirmation Email':
$translated_text = __( 'Change this text ', 'pmpro-email-confirmation' );
break;
case 'A confirmation email has been sent to':
$translated_text = __( 'Change this text ', 'pmpro-email-confirmation' );
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment