Add wp_trim_excerpt filter. Props coffee2code. fixes #9558

git-svn-id: https://develop.svn.wordpress.org/trunk@10981 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-17 06:59:33 +00:00
parent 84615c3c0b
commit 91edad4f95

View File

@ -1627,6 +1627,7 @@ function human_time_diff( $from, $to = '' ) {
* @return string The excerpt. * @return string The excerpt.
*/ */
function wp_trim_excerpt($text) { function wp_trim_excerpt($text) {
$raw_excerpt = $text;
if ( '' == $text ) { if ( '' == $text ) {
$text = get_the_content(''); $text = get_the_content('');
@ -1643,7 +1644,7 @@ function wp_trim_excerpt($text) {
$text = implode(' ', $words); $text = implode(' ', $words);
} }
} }
return $text; return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
} }
/** /**