function _locale_import_shorten_comments
_locale_import_shorten_comments($comment)
Generate a short, one string version of the passed comment array
Parameters
$comment: An array of strings containing a comment.
Return value
Short one string version of the comment.
Related topics
File
- includes/locale.inc, line 1469
- Administration functions for locale.module.
Code
function _locale_import_shorten_comments($comment) { $comm = ''; while (count($comment)) { $test = $comm . substr(array_shift($comment), 1) . ', '; if (strlen($comm) < 130) { $comm = $test; } else { break; } } return trim(substr($comm, 0, -2)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!locale.inc/function/_locale_import_shorten_comments/7.x