WordPress.org

Make WordPress Core

Ticket #10984: full text for feeds.diff

File full text for feeds.diff, 972 bytes (added by simonwheatley, 6 years ago)

Amends the_content to return full content in a feed context

  • Users/simon/Projects/StephenFry/trunk/site/wordpress/wp-includes/post-template.php

     
    202202        if ( $page > count($pages) ) // if the requested page doesn't exist 
    203203                $page = count($pages); // give them the highest numbered page that DOES exist 
    204204 
    205         $content = $pages[$page-1]; 
     205        // If this is a feed, then we want to honour the "full text" setting, 
     206        // otherwise we provide the appropriate page of content. 
     207        if ( ! is_feed() ) 
     208                $content = $pages[$page-1]; 
     209        else 
     210                $content = implode( ' ', $pages ); 
     211 
    206212        if ( preg_match('/<!--more(.*?)?-->/', $content, $matches) ) { 
    207213                $content = explode($matches[0], $content, 2); 
    208214                if ( !empty($matches[1]) && !empty($more_link_text) )