diff --git a/core/includes/mail.inc b/core/includes/mail.inc index f58a76e..c1da474 100644 --- a/core/includes/mail.inc +++ b/core/includes/mail.inc @@ -13,7 +13,7 @@ define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') !== FALSE ? "\r\n" : "\n"); /** - * Compose and optionally send an e-mail message. + * Composes and optionally sends an e-mail message. * * Sending an e-mail works with defining an e-mail template (subject, text * and possibly e-mail headers) and the replacement values to use in the @@ -191,8 +191,7 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N } /** - * Returns an object that implements the Drupal\Core\Mail\MailInterface - * interface. + * Returns an object that implements Drupal\Core\Mail\MailInterface. * * Allows for one or more custom mail backends to format and send mail messages * composed using drupal_mail(). @@ -287,7 +286,7 @@ function drupal_mail_system($module, $key) { } /** - * Perform format=flowed soft wrapping for mail (RFC 3676). + * Performs format=flowed soft wrapping for mail (RFC 3676). * * We use delsp=yes wrapping, but only break non-spaced languages when * absolutely necessary to avoid compatibility issues. @@ -330,8 +329,7 @@ function drupal_wrap_mail($text, $indent = '') { } /** - * Transform an HTML string into plain text, preserving the structure of the - * markup. Useful for preparing the body of a node to be sent by e-mail. + * Transforms an HTML string into plain text, preserving its structure. * * The output will be suitable for use as 'format=flowed; delsp=yes' text * (RFC 3676) and can be passed directly to drupal_mail() for sending. @@ -510,9 +508,9 @@ function drupal_html_to_text($string, $allowed_tags = NULL) { } /** - * Helper function for array_walk in drupal_wrap_mail(). - * * Wraps words on a single line. + * + * Callback for array_walk() winthin drupal_wrap_mail(). */ function _drupal_wrap_mail_line(&$line, $key, $values) { // Use soft-breaks only for purely quoted or unindented text. @@ -522,9 +520,9 @@ function _drupal_wrap_mail_line(&$line, $key, $values) { } /** - * Helper function for drupal_html_to_text(). - * * Keeps track of URLs and replaces them with placeholder tokens. + * + * Callback for preg_replace_callback() within drupal_html_to_text(). */ function _drupal_html_to_mail_urls($match = NULL, $reset = FALSE) { global $base_url, $base_path; @@ -549,18 +547,18 @@ function _drupal_html_to_mail_urls($match = NULL, $reset = FALSE) { } /** - * Helper function for drupal_wrap_mail() and drupal_html_to_text(). + * Replaces non-quotation markers from a given piece of indentation with spaces. * - * Replace all non-quotation markers from a given piece of indentation with spaces. + * Callback for array_map() within drupal_html_to_text(). */ function _drupal_html_to_text_clean($indent) { return preg_replace('/[^>]/', ' ', $indent); } /** - * Helper function for drupal_html_to_text(). + * Pads the last line with the given character. * - * Pad the last line with the given character. + * @see drupal_html_to_text() */ function _drupal_html_to_text_pad($text, $pad, $prefix = '') { // Remove last line break.