From e5440f8156a60916abc5bf378fc17b1e2057991c Mon Sep 17 00:00:00 2001 From: westi Date: Mon, 22 Sep 2008 21:21:05 +0000 Subject: [PATCH] Add a filter on $excerpt_length. Fixes #7778 props dougal. git-svn-id: http://svn.automattic.com/wordpress/trunk@8958 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index f91c239422..20442146a5 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1324,7 +1324,7 @@ function wp_trim_excerpt($text) { $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); - $excerpt_length = 55; + $excerpt_length = apply_filters('excerpt_length', 55); $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words);