Make WordPress Core

Changeset 12414


Ignore:
Timestamp:
12/16/2009 04:38:58 PM (15 years ago)
Author:
ryan
Message:

Make the excerpt_more filter include the space. Props demetris. fixes #11456

File:
1 edited

Legend:

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

    r12341 r12414  
    17891789 *
    17901790 * The excerpt word amount will be 55 words and if the amount is greater than
    1791  * that, then the string '[...]' will be appended to the excerpt. If the string
     1791 * that, then the string ' [...]' will be appended to the excerpt. If the string
    17921792 * is less than 55 words, then the content will be returned as is.
    17931793 *
    17941794 * The 55 word limit can be modified by plugins/themes using the excerpt_length filter
    1795  * The '[..]' string can be modified by plugins/themes using the excerpt_more filter
     1795 * The ' [...]' string can be modified by plugins/themes using the excerpt_more filter
    17961796 *
    17971797 * @since 1.5.0
     
    18111811        $text = strip_tags($text);
    18121812        $excerpt_length = apply_filters('excerpt_length', 55);
    1813         $excerpt_more = apply_filters('excerpt_more', '[...]');
     1813        $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
    18141814        $words = explode(' ', $text, $excerpt_length + 1);
    18151815        if (count($words) > $excerpt_length) {
    18161816            array_pop($words);
    1817             array_push($words, $excerpt_more);
    18181817            $text = implode(' ', $words);
     1818            $text = $text . $excerpt_more;
    18191819        }
    18201820    }
Note: See TracChangeset for help on using the changeset viewer.