]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/feed-rdf.php
WordPress 4.0.1
[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
13 /** This action is documented in wp-includes/feed-rss2.php */
14 do_action( 'rss_tag_pre', 'rdf' );
15 ?>
16 <rdf:RDF
17         xmlns="http://purl.org/rss/1.0/"
18         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
19         xmlns:dc="http://purl.org/dc/elements/1.1/"
20         xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
21         xmlns:admin="http://webns.net/mvcb/"
22         xmlns:content="http://purl.org/rss/1.0/modules/content/"
23         <?php
24         /**
25          * Fires at the end of the feed root to add namespaces.
26          *
27          * @since 2.0.0
28          */
29         do_action( 'rdf_ns' );
30         ?>
31 >
32 <channel rdf:about="<?php bloginfo_rss("url") ?>">
33         <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
34         <link><?php bloginfo_rss('url') ?></link>
35         <description><?php bloginfo_rss('description') ?></description>
36         <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
37         <?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
38         <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
39         <?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
40         <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
41         <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
42         <?php
43         /**
44          * Fires at the end of the RDF feed header.
45          *
46          * @since 2.0.0
47          */
48         do_action( 'rdf_header' );
49         ?>
50         <items>
51                 <rdf:Seq>
52                 <?php while (have_posts()): the_post(); ?>
53                         <rdf:li rdf:resource="<?php the_permalink_rss() ?>"/>
54                 <?php endwhile; ?>
55                 </rdf:Seq>
56         </items>
57 </channel>
58 <?php rewind_posts(); while (have_posts()): the_post(); ?>
59 <item rdf:about="<?php the_permalink_rss() ?>">
60         <title><?php the_title_rss() ?></title>
61         <link><?php the_permalink_rss() ?></link>
62         <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
63         <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
64         <?php the_category_rss('rdf') ?>
65 <?php if (get_option('rss_use_excerpt')) : ?>
66         <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
67 <?php else : ?>
68         <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
69         <content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>
70 <?php endif; ?>
71         <?php
72         /**
73          * Fires at the end of each RDF feed item.
74          *
75          * @since 2.0.0
76          */
77         do_action( 'rdf_item' );
78         ?>
79 </item>
80 <?php endwhile;  ?>
81 </rdf:RDF>