選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

89 行
2.6 KiB

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