WordPress.org

Make WordPress Core

Ticket #10984: full text for feeds.2.diff

File full text for feeds.2.diff, 839 bytes (added by simonwheatley, 11 years ago)

Amended patch to use $post->content, rather than concantenating the $pages (which sometimes drags in unwanted content)

  • 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 ( ! is_feed() )
     206                $content = $pages[$page-1];
     207        else
     208                $content = $post->post_content;
     209       
    206210        if ( preg_match('/<!--more(.*?)?-->/', $content, $matches) ) {
    207211                $content = explode($matches[0], $content, 2);
    208212                if ( !empty($matches[1]) && !empty($more_link_text) )