]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/feed-rdf.php
WordPress 3.8.3
[autoinstalls/wordpress.git] / wp-includes / feed-rdf.php
1 <?php
2 /**
3  * RSS 1 RDF Feed Template for displaying RSS 1 Posts feed.
4  *
5  * @package WordPress
6  */
7
8 header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
9 $more = 1;
10
11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
12 <rdf:RDF
13         xmlns="http://purl.org/rss/1.0/"
14         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
15         xmlns:dc="http://purl.org/dc/elements/1.1/"
16         xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
17         xmlns:admin="http://webns.net/mvcb/"
18         xmlns:content="http://purl.org/rss/1.0/modules/content/"
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         ?>
27 >
28 <channel rdf:about="<?php bloginfo_rss("url") ?>">
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 /** This filter is documented in wp-includes/feed-rss2.php */ ?>
34         <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
35         <?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
36         <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
37         <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
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         ?>
46         <items>
47                 <rdf:Seq>
48                 <?php while (have_posts()): the_post(); ?>
49                         <rdf:li rdf:resource="<?php the_permalink_rss() ?>"/>
50                 <?php endwhile; ?>
51                 </rdf:Seq>
52         </items>
53 </channel>
54 <?php rewind_posts(); while (have_posts()): the_post(); ?>
55 <item rdf:about="<?php the_permalink_rss() ?>">
56         <title><?php the_title_rss() ?></title>
57         <link><?php the_permalink_rss() ?></link>
58         <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
59         <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
60         <?php the_category_rss('rdf') ?>
61 <?php if (get_option('rss_use_excerpt')) : ?>
62         <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
63 <?php else : ?>
64         <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
65         <content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>
66 <?php endif; ?>
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         ?>
75 </item>
76 <?php endwhile;  ?>
77 </rdf:RDF>