Add wp_trim_excerpt filter. Props coffee2code. fixes #9558
git-svn-id: http://svn.automattic.com/wordpress/trunk@10981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7ac341174d
commit
3804199e9b
|
@ -1627,6 +1627,7 @@ function human_time_diff( $from, $to = '' ) {
|
||||||
* @return string The excerpt.
|
* @return string The excerpt.
|
||||||
*/
|
*/
|
||||||
function wp_trim_excerpt($text) {
|
function wp_trim_excerpt($text) {
|
||||||
|
$raw_excerpt = $text;
|
||||||
if ( '' == $text ) {
|
if ( '' == $text ) {
|
||||||
$text = get_the_content('');
|
$text = get_the_content('');
|
||||||
|
|
||||||
|
@ -1643,7 +1644,7 @@ function wp_trim_excerpt($text) {
|
||||||
$text = implode(' ', $words);
|
$text = implode(' ', $words);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $text;
|
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue