WordPress.org

Make WordPress Core

Ticket #4697: rss-content-types.diff

File rss-content-types.diff, 1.9 KB (added by Otto42, 7 years ago)

Change text/xml to application/rss+xml in the various rss feeds

  • wp-includes/feed-rss.php

     
    11<?php 
    2 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); 
     2header('Content-Type: application/rss+xml; charset=' . get_option('blog_charset'), true); 
    33$more = 1; 
    44 
    55?> 
  • wp-includes/feed-rss2-comments.php

     
    11<?php 
    2 header('Content-Type: text/xml;charset=' . get_option('blog_charset'), true); 
     2header('Content-Type: application/rss+xml;charset=' . get_option('blog_charset'), true); 
    33 
    4 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';  
     4echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; 
    55?> 
    66<!-- generator="wordpress/<?php echo $wp_version ?>" --> 
    7 <rss version="2.0"  
     7<rss version="2.0" 
    88        xmlns:content="http://purl.org/rss/1.0/modules/content/"> 
    99<channel> 
    1010        <title><?php 
     
    2020        <pubDate><?php echo gmdate('r'); ?></pubDate> 
    2121        <generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator> 
    2222 
    23 <?php  
     23<?php 
    2424if ( have_comments() ) : while ( have_comments() ) : the_comment(); 
    2525        $comment_post = get_post($comment->comment_post_ID); 
    2626        get_post_custom($comment_post->ID); 
  • wp-includes/feed-rss2.php

     
    11<?php 
    2 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); 
     2header('Content-Type: application/rss+xml; charset=' . get_option('blog_charset'), true); 
    33$more = 1; 
    44 
    55?>