Changeset 45505 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 06/08/2019 06:41:08 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r45445 r45505 3681 3681 * Generates an excerpt from the content, if needed. 3682 3682 * 3683 * The excerpt word amount will be 55 words and if the amount is greater than 3684 * that, then the string ' […]' will be appended to the excerpt. If the string 3685 * is less than 55 words, then the content will be returned as is. 3683 * Returns a maximum of 55 words with an ellipsis appended if necessary. 3686 3684 * 3687 3685 * The 55 word limit can be modified by plugins/themes using the {@see 'excerpt_length'} filter … … 3708 3706 $text = str_replace( ']]>', ']]>', $text ); 3709 3707 3708 /* translators: Maximum number of words used in a post excerpt. */ 3709 $excerpt_length = intval( _x( '55', 'excerpt_length' ) ); 3710 3710 3711 /** 3711 * Filters the number of words in anexcerpt.3712 * Filters the maximum number of words in a post excerpt. 3712 3713 * 3713 3714 * @since 2.7.0 3714 3715 * 3715 * @param int $number The number of words. Default 55.3716 * @param int $number The maximum number of words. Default 55. 3716 3717 */ 3717 $excerpt_length = apply_filters( 'excerpt_length', 55 ); 3718 $excerpt_length = apply_filters( 'excerpt_length', $excerpt_length ); 3719 3718 3720 /** 3719 3721 * Filters the string in the "more" link displayed after a trimmed excerpt. … … 3726 3728 $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); 3727 3729 } 3730 3728 3731 /** 3729 3732 * Filters the trimmed excerpt string.
Note: See TracChangeset
for help on using the changeset viewer.