You are here

function messaging_template_pre_render_text in Messaging 7

Prepare text

1 string reference to 'messaging_template_pre_render_text'
messaging_template_element_info in messaging_template/messaging_template.module
Implements hook_element_info()

File

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

Code

function messaging_template_pre_render_text($element) {
  $options = $element['#options'];
  if ($element['#format'] == MESSAGING_FORMAT_HTML) {
    $element += array(
      '#linebreak' => '<br />',
    );
  }
  else {

    //$element = messaging_template_pre_render_text_plain($element);
    $element += array(
      '#linebreak' => "\n",
    );

    // If it is the base element, add text wrapper. We just want to run it once for each part

    //$element['#post_render'][] = 'messaging_template_html_to_text';
  }

  // Propagate properties
  $element = messaging_template_pre_render_element($element);
  return $element;
}