plugins.php 397 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <?php namespace{ class plugins{ static function getShortText($text){ $pos = 16; $text = strip_tags($text); if(mb_strlen($text, 'UTF-8') > $pos) { $text = mb_substr($text, 0, $pos, 'UTF-8'); return $text.'...'; } else return $text; } } }