1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-13 17:09:46 +01:00

News: Meta-description character limit option added. ie. {NEWS_DESCRIPTION: limit=x}

This commit is contained in:
Cameron 2017-05-03 13:27:17 -07:00
parent 7317fd1309
commit f975847ea1

View File

@ -1120,7 +1120,15 @@ class news_shortcodes extends e_shortcode
function sc_newsmetadiz($parm=null)
{
return e107::getParser()->toHtml($this->news_item['news_meta_description'],true);
$text = e107::getParser()->toHtml($this->news_item['news_meta_description'],true);
if(!empty($parm['limit']))
{
$text = e107::getParser()->text_truncate($text, $parm['limit']);
}
return $text;
}
}