Wordpress 2.3.3
[autoinstalls/wordpress.git] / wp-includes / feed-rdf.php
1 <?php
2 header('Content-Type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
3 $more = 1;
4
5 ?>
6 <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
7 <!-- generator="wordpress/<?php echo $wp_version ?>" -->
8 <rdf:RDF
9         xmlns="http://purl.org/rss/1.0/"
10         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
11         xmlns:dc="http://purl.org/dc/elements/1.1/"
12         xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
13         xmlns:admin="http://webns.net/mvcb/"
14         xmlns:content="http://purl.org/rss/1.0/modules/content/"
15         <?php do_action('rdf_ns'); ?>
16 >
17 <channel rdf:about="<?php bloginfo_rss("url") ?>">
18         <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
19         <link><?php bloginfo_rss('url') ?></link>
20         <description><?php bloginfo_rss('description') ?></description>
21         <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
22         <admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
23         <sy:updatePeriod>hourly</sy:updatePeriod>
24         <sy:updateFrequency>1</sy:updateFrequency>
25         <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
26         <?php do_action('rdf_header'); ?>
27         <items>
28                 <rdf:Seq>
29                 <?php while (have_posts()): the_post(); ?>
30                         <rdf:li rdf:resource="<?php the_permalink_rss() ?>"/>
31                 <?php endwhile; ?>
32                 </rdf:Seq>
33         </items>
34 </channel>
35 <?php rewind_posts(); while (have_posts()): the_post(); ?>
36 <item rdf:about="<?php the_permalink_rss() ?>">
37         <title><?php the_title_rss() ?></title>
38         <link><?php the_permalink_rss() ?></link>
39          <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
40         <dc:creator><?php the_author() ?></dc:creator>
41         <?php the_category_rss('rdf') ?>
42 <?php if (get_option('rss_use_excerpt')) : ?>
43         <description><?php the_excerpt_rss() ?></description>
44 <?php else : ?>
45         <description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?></description>
46         <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
47 <?php endif; ?>
48         <?php do_action('rdf_item'); ?>
49 </item>
50 <?php endwhile;  ?>
51 </rdf:RDF>