Ticket #25229: wp-includes-feed-rdf.2.diff
File wp-includes-feed-rdf.2.diff, 3.5 KB (added by , 11 years ago) |
---|
-
wp-includes/feed-rdf.php
5 5 * @package WordPress 6 6 */ 7 7 8 header( 'Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);8 header( 'Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true ); 9 9 $more = 1; 10 10 11 echo '<?xml version="1.0" encoding="'.get_option( 'blog_charset').'"?'.'>'; ?>11 echo '<?xml version="1.0" encoding="'.get_option( 'blog_charset' ).'"?'.'>'; ?> 12 12 <rdf:RDF 13 13 xmlns="http://purl.org/rss/1.0/" 14 14 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" … … 16 16 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 17 17 xmlns:admin="http://webns.net/mvcb/" 18 18 xmlns:content="http://purl.org/rss/1.0/modules/content/" 19 <?php do_action('rdf_ns'); ?> 19 <?php 20 /** 21 * Fires at the end of the feed root to add namespaces. 22 * 23 * @since 2.0.0 24 */ 25 do_action( 'rdf_ns' ); 26 ?> 20 27 > 21 28 <channel rdf:about="<?php bloginfo_rss("url") ?>"> 22 <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title> 23 <link><?php bloginfo_rss('url') ?></link> 24 <description><?php bloginfo_rss('description') ?></description> 25 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date> 29 <title><?php bloginfo_rss( 'name' ); wp_title_rss(); ?></title> 30 <link><?php bloginfo_rss( 'url' ) ?></link> 31 <description><?php bloginfo_rss( 'description' ) ?></description> 32 <dc:date><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', get_lastpostmodified( 'GMT' ), false ); ?></dc:date> 33 <?php //duplicate_hook ?> 26 34 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod> 35 <?php //duplicate_hook ?> 27 36 <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency> 28 37 <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> 29 <?php do_action('rdf_header'); ?> 38 <?php 39 /** 40 * Fires at the end of the RDF feed header. 41 * 42 * @since 2.0.0 43 */ 44 do_action( 'rdf_header' ); 45 ?> 30 46 <items> 31 47 <rdf:Seq> 32 <?php while ( have_posts()): the_post(); ?>48 <?php while ( have_posts() ): the_post(); ?> 33 49 <rdf:li rdf:resource="<?php the_permalink_rss() ?>"/> 34 50 <?php endwhile; ?> 35 51 </rdf:Seq> 36 52 </items> 37 53 </channel> 38 <?php rewind_posts(); while ( have_posts()): the_post(); ?>54 <?php rewind_posts(); while ( have_posts() ): the_post(); ?> 39 55 <item rdf:about="<?php the_permalink_rss() ?>"> 40 56 <title><?php the_title_rss() ?></title> 41 57 <link><?php the_permalink_rss() ?></link> 42 <dc:date><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>58 <dc:date><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', $post->post_date_gmt, false ); ?></dc:date> 43 59 <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator> 44 <?php the_category_rss( 'rdf') ?>45 <?php if ( get_option('rss_use_excerpt')) : ?>60 <?php the_category_rss( 'rdf' ) ?> 61 <?php if ( get_option( 'rss_use_excerpt' ) ) : ?> 46 62 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> 47 63 <?php else : ?> 48 64 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> 49 <content:encoded><![CDATA[<?php the_content_feed( 'rdf') ?>]]></content:encoded>65 <content:encoded><![CDATA[<?php the_content_feed( 'rdf' ) ?>]]></content:encoded> 50 66 <?php endif; ?> 51 <?php do_action('rdf_item'); ?> 67 <?php 68 /** 69 * Fires at the end of each RDF feed item. 70 * 71 * @since 2.0.0 72 */ 73 do_action( 'rdf_item' ); 74 ?> 52 75 </item> 53 76 <?php endwhile; ?> 54 77 </rdf:RDF>