Changeset 44941 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 03/20/2019 03:48:46 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r44858 r44941 3679 3679 * 3680 3680 * @since 1.5.0 3681 * 3682 * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated. 3681 * @since 5.2.0 Added the `$post` parameter. 3682 * 3683 * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated. 3684 * @param WP_Post|object|int $post Optional. WP_Post instance or Post ID/object. Default is null. 3683 3685 * @return string The excerpt. 3684 3686 */ 3685 function wp_trim_excerpt( $text = '' ) {3687 function wp_trim_excerpt( $text = '', $post = null ) { 3686 3688 $raw_excerpt = $text; 3687 3689 if ( '' == $text ) { 3688 $text = get_the_content( '' ); 3690 $post = get_post( $post ); 3691 $text = get_the_content( '', false, $post ); 3689 3692 3690 3693 $text = strip_shortcodes( $text );
Note: See TracChangeset
for help on using the changeset viewer.