function _pm_email_notify_source_text in Privatemsg 7.2
Same name and namespace in other branches
- 6.2 pm_email_notify/pm_email_notify.module \_pm_email_notify_source_text()
Retrieves the default text for body and subject texts.
Parameters
$key: Defines with string to return, either subject or body.
Return value
The default text for the given key.
3 calls to _pm_email_notify_source_text()
- pm_email_notify_form_privatemsg_admin_settings_alter in pm_email_notify/
pm_email_notify.module - Implements hook_form_FORM_ID_alter().
- pm_email_notify_i18n_string_list in pm_email_notify/
pm_email_notify.module - Refresh callback to update the string translation sources.
- pm_email_notify_text in pm_email_notify/
pm_email_notify.module - Returns body or subject strings.
File
- pm_email_notify/
pm_email_notify.module, line 258 - Notifies users about new Private Messages via Email.
Code
function _pm_email_notify_source_text($key) {
$text = variable_get('pm_email_notify_' . $key, FALSE);
if (empty($text)) {
switch ($key) {
case 'subject':
$text = 'New private message at [site:name].';
break;
case 'body':
$text = "Hi [privatemsg_message:recipient],\n\nThis is an automatic reminder from the site [site:name]. You have received a new private message from [privatemsg_message:author].\n\nTo read your message, follow this link:\n[privatemsg_message:url]\n\nIf you don't want to receive these emails again, change your preferences here:\n[privatemsg_message:recipient:edit-url]";
break;
}
}
return $text;
}