Shortened content function for WordPress

I got tired of creating my own custom excerpts in WordPress using a combination of substr() and strip_tags() so I wrote a tiny little function to cleanly call it in a template file. Also included a companion function for returning without formatting.

UPDATE: While this is still available on Github, I have dropped it in favor of using wp_trim_words with apply_filters( ‘the_content’ ).