output_short()

Функция выводит текст сообщений в упрощенном режиме, в отличии от output_text() здесь вырезается всё кроме смайлов и текста. BB теги преобразуются в обычный текст.

Фильтры: ds_output_short

Использование

echo output_short($msg); 

Код функции

function output_short($str) 
{
    $array = get_text_array($str); 
    
    if ($array['content']) {
    	$text = htmlentities($array['content'], ENT_QUOTES, 'UTF-8'); 
    	$text = strip_tags(bbcode($text)); 
    	$text = ds_filter_emoji($text); 
    }

    elseif (!empty($array['data']['attachments'])) {
		$text = __('файл'); 
    }

    $text = use_filters('ds_output_short', $text, $array['content'], $array['data']); 

    return $text; 
}