Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does cached getPageExcerpt function make sens?
#1
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.
Reply




Users browsing this thread: 1 Guest(s)