Changeset 13942
- Timestamp:
- 04/02/2010 07:10:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r13914 r13942 1845 1845 $excerpt_length = apply_filters('excerpt_length', 55); 1846 1846 $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); 1847 $words = explode(' ', $text, $excerpt_length + 1);1848 if ( count($words) > $excerpt_length) {1847 $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY); 1848 if ( count($words) > $excerpt_length ) { 1849 1849 array_pop($words); 1850 1850 $text = implode(' ', $words); 1851 1851 $text = $text . $excerpt_more; 1852 } else { 1853 $text = implode(' ', $words); 1852 1854 } 1853 1855 }
Note: See TracChangeset
for help on using the changeset viewer.