From 3b656ce72e7d4404df087fe205388dc16c750177 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@12414 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 8e9ba1f0e1..21f82d6d12 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);