You are here

function messaging_template_post_render_text in Messaging 7

Post render message text (header, content, footer)

  • Token replacement if needed
  • Final text plain formatting
1 string reference to 'messaging_template_post_render_text'
messaging_template_element_info in messaging_template/messaging_template.module
Implements hook_element_info()

File

messaging_template/messaging_template.module, line 104
Messaging Template Drupal Messaging Framework

Code

function messaging_template_post_render_text($string, $element) {
  if (!empty($element['#tokens']) && !empty($element['#options']['replace']) && $element['#template']) {
    $string = $element['#template']
      ->token_replace($string);
  }
  if ($string && $element['#format'] == MESSAGING_FORMAT_PLAIN && empty($element['#plaintext'])) {
    $string = drupal_html_to_text($string);
  }
  return $string;
}