Changeset 12414
- Timestamp:
- 12/16/2009 04:38:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r12341 r12414 1789 1789 * 1790 1790 * The excerpt word amount will be 55 words and if the amount is greater than 1791 * that, then the string ' [...]' will be appended to the excerpt. If the string1791 * that, then the string ' [...]' will be appended to the excerpt. If the string 1792 1792 * is less than 55 words, then the content will be returned as is. 1793 1793 * 1794 1794 * The 55 word limit can be modified by plugins/themes using the excerpt_length filter 1795 * The ' [..]' string can be modified by plugins/themes using the excerpt_more filter1795 * The ' [...]' string can be modified by plugins/themes using the excerpt_more filter 1796 1796 * 1797 1797 * @since 1.5.0 … … 1811 1811 $text = strip_tags($text); 1812 1812 $excerpt_length = apply_filters('excerpt_length', 55); 1813 $excerpt_more = apply_filters('excerpt_more', ' [...]');1813 $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); 1814 1814 $words = explode(' ', $text, $excerpt_length + 1); 1815 1815 if (count($words) > $excerpt_length) { 1816 1816 array_pop($words); 1817 array_push($words, $excerpt_more);1818 1817 $text = implode(' ', $words); 1818 $text = $text . $excerpt_more; 1819 1819 } 1820 1820 }
Note: See TracChangeset
for help on using the changeset viewer.