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: https://develop.svn.wordpress.org/trunk@18824 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b969d2ea80
commit
76251c5287
@ -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('');
|
||||
|
Loading…
Reference in New Issue
Block a user