Make WordPress Core

Ticket #25229: wp-includes-feed-atom-comments.diff

File wp-includes-feed-atom-comments.diff, 2.1 KB (added by dustyf, 11 years ago)

First pass at wp-includes/feed-atom-comments.php

  • wp-includes/feed-atom-comments.php

     
    1212        xmlns="http://www.w3.org/2005/Atom"
    1313        xml:lang="<?php bloginfo_rss( 'language' ); ?>"
    1414        xmlns:thr="http://purl.org/syndication/thread/1.0"
    15         <?php do_action('atom_ns'); do_action('atom_comments_ns'); ?>
     15        <?php
     16        //duplicate_hook
     17        do_action('atom_ns');
     18        /**
     19         * Fired at the end of the Atom comments feed root to add namespaces.
     20         *
     21         * @since 2.8.0
     22         */
     23        do_action('atom_comments_ns'); ?>
    1624>
    1725        <title type="text"><?php
    1826                if ( is_singular() )
     
    3947        <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
    4048        <id><?php bloginfo_rss('comments_atom_url'); ?></id>
    4149<?php } ?>
    42 <?php do_action('comments_atom_head'); ?>
     50<?php
     51/**
     52 * Fired at the end of the Atom comment feed header.
     53 *
     54 * @since 2.8.0
     55 */
     56do_action('comments_atom_head');
     57?>
    4358<?php
    4459if ( have_comments() ) : while ( have_comments() ) : the_comment();
    4560        $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
     
    4863                <title><?php
    4964                        if ( !is_singular() ) {
    5065                                $title = get_the_title($comment_post->ID);
     66                                //duplicate_hook
    5167                                $title = apply_filters('the_title_rss', $title);
    5268                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
    5369                        } else {
     
    7995?>
    8096                <thr:in-reply-to ref="<?php comment_guid($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
    8197<?php endif;
    82         do_action('comment_atom_entry', $comment->comment_ID, $comment_post->ID);
     98        $comment_id = $comment->comment_ID;
     99        $comment_post_id = $comment_post->ID;
     100        /**
     101         * Fired at the end of each Atom comment feed item.
     102         *
     103         * @since 2.2.0
     104         *
     105         * @param $comment_id The ID of the comment being displayed.
     106         * @param $comment_post_id The ID of the post connected to the comment.
     107         */
     108        do_action('comment_atom_entry', $comment_id, $comment_post_id);
    83109?>
    84110        </entry>
    85111<?php endwhile; endif; ?>