_drupal_wrap_mail_line

Versions
6 – 7
_drupal_wrap_mail_line(&$line, $key, $values)

Helper function for array_walk in drupal_wrap_mail().

Wraps words on a single line.

Code

includes/mail.inc, line 422

<?php
function _drupal_wrap_mail_line(&$line, $key, $values) {
  // Use soft-breaks only for purely quoted or unindented text.
  $line = wordwrap($line, 77 - $values['length'], $values['soft'] ? "  \n" : "\n");
  // Break really long words at the maximum width allowed.
  $line = wordwrap($line, 996 - $values['length'], $values['soft'] ? " \n" : "\n");
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.