WordPress.org

Make WordPress Core

Ticket #6847: the_content_rss_filter_when_feed.patch

File the_content_rss_filter_when_feed.patch, 671 bytes (added by mystyman, 7 years ago)
  • wp-includes/post-template.php

     
    7575} 
    7676 
    7777function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { 
     78        global $post; 
    7879        $content = get_the_content($more_link_text, $stripteaser, $more_file); 
    79         $content = apply_filters('the_content', $content); 
     80        if ( is_feed() ) 
     81                $content = apply_filters('the_content_rss', $content); 
     82        else 
     83                $content = apply_filters('the_content', $content); 
    8084        $content = str_replace(']]>', ']]>', $content); 
    8185        echo $content; 
    8286}