post_content; //Gets post_content to be used as a basis for the excerpt } $excerpt_length = 90; //Set excerpt length by string length $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images return $the_excerpt; } public static function substr_no_word_breaks($input, $start, $length) { $input = substr( $input, $start ); if (preg_match('/^.{1,'.$length.'}\b/s', $input, $match)) { $out=$match[0]; } return $out; } } ?>