You are here

function _pm_email_notify_source_text in Privatemsg 6.2

Same name and namespace in other branches
  1. 7.2 pm_email_notify/pm_email_notify.module \_pm_email_notify_source_text()

Get 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.

2 calls to _pm_email_notify_source_text()
pm_email_notify_locale_refresh 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
Return (if possible, translated) body/subject strings.

File

pm_email_notify/pm_email_notify.module, line 322
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.';
        break;
      case 'body':
        $text = "Hi !username,\n\nThis is an automatic reminder from the site !site. You have received a new private message from !author.\n\nTo read your message, follow this link:\n!message\n\nIf you don't want to receive these emails again, change your preferences here:\n!settings";
        break;
    }
  }
  return $text;
}