From b82594d1cd11aa6746cff0ddc50db97c9addab9d Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 16 Dec 2009 16:38:58 +0000 Subject: [PATCH] Make the excerpt_more filter include the space. Props demetris. fixes #11456 git-svn-id: http://svn.automattic.com/wordpress/trunk@12414 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 8e9ba1f0e..21f82d6d1 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1788,11 +1788,11 @@ function human_time_diff( $from, $to = '' ) { * Generates an excerpt from the content, if needed. * * The excerpt word amount will be 55 words and if the amount is greater than - * that, then the string '[...]' will be appended to the excerpt. If the string + * that, then the string ' [...]' will be appended to the excerpt. If the string * is less than 55 words, then the content will be returned as is. * * The 55 word limit can be modified by plugins/themes using the excerpt_length filter - * The '[..]' string can be modified by plugins/themes using the excerpt_more filter + * The ' [...]' string can be modified by plugins/themes using the excerpt_more filter * * @since 1.5.0 * @@ -1810,12 +1810,12 @@ function wp_trim_excerpt($text) { $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); $excerpt_length = apply_filters('excerpt_length', 55); - $excerpt_more = apply_filters('excerpt_more', '[...]'); + $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words); - array_push($words, $excerpt_more); $text = implode(' ', $words); + $text = $text . $excerpt_more; } } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);