Add syndication frequency recommendations to rss2 feeds. See #3513 props _ck_.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-08-11 20:50:41 +00:00
parent 175c2b6fb1
commit ef8d0a6e30
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
>
<channel>
<title><?php
@ -28,6 +29,8 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
<description><?php bloginfo_rss("description") ?></description>
<pubDate><?php echo gmdate('r'); ?></pubDate>
<?php the_generator( 'rss2' ); ?>
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
<?php do_action('commentsrss2_head'); ?>
<?php
if ( have_comments() ) : while ( have_comments() ) : the_comment();

View File

@ -16,6 +16,7 @@ $more = 1;
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
<?php do_action('rss2_ns'); ?>
>
@ -27,6 +28,8 @@ $more = 1;
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
<?php the_generator( 'rss2' ); ?>
<language><?php echo get_option('rss_language'); ?></language>
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
<?php do_action('rss2_head'); ?>
<?php while( have_posts()) : the_post(); ?>
<item>