output = $usertext;
else:
if ($excerpt) :
$this->output = $excerpt;
else :
$excerpt_base = ($shortcode) ? strip_tags(preg_replace('/\[caption(.*?)\[\/caption\]/', '', $content)) : strip_tags(strip_shortcodes($content));
$text = trim(preg_replace('/\s\s+/', ' ', str_replace(array("\r\n", "\n", "\r", " "), ' ', $excerpt_base)));
$length = ($count) ? $count : 3;
$style = ($type) ? $type : 'sentences';
if ($style == 'words') :
$short=array_slice(explode(' ', $text), $offset, $length);
$this->output=trim(implode(' ', $short));
else :
if ($style == 'sentences') :
$short=array_slice(preg_split("/([\t.!?]+)/", $text, -1, PREG_SPLIT_DELIM_CAPTURE), $offset*2, $length*2);
$this->output=trim(implode($short));
else :
$this->output=substr($text, $offset, $length);
endif;
endif;
endif;
endif;
if ($linespace) :
$short=preg_split("/([\t.!?]+)/", $this->output, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach ($short as $key => $pieces) :
if (!($key % 2)) :
$key2 = $key+1;
$tmpex[] = implode(array($short[$key], $short[$key2]));
endif;
endforeach;
$this->output=trim(implode('
', $tmpex));
endif;
if ($readmore) $this->output.=' '.$rmtext.'';
$return = ($filter) ? $this->output : apply_filters('the_excerpt', $this->output);
return $return;
} // get_excerpt
} // A5_Excerpt
?>