From 33c150d3debce3455b4f4e16ab707b392ff21bef Mon Sep 17 00:00:00 2001 From: markjaquith Date: Thu, 29 Sep 2011 21:48:03 +0000 Subject: [PATCH] Allow the text parameter in wp_trim_excerpt() to be omitted altogether, instead of requiring a blank string. props SergeyBiryukov. fixes #17492 git-svn-id: http://svn.automattic.com/wordpress/trunk@18824 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 57d39f1bc..abdb70166 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1851,10 +1851,10 @@ function human_time_diff( $from, $to = '' ) { * * @since 1.5.0 * - * @param string $text The excerpt. If set to empty an excerpt is generated. + * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated. * @return string The excerpt. */ -function wp_trim_excerpt($text) { +function wp_trim_excerpt($text = '') { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content('');