From 3804199e9b925181794ecf76003adcdff1460855 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 17 Apr 2009 06:59:33 +0000 Subject: [PATCH] Add wp_trim_excerpt filter. Props coffee2code. fixes #9558 git-svn-id: http://svn.automattic.com/wordpress/trunk@10981 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 98d258bc0..7cf43970e 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1627,6 +1627,7 @@ function human_time_diff( $from, $to = '' ) { * @return string The excerpt. */ function wp_trim_excerpt($text) { + $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); @@ -1643,7 +1644,7 @@ function wp_trim_excerpt($text) { $text = implode(' ', $words); } } - return $text; + return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } /**