public function getExcerpt($content = null)
    {
        $raw = $exc = $this->base->post_excerpt;

        if (!strlen($exc)) {
            $exc = $content === null ? $this->getRawContent() : $content;
            $exc = strip_shortcodes($exc);
            $exc = apply_filters('the_content', $exc);
            $exc = str_replace(']]>', ']]&gt;', $exc);
            $exc = wp_trim_words(
                $exc,
                apply_filters('excerpt_length', 55),
                apply_filters('excerpt_more', ' ' . '[&hellip;]')
            );
        }

        return apply_filters('wp_trim_excerpt', $exc, $raw);
    }
public function getExcerpt($content = null)
    {
        $raw = $exc = $this->base->post_excerpt;

        if (!strlen($exc)) {
            $exc = $content === null ? $this->getRawContent() : $content;
            $exc = strip_shortcodes($exc);
            $exc = apply_filters('the_content', $exc);
            $exc = str_replace(']]>', ']]&gt;', $exc);
            $exc = wp_trim_words(
                $exc,
                apply_filters('excerpt_length', 55),
                apply_filters('excerpt_more', ' ' . '[&hellip;]')
            );
        }

        return apply_filters('wp_trim_excerpt', $exc, $raw);
    }
public function getExcerpt ( $ content = null ) { $ raw = $ exc = $ this -> base -> post_excerpt ; if ( ! strlen ( $ exc ) ) { $ exc = $ content === null ? $ this -> getRawContent ( ) : $ content ; $ exc = strip_shortcodes ( $ exc ) ; $ exc = apply_filters ( 'the_content' , $ exc ) ; $ exc = str_replace ( ']]>' , ']]&gt;' , $ exc ) ; $ exc = wp_trim_words ( $ exc , apply_filters ( 'excerpt_length' , 55 ) , apply_filters ( 'excerpt_more' , ' ' . '[&hellip;]' ) ) ; } return apply_filters ( 'wp_trim_excerpt' , $ exc , $ raw ) ; }
Get the post excerpt.

Adapted from wp_trim_excerpt() in wp-includes/formatting.php.

@param  string|null $content Optional. Base content to use for excerpt
if post excerpt isn't defined. Defaults to
post content
@return string
Get the post excerpt .