Forked from strangerstudios/my_gettext_pmpro_mailchimp.php
Last active
February 19, 2025 15:27
-
-
Save kimwhite/6c4a5fcc44513bdb16cf4c06fcc3f4ff to your computer and use it in GitHub Desktop.
Change wording in PMPro MailChimp Opt In Box
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. | |
/** | |
* This recipe will Change wording in PMPro MailChimp Opt In Box | |
* Change the $translated_text = lines to the text you want. | |
* | |
* 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_gettext_pmpro_mailchimp($translated_text, $text, $domain) | |
{ | |
if ($domain == "pmpro-mailchimp") { | |
switch ($text) { | |
case "Opt-In Mailing List": | |
$translated_text = "Our List"; | |
break; | |
case "Join one or more of our mailing lists.": | |
$translated_text = "Join one or more of our newsletters."; | |
break; | |
case "Join our mailing list.": | |
$translated_text = "Join our newsletter list."; | |
break; | |
} | |
} | |
return $translated_text; | |
} | |
add_filter('gettext', 'my_gettext_pmpro_mailchimp', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment