You are here

function messaging_template_fallback_description in Messaging 6.3

Build description for template fallback

1 call to messaging_template_fallback_description()
messaging_template_edit_form in messaging_template/messaging_template.admin.inc
Edit message formats

File

messaging_template/messaging_template.admin.inc, line 325
Messaging Framework - Admin UI

Code

function messaging_template_fallback_description($type, $method, $fallback) {
  if (!$fallback) {
    return t('Empty text (no fallback)');
  }
  else {
    $variables = array(
      '%method' => isset($fallback->method) ? messaging_template_method_list($fallback->method) : t('Default text'),
      '!template' => theme('messaging_template_admin_type', $fallback->type),
    );
    if ($type == $fallback->type) {
      return t('Fall back: %method from this template.', $variables);
    }
    else {
      return t('Fall back: %method from template !template.', $variables);
    }
  }
}