Ticket #1526: wp-atom.php.diff
| File wp-atom.php.diff, 2.8 KB (added by , 20 years ago) |
|---|
-
wp-atom.php
12 12 13 13 ?> 14 14 <?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" 17 17 xmlns:dc="http://purl.org/dc/elements/1.1/" 18 18 xml:lang="<?php echo get_option('rss_language'); ?>" 19 19 > 20 20 <title><?php bloginfo_rss('name') ?></title> 21 21 <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> 26 28 27 29 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 28 30 <entry> 29 31 <author> 30 32 <name><?php the_author() ?></name> 31 33 </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> 33 35 <link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" /> 34 36 <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> 37 38 <?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> 39 40 <?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> 41 42 <?php endif; ?> 42 43 <?php rss_enclosure(); ?> 43 44 </entry>