PHP Cross Reference of WordPress Latest 1.5 Branch |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 <?php /* RDF 1.0 generator, original version by garym@teledyn.com */ 2 3 if (empty($feed)) { 4 $blog = 1; // enter your blog's ID 5 $feed = 'rdf'; 6 $doing_rss = 1; 7 require ('wp-blog-header.php'); 8 } 9 10 header('Content-type: application/rdf+xml; charset=' . get_settings('blog_charset'), true); 11 $more = 1; 12 13 ?> 14 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?> 15 <!-- generator="wordpress/<?php echo $wp_version ?>" --> 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 > 24 <channel rdf:about="<?php bloginfo_rss("url") ?>"> 25 <title><?php bloginfo_rss('name') ?></title> 26 <link><?php bloginfo_rss('url') ?></link> 27 <description><?php bloginfo_rss('description') ?></description> 28 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date> 29 <admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/> 30 <sy:updatePeriod>hourly</sy:updatePeriod> 31 <sy:updateFrequency>1</sy:updateFrequency> 32 <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> 33 <items> 34 <rdf:Seq> 35 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 36 <rdf:li rdf:resource="<?php permalink_single_rss() ?>"/> 37 <?php $wp_items[] = $row; $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?> 38 </rdf:Seq> 39 </items> 40 </channel> 41 <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?> 42 <item rdf:about="<?php permalink_single_rss() ?>"> 43 <title><?php the_title_rss() ?></title> 44 <link><?php permalink_single_rss() ?></link> 45 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date> 46 <dc:creator><?php the_author() ?></dc:creator> 47 <?php the_category_rss('rdf') ?> 48 <?php if (get_settings('rss_use_excerpt')) : ?> 49 <description><?php the_excerpt_rss() ?></description> 50 <?php else : ?> 51 <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description> 52 <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded> 53 <?php endif; ?> 54 55 </item> 56 <?php } } ?> 57 </rdf:RDF>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Sat Dec 1 06:52:09 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |