PageRenderTime 44ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-includes/feed-rdf.php

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 54 lines | 47 code | 2 blank | 5 comment | 4 complexity | fbd89497f2f92b28d5e3a38cbb8dd861 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  1. <?php
  2. /**
  3. * RSS 1 RDF Feed Template for displaying RSS 1 Posts feed.
  4. *
  5. * @package WordPress
  6. */
  7. header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
  8. $more = 1;
  9. echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
  10. <rdf:RDF
  11. xmlns="http://purl.org/rss/1.0/"
  12. xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  13. xmlns:dc="http://purl.org/dc/elements/1.1/"
  14. xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  15. xmlns:admin="http://webns.net/mvcb/"
  16. xmlns:content="http://purl.org/rss/1.0/modules/content/"
  17. <?php do_action('rdf_ns'); ?>
  18. >
  19. <channel rdf:about="<?php bloginfo_rss("url") ?>">
  20. <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
  21. <link><?php bloginfo_rss('url') ?></link>
  22. <description><?php bloginfo_rss('description') ?></description>
  23. <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
  24. <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
  25. <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
  26. <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
  27. <?php do_action('rdf_header'); ?>
  28. <items>
  29. <rdf:Seq>
  30. <?php while (have_posts()): the_post(); ?>
  31. <rdf:li rdf:resource="<?php the_permalink_rss() ?>"/>
  32. <?php endwhile; ?>
  33. </rdf:Seq>
  34. </items>
  35. </channel>
  36. <?php rewind_posts(); while (have_posts()): the_post(); ?>
  37. <item rdf:about="<?php the_permalink_rss() ?>">
  38. <title><?php the_title_rss() ?></title>
  39. <link><?php the_permalink_rss() ?></link>
  40. <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
  41. <dc:creator><?php the_author() ?></dc:creator>
  42. <?php the_category_rss('rdf') ?>
  43. <?php if (get_option('rss_use_excerpt')) : ?>
  44. <description><?php the_excerpt_rss() ?></description>
  45. <?php else : ?>
  46. <description><?php the_excerpt_rss() ?></description>
  47. <content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>
  48. <?php endif; ?>
  49. <?php do_action('rdf_item'); ?>
  50. </item>
  51. <?php endwhile; ?>
  52. </rdf:RDF>