WordPress.org

Make WordPress Core

Changeset 18824


Ignore:
Timestamp:
09/29/2011 09:48:03 PM (7 years ago)
Author:
markjaquith
Message:

Allow the text parameter in wp_trim_excerpt() to be omitted altogether, instead of requiring a blank string. props SergeyBiryukov. fixes #17492

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r18769 r18824  
    18521852 * @since 1.5.0
    18531853 *
    1854  * @param string $text The excerpt. If set to empty an excerpt is generated.
     1854 * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated.
    18551855 * @return string The excerpt.
    18561856 */
    1857 function wp_trim_excerpt($text) {
     1857function wp_trim_excerpt($text = '') {
    18581858    $raw_excerpt = $text;
    18591859    if ( '' == $text ) {
Note: See TracChangeset for help on using the changeset viewer.