From 5f787023568cc25094121f13ce4d78fbb868a573 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Mon, 11 Aug 2008 20:50:41 +0000 Subject: [PATCH] Add syndication frequency recommendations to rss2 feeds. See #3513 props _ck_. git-svn-id: https://develop.svn.wordpress.org/trunk@8619 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/feed-rss2-comments.php | 3 +++ wp-includes/feed-rss2.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php index f75a792c10..42a7bcf47e 100644 --- a/wp-includes/feed-rss2-comments.php +++ b/wp-includes/feed-rss2-comments.php @@ -13,6 +13,7 @@ echo ''; 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/" > <?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(); diff --git a/wp-includes/feed-rss2.php b/wp-includes/feed-rss2.php index 3274583d32..77e17d546f 100644 --- a/wp-includes/feed-rss2.php +++ b/wp-includes/feed-rss2.php @@ -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>