mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 09:03:09 +01:00
Add wp_trim_excerpt filter. Props coffee2code. fixes #9558
git-svn-id: https://develop.svn.wordpress.org/trunk@10981 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
84615c3c0b
commit
91edad4f95
@ -1627,6 +1627,7 @@ function human_time_diff( $from, $to = '' ) {
|
||||
* @return string The excerpt.
|
||||
*/
|
||||
function wp_trim_excerpt($text) {
|
||||
$raw_excerpt = $text;
|
||||
if ( '' == $text ) {
|
||||
$text = get_the_content('');
|
||||
|
||||
@ -1643,7 +1644,7 @@ function wp_trim_excerpt($text) {
|
||||
$text = implode(' ', $words);
|
||||
}
|
||||
}
|
||||
return $text;
|
||||
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user