function _anonymous_publishing_email_text in Anonymous Publishing 5
Helper function; return email subject and body. If admin settings are set, return the overrided settings, else return defaults.
Parameters
$id: The message ID.
$variables: An array of substitutions.
Return value
The text with the substitution applied.
2 calls to _anonymous_publishing_email_text()
- anonymous_publishing_admin_settings in ./
anonymous_publishing.module - Page callback; Provide module settings page.
- _anonymous_publishing_node_insert in ./
anonymous_publishing.module - Node API insert helper.
File
- ./
anonymous_publishing.module, line 91 - Installation file for the anonymous_publishing module.
Code
function _anonymous_publishing_email_text($id, $variables = array()) {
// Check if an admin setting overrides the default string.
if ($admin_setting = variable_get('anonymous_publishing_email_' . $id, FALSE)) {
return strtr($admin_setting, $variables);
}
else {
switch ($id) {
case 'subject':
return t("Activate your post at !site", $variables);
case 'body':
return t("Your post at !site is ready to be activated.\n\n1.- Activate your post\nClick or copy the following link into your browser:\n\n!activation_uri\n\n2.-Manage your content\nSave this email to manage your post via the following links:\n\nView post: !view_uri\n\nEdit post: !edit_uri\n\nDelete post: !delete_uri\n\n", $variables);
}
}
}