Perfect Excerpt in the WordPress Way

When I started working on the Neighbor Post Preview plugin, I expected WordPress to have a built-in function to get an excerpt from an arbitrary post. But it doesn’t have one, sadly. There is only an the_excerpt tag for use within The Loop. It’s defined in wp-includes/post-template.php (version 2.3.2 code): function the_excerpt() { echo apply_filters(‘the_excerpt’, […]