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
This commit is contained in:
parent
81818b9ed8
commit
e5440f8156
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue