2013-04-11, 20:36:06
Hello, everybody, something like this, similar to get_page_excerpt() one:
Code:
<?php
function getPageExcerpt($page, $n=200, $html=false) {
$content = returnPageContent($page, 'content');
$content_e = strip_decode($content);
$content_e = exec_filter('content',$content_e);
if (!$html) {
$content_e = strip_tags($content_e);
}
if (function_exists('mb_substr')) {
$content_e = trim(mb_substr($content_e, 0, $n)) . '...';
} else {
$content_e = trim(substr($content_e, 0, $n)) . '...';
}
echo $content_e;
}
?>
Regards, Paulo.