PHP Cross Reference of WordPress Subversion HEAD

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]

title

Body

[close]

/wp-includes/ -> feed-rss2-comments.php (source)

   1  <?php
   2  header('Content-Type: text/xml;charset=' . get_option('blog_charset'), true);
   3  
   4  echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
   5  ?>
   6  <rss version="2.0"
   7      xmlns:content="http://purl.org/rss/1.0/modules/content/"
   8      xmlns:dc="http://purl.org/dc/elements/1.1/"
   9      xmlns:atom="http://www.w3.org/2005/Atom"
  10      >
  11  <channel>
  12      <title><?php
  13          if ( is_singular() )
  14              printf(__('Comments on: %s'), get_the_title_rss());
  15          elseif ( is_search() )
  16              printf(__('Comments for %s searching on %s'), get_bloginfo_rss( 'name' ), attribute_escape($wp_query->query_vars['s']));
  17          else
  18              printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
  19      ?></title>
  20      <atom:link href="<?php bloginfo('comments_rss2_url') ?>" rel="self" type="application/rss+xml" />
  21      <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
  22      <description><?php bloginfo_rss("description") ?></description>
  23      <pubDate><?php echo gmdate('r'); ?></pubDate>
  24      <?php the_generator( 'rss2' ); ?>
  25      <?php do_action('commentsrss2_head'); ?>
  26  <?php
  27  if ( have_comments() ) : while ( have_comments() ) : the_comment();
  28      $comment_post = get_post($comment->comment_post_ID);
  29      get_post_custom($comment_post->ID);
  30  ?>
  31      <item>
  32          <title><?php
  33              if ( !is_singular() ) {
  34                  $title = get_the_title($comment_post->ID);
  35                  $title = apply_filters('the_title_rss', $title);
  36                  printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss());
  37              } else {
  38                  printf(__('By: %s'), get_comment_author_rss());
  39              }
  40          ?></title>
  41          <link><?php comment_link() ?></link>
  42          <dc:creator><?php echo get_comment_author_rss() ?></dc:creator>
  43          <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
  44          <guid><?php comment_link() ?></guid>
  45  <?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?>
  46          <description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>
  47          <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
  48  <?php else : // post pass ?>
  49          <description><?php comment_text_rss() ?></description>
  50          <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
  51  <?php endif; // post pass
  52      do_action('commentrss2_item', $comment->comment_ID, $comment_post->ID);
  53  ?>
  54      </item>
  55  <?php endwhile; endif; ?>
  56  </channel>
  57  </rss>


Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs Cross-referenced by PHPXref 0.6 and RedAlt