Ticket #17608: 17608.diff
File 17608.diff, 1.2 KB (added by , 10 years ago) |
---|
-
wp-includes/formatting.php
1831 1831 * Generates an excerpt from the content, if needed. 1832 1832 * 1833 1833 * The excerpt word amount will be 55 words and if the amount is greater than 1834 * that, then the string ' [ ...]' will be appended to the excerpt. If the string1834 * that, then the string ' […]' will be appended to the excerpt. If the string 1835 1835 * is less than 55 words, then the content will be returned as is. 1836 1836 * 1837 1837 * The 55 word limit can be modified by plugins/themes using the excerpt_length filter 1838 * The ' [ ...]' string can be modified by plugins/themes using the excerpt_more filter1838 * The ' […]' string can be modified by plugins/themes using the excerpt_more filter 1839 1839 * 1840 1840 * @since 1.5.0 1841 1841 * … … 1853 1853 $text = str_replace(']]>', ']]>', $text); 1854 1854 $text = strip_tags($text); 1855 1855 $excerpt_length = apply_filters('excerpt_length', 55); 1856 $excerpt_more = apply_filters('excerpt_more', ' ' . '[ ...]');1856 $excerpt_more = apply_filters('excerpt_more', ' ' . '[…]'); 1857 1857 $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY); 1858 1858 if ( count($words) > $excerpt_length ) { 1859 1859 array_pop($words);