Mailster has some internal texts which are used at various locations. By default, you can change them on the Text tab in the settings, but if you like a more flexible approach, you can simply change them by a hook via the mailster_text
filter.
Available Text snippets
Key ($option ) | Default Value |
---|---|
confirmation | Please confirm your subscription! |
success | Thanks for your interest! |
error | Following fields are missing or incorrect |
unsubscribe | You have successfully unsubscribed! |
unsubscribeerror | An error occurred! Please try again later! |
profile_update | Profile updated! |
newsletter_signup | Sign up to our newsletter |
email | |
firstname | First Name |
lastname | Last Name |
lists | Lists |
submitbutton | Subscribe |
profilebutton | Update Profile |
unsubscribebutton | Yes, unsubscribe me |
unsubscribelink | unsubscribe |
webversion | webversion |
forward | forward to a friend |
profile | update profile |
already_registered | You are already registered |
new_confirmation_sent | A new confirmation message has been sent |
enter_email | Please enter your email address |
gdpr_text | I agree to the privacy policy and terms. |
gdpr_error | You have to agree to the privacy policy and terms! |
general_checks : | Sorry, you cannot signup with this email address. |
smtp_mx_check | We weren’t able to check your email address. |
blocked_email | Sorry, your email address is not accepted! |
blocked_domain | Sorry, you are not allowed to signup with this domain. |
blocked_ip | Sorry, your IP address has been blocked from signing up. |
blocked_country | Sorry, your country has been blocked from signing up. |
Change code programmatically
Add the following snippet to your site. (Learn how):
add_filter( 'mailster_text', function( $string, $option, $fallback ) {
switch ( $option ) {
case 'confirmation':
$string = 'Please click on the link in your email confirmation';
break;
}
return $string;
}, 10, 3 );
Each time a text string is needed, it runs through this method. If the $option
is the “confirmation” it replaces the initial string with a new one. All other strings are bypassed and do not get changed.