Ticket #1526: wp-atom.php-patch.diff

File wp-atom.php-patch.diff, 2.8 kB (added by markjaquith, 3 years ago)

New patch by resmo

  • wp-atom.php

    old new  
    1212 
    1313?> 
    1414<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?> 
    15 <feed version="0.3" 
    16   xmlns="http://purl.org/atom/ns#
     15<feed 
     16  xmlns="http://www.w3.org/2005/Atom
    1717  xmlns:dc="http://purl.org/dc/elements/1.1/" 
    1818  xml:lang="<?php echo get_option('rss_language'); ?>" 
    1919  > 
    2020        <title><?php bloginfo_rss('name') ?></title> 
    2121        <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" /> 
    22         <tagline><?php bloginfo_rss("description") ?></tagline> 
    23         <modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></modified> 
    24         <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></copyright> 
    25         <generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator> 
     22        <link rel="self"      type="application/atom+xml" href="<?php bloginfo('atom_url') ?>" /> 
     23        <subtitle><?php bloginfo_rss("description") ?></subtitle> 
     24        <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated> 
     25        <rights>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></rights> 
     26        <id><?php bloginfo('url') ?>/</id> 
     27        <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator> 
    2628         
    2729        <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 
    2830        <entry> 
    2931                <author> 
    3032                        <name><?php the_author() ?></name> 
    3133                </author> 
    32                 <title type="text/html" mode="escaped"><![CDATA[<?php the_title_rss() ?>]]></title> 
     34                <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<?php the_title_rss() ?>]]></div></title> 
    3335                <link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" /> 
    3436                <id><?php the_guid(); ?></id> 
    35                 <modified><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></modified> 
    36                 <issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued> 
     37                <updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated> 
    3738                <?php the_category_rss('rdf') ?>  
    38                 <summary type="text/plain" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> 
     39                <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<?php the_excerpt_rss(); ?>]]></div></summary> 
    3940<?php if ( !get_settings('rss_use_excerpt') ) : ?> 
    40                 <content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content> 
     41                <content type="xhtml" xml:base="<?php permalink_single_rss() ?>"><div xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<?php the_content('', 0, '') ?>]]></div></content> 
    4142<?php endif; ?> 
    4243<?php rss_enclosure(); ?> 
    4344        </entry>