WordPress.org

Make WordPress Core

Ticket #9134: 9134.patch

File 9134.patch, 1.5 KB (added by hakre, 7 years ago)

Make Comments in RSS2 and ATOM feed filterable.

  • wp-includes/feed-atom.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    4646<?php endif; ?>
    4747<?php atom_enclosure(); ?>
    4848<?php do_action('atom_entry'); ?>
     49<?php if ( apply_filters( 'atom_process_comments', true ) ) : ?>
    4950                <link rel="replies" type="text/html" href="<?php the_permalink_rss() ?>#comments" thr:count="<?php echo get_comments_number()?>"/>
    5051                <link rel="replies" type="application/atom+xml" href="<?php echo get_post_comments_feed_link(0,'atom') ?>" thr:count="<?php echo get_comments_number()?>"/>
    5152                <thr:total><?php echo get_comments_number()?></thr:total>
     53<?php endif; ?>
    5254        </entry>
    5355        <?php endwhile ; ?>
    5456</feed>
  • wp-includes/feed-rss2.php

     
    5050                <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
    5151        <?php endif; ?>
    5252<?php endif; ?>
     53<?php if ( apply_filters( 'rss2_process_comments', true ) ) : ?>
    5354                <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
    5455                <slash:comments><?php echo get_comments_number(); ?></slash:comments>
     56<?php endif; ?>
    5557<?php rss_enclosure(); ?>
    5658        <?php do_action('rss2_item'); ?>
    5759        </item>