mirror of
https://github.com/e107inc/e107.git
synced 2025-07-16 12:36:26 +02:00
News: Meta-description character limit option added. ie. {NEWS_DESCRIPTION: limit=x}
This commit is contained in:
@ -1120,7 +1120,15 @@ class news_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function sc_newsmetadiz($parm=null)
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user