Ticket #12084: excerpt_tags2.diff
File excerpt_tags2.diff, 1.0 KB (added by , 15 years ago) |
---|
-
Users/steph/Documents/code/WordPressSVN/trunk/wp-includes/formatting.php
1807 1807 $raw_excerpt = $text; 1808 1808 if ( '' == $text ) { 1809 1809 $text = get_the_content(''); 1810 1811 $text = strip_shortcodes( $text );1812 1813 1810 $text = apply_filters('the_content', $text); 1814 1811 $text = str_replace(']]>', ']]>', $text); 1815 $text = strip_tags($text); 1812 $excerpt_tags = apply_filters('excerpt_tags', ''); 1813 $text = strip_tags($text, $excerpt_tags); 1816 1814 $excerpt_length = apply_filters('excerpt_length', 55); 1817 1815 $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); 1818 1816 $words = explode(' ', $text, $excerpt_length + 1); 1819 1817 if (count($words) > $excerpt_length) { 1820 1818 array_pop($words); 1821 1819 $text = implode(' ', $words); 1820 $text = force_balance_tags($text); 1822 1821 $text = $text . $excerpt_more; 1823 1822 } 1824 1823 }