_filter_url_trim
modules/filter/filter.module, строка 1170
- Версии
- 5 – 6
_filter_url_trim($text, $length = NULL)
Shortens long URLs to http://www.example.com/long/url...
Код
<?php
function _filter_url_trim($text, $length = NULL) {
static $_length;
if ($length !== NULL) {
$_length = $length;
}
if (strlen($text) > $_length) {
$text = substr($text, 0, $_length) .'...';
}
return $text;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии