WordPress.org

Make WordPress Core

Ticket #10984: 10984.1.diff

File 10984.1.diff, 2.0 KB (added by Latz, 7 years ago)
  • wp-includes/feed.php

     
    146146        if ( !$feed_type )
    147147                $feed_type = get_default_feed();
    148148
    149         $content = apply_filters('the_content', get_the_content());
     149    $content = apply_filters('the_content', get_the_content(null, 0, true));
    150150        $content = str_replace(']]>', ']]>', $content);
    151151        return apply_filters('the_content_feed', $content, $feed_type);
    152152}
  • wp-includes/post-template.php

     
    177177 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
    178178 * @return string
    179179 */
    180 function get_the_content( $more_link_text = null, $strip_teaser = false ) {
     180function get_the_content( $more_link_text = null, $strip_teaser = false, $ignorepagination = false ) {
    181181        global $page, $more, $preview, $pages, $multipage;
    182182
    183183        $post = get_post();
     
    195195        if ( $page > count( $pages ) ) // if the requested page doesn't exist
    196196                $page = count( $pages ); // give them the highest numbered page that DOES exist
    197197
    198         $content = $pages[$page - 1];
     198    if ( $ignorepagination ) {
     199        $content = implode("\n", $pages);
     200    } else {
     201        $content = $pages[$page-1];
     202    }
    199203        if ( preg_match( '/<!--more(.*?)?-->/', $content, $matches ) ) {
    200204                $content = explode( $matches[0], $content, 2 );
    201205                if ( ! empty( $matches[1] ) && ! empty( $more_link_text ) )
  • wp-includes/formatting.php

     
    21902190function wp_trim_excerpt($text = '') {
    21912191        $raw_excerpt = $text;
    21922192        if ( '' == $text ) {
    2193                 $text = get_the_content('');
     2193        $text = get_the_content('', 0, true);
    21942194
    21952195                $text = strip_shortcodes( $text );
    21962196