Ticket #961: atom_feed.patch
| File atom_feed.patch, 4.9 KB (added by azaozz, 4 years ago) |
|---|
-
podpress.php
188 188 add_action('do_feed_rss', 'podPress_do_feed_rss2', 1, 1); 189 189 add_action('do_feed_rss2', 'podPress_do_feed_rss2', 1, 1); 190 190 remove_action('do_feed_atom', 'do_feed_atom', 10, 1); 191 add_action('do_feed_atom 1', 'podPress_do_feed_atom1', 1, 1);191 add_action('do_feed_atom', 'podPress_do_feed_atom1', 1, 1); 192 192 193 193 if(is_feed()) { 194 194 podPress_addFeedHooks(); -
wp-atom1.php
6 6 wp('feed=atom'); 7 7 } 8 8 9 header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);10 //header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true);9 //header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true); 10 header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true); 11 11 $more = 1; 12 ?> 13 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>12 13 echo '<?xml version="1.0" encoding="' . get_settings('blog_charset') . '"?' . '>'; ?> 14 14 <feed 15 xmlns="http://www.w3.org/2005/Atom" 16 xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" 17 xmlns:dc="http://purl.org/dc/elements/1.1/" 18 xml:lang="<?php echo get_option('rss_language'); ?>" 19 <?php do_action('atom_ns'); ?> 15 xmlns="http://www.w3.org/2005/Atom" 16 xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" 17 xmlns:dc="http://purl.org/dc/elements/1.1/" 18 xmlns:thr="http://purl.org/syndication/thread/1.0" 19 xml:lang="<?php echo get_option('rss_language'); ?>" 20 <?php do_action('atom_ns'); ?> 20 21 > 21 22 <id><?php bloginfo_rss('atom_url') ?></id> 22 <title ><?php bloginfo_rss('name')?></title>23 <title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title> 23 24 <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('atom_url') ?>" /> 24 25 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo_rss('rss2_url') ?>" /> 25 26 <link rel="alternate" type="text/html" hreflang="<?php echo get_option('rss_language'); ?>" href="<?php bloginfo_rss('home') ?>" /> 26 <subtitle type="xhtml"> 27 <div xmlns="http://www.w3.org/1999/xhtml"> 28 <strong><?php bloginfo_rss('description') ?></strong><br /><br /> 29 Insert more <strong>info</strong> about your blog here. 30 </div> 31 </subtitle> 32 33 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('gmt'), false); ?></updated> 27 <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle> 28 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated> 34 29 <rights>Copyright <?php echo mysql2date('Y', get_lastpostdate('gmt'), false); ?> <?php bloginfo_rss('name') ?></rights> 35 30 <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license> 36 31 <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator> 37 38 32 <author> 39 <name><?php bloginfo_rss('name') ?></name>33 <name><?php bloginfo_rss('name'); ?></name> 40 34 <uri><?php bloginfo_rss('siteurl'); ?></uri> 41 35 </author> 42 36 <?php do_action('atom_head'); ?> 43 37 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 44 38 <entry> 45 39 <id><?php the_guid(); ?></id> 46 <title type=" html"><?php the_title_rss() ?></title>40 <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title> 47 41 <link rel="alternate" type="text/html" hreflang="<?php echo get_option('rss_language'); ?>" href="<?php permalink_single_rss() ?>" /> 48 42 <link rel="related" type="application/rss+xml" href="<?php echo comments_rss(); ?>" /> 49 43 <author> … … 55 49 <?php the_category_rss('rdf') ?> 56 50 <rights>Copyright <?php echo get_post_time('Y', true); ?> <?php the_author() ?></rights> 57 51 <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license> 58 <summary type="xhtml"> 59 <div xmlns="http://www.w3.org/1999/xhtml"> 60 <?php the_excerpt_rss(); ?> 61 <br /><br /> 62 (<a href="<?php comments_link(); ?>">Comments</a>) 63 </div> 52 <summary type="<?php html_type_rss(); ?>"> 53 <![CDATA[<?php the_excerpt_rss(); ?><br /><br />(<a href="<?php comments_link(); ?>"><?php echo __('Comments');?></a>)]]> 64 54 </summary> 65 55 <?php if ( !get_settings('rss_use_excerpt') ) : ?> 66 <content type="xhtml"> 67 <div xmlns="http://www.w3.org/1999/xhtml"> 68 <?php the_content('', 0, '') ?> 69 <br /><br /> 70 (<a href="<?php comments_link(); ?>">Comments</a>) 71 </div> 56 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"> 57 <![CDATA[<?php the_content('', 0, '') ?><br /><br />(<a href="<?php comments_link(); ?>"><?php echo __('Comments');?></a>)]]> 72 58 </content> 73 59 <?php endif; ?> 74 60 <?php rss_enclosure(); ?>
