-
+ F147AB13C6B1D7E82F0B8200E1CC7DB3F09C01995A4210EA2862564D1BC5231EF2430A02147A10DDADC011CE40A679D5541B17BC9701B2D09158E3E4E96A7DD4
mp-wp/wp-includes/feed-atom-comments.php
(0 . 0)(1 . 87)
88550 <?php
88551 /**
88552 * Atom Feed Template for displaying Atom Comments feed.
88553 *
88554 * @package WordPress
88555 */
88556
88557 header('Content-Type: application/atom+xml; charset=' . get_option('blog_charset'), true);
88558 echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
88559 ?>
88560 <feed
88561 xmlns="http://www.w3.org/2005/Atom"
88562 xml:lang="<?php echo get_option('rss_language'); ?>"
88563 <?php do_action('atom_ns'); ?>
88564 >
88565 <title type="text"><?php
88566 if ( is_singular() )
88567 printf(ent2ncr(__('Comments on: %s')), get_the_title_rss());
88568 elseif ( is_search() )
88569 printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), attribute_escape(get_search_query()));
88570 else
88571 printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
88572 ?></title>
88573 <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>
88574
88575 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated>
88576 <?php the_generator( 'atom' ); ?>
88577
88578 <?php if ( is_singular() ) { ?>
88579 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link(); ?>" />
88580 <link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
88581 <id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
88582 <?php } elseif(is_search()) { ?>
88583 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_option('home') . '?s=' . attribute_escape(get_search_query()); ?>" />
88584 <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" />
88585 <id><?php echo get_search_comments_feed_link('', 'atom'); ?></id>
88586 <?php } else { ?>
88587 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
88588 <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
88589 <id><?php bloginfo_rss('comments_atom_url'); ?></id>
88590 <?php } ?>
88591
88592 <?php
88593 if ( have_comments() ) : while ( have_comments() ) : the_comment();
88594 $comment_post = get_post($comment->comment_post_ID);
88595 get_post_custom($comment_post->ID);
88596 ?>
88597 <entry>
88598 <title><?php
88599 if ( !is_singular() ) {
88600 $title = get_the_title($comment_post->ID);
88601 $title = apply_filters('the_title_rss', $title);
88602 printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
88603 } else {
88604 printf(ent2ncr(__('By: %s')), get_comment_author_rss());
88605 }
88606 ?></title>
88607 <link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('html_type'); ?>" />
88608
88609 <author>
88610 <name><?php comment_author_rss(); ?></name>
88611 <?php if (get_comment_author_url()) echo '<uri>' . get_comment_author_url() . '</uri>'; ?>
88612
88613 </author>
88614
88615 <id><?php comment_link(); ?></id>
88616 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
88617 <published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
88618 <?php if ( post_password_required($comment_post) ) : ?>
88619 <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
88620 <?php else : // post pass ?>
88621 <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
88622 <?php endif; // post pass
88623 // Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)
88624 if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
88625 <thr:in-reply-to ref="<?php the_guid() ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
88626 <?php else : // This comment is in reply to another comment
88627 $parent_comment = get_comment($comment->comment_parent);
88628 // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system
88629 ?>
88630 <thr:in-reply-to ref="<?php echo get_comment_link($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
88631 <?php endif;
88632 do_action('comment_atom_entry', $comment->comment_ID, $comment_post->ID);
88633 ?>
88634 </entry>
88635 <?php endwhile; endif; ?>
88636 </feed>