[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> feed-rdf.php (source)

   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 wp_title_rss(); ?></title>
  34      <link><?php bloginfo_rss( 'url' ); ?></link>
  35      <description><?php bloginfo_rss( 'description' ); ?></description>
  36      <dc:date><?php echo get_feed_build_date( 'Y-m-d\TH:i:s\Z' ); ?>    </dc:date>
  37      <sy:updatePeriod>
  38      <?php
  39          /** This filter is documented in wp-includes/feed-rss2.php */
  40          echo apply_filters( 'rss_update_period', 'hourly' );
  41      ?>
  42      </sy:updatePeriod>
  43      <sy:updateFrequency>
  44      <?php
  45          /** This filter is documented in wp-includes/feed-rss2.php */
  46          echo apply_filters( 'rss_update_frequency', '1' );
  47      ?>
  48      </sy:updateFrequency>
  49      <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
  50      <?php
  51      /**
  52       * Fires at the end of the RDF feed header.
  53       *
  54       * @since 2.0.0
  55       */
  56      do_action( 'rdf_header' );
  57      ?>
  58      <items>
  59          <rdf:Seq>
  60          <?php
  61          while ( have_posts() ) :
  62              the_post();
  63              ?>
  64              <rdf:li rdf:resource="<?php the_permalink_rss(); ?>"/>
  65          <?php endwhile; ?>
  66          </rdf:Seq>
  67      </items>
  68  </channel>
  69  <?php
  70  rewind_posts();
  71  while ( have_posts() ) :
  72      the_post();
  73      ?>
  74  <item rdf:about="<?php the_permalink_rss(); ?>">
  75      <title><?php the_title_rss(); ?></title>
  76      <link><?php the_permalink_rss(); ?></link>
  77  
  78      <dc:creator><![CDATA[<?php the_author(); ?>]]></dc:creator>
  79      <dc:date><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', $post->post_date_gmt, false ); ?></dc:date>
  80      <?php the_category_rss( 'rdf' ); ?>
  81  
  82      <?php if ( get_option( 'rss_use_excerpt' ) ) : ?>
  83          <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
  84      <?php else : ?>
  85          <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
  86          <content:encoded><![CDATA[<?php the_content_feed( 'rdf' ); ?>]]></content:encoded>
  87      <?php endif; ?>
  88  
  89      <?php
  90      /**
  91       * Fires at the end of each RDF feed item.
  92       *
  93       * @since 2.0.0
  94       */
  95      do_action( 'rdf_item' );
  96      ?>
  97  </item>
  98  <?php endwhile; ?>
  99  </rdf:RDF>


Generated: Fri Mar 29 01:00:02 2024 Cross-referenced by PHPXref 0.7.1