Make WordPress Core

Changeset 25532


Ignore:
Timestamp:
09/20/2013 11:01:01 PM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation of hooks for wp-includes/feed-rss2-comments.php.

Props dustyf.
See #25229.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/feed-rss2-comments.php

    r25009 r25532  
    1515    xmlns:atom="http://www.w3.org/2005/Atom"
    1616    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    17     <?php do_action('rss2_ns'); do_action('rss2_comments_ns'); ?>
    18     >
     17    <?php
     18    //duplicate_hook
     19    do_action( 'rss2_ns' );
     20    ?>
     21
     22    <?php
     23    /**
     24     * Fires at the end of the RSS root to add namespaces.
     25     *
     26     * @since 2.8.0
     27     */
     28    do_action( 'rss2_comments_ns' );
     29    ?>
     30>
    1931<channel>
    2032    <title><?php
     
    3042    <description><?php bloginfo_rss("description") ?></description>
    3143    <lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
     44    <?php //duplicate_hook ?>
    3245    <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
     46    <?php //duplicate_hook ?>
    3347    <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
    34     <?php do_action('commentsrss2_head'); ?>
    35 <?php
    36 if ( have_comments() ) : while ( have_comments() ) : the_comment();
    37     $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
    38 ?>
     48    <?php
     49    /**
     50     * Fires at the end of the RSS2 comment feed header.
     51     *
     52     * @since 2.3.0
     53     */
     54    do_action( 'commentsrss2_head' );
     55
     56    if ( have_comments() ) : while ( have_comments() ) : the_comment();
     57        $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
     58    ?>
    3959    <item>
    4060        <title><?php
    4161            if ( !is_singular() ) {
    4262                $title = get_the_title($comment_post->ID);
     63                //duplicate_hook
    4364                $title = apply_filters('the_title_rss', $title);
    4465                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
     
    5879        <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
    5980<?php endif; // post pass
    60     do_action('commentrss2_item', $comment->comment_ID, $comment_post->ID);
     81    /**
     82     * Fires at the end of each RSS2 comment feed item.
     83     *
     84     * @since 2.1.0
     85     *
     86     * @param int $comment->comment_ID The ID of the comment being displayed.
     87     * @param int $comment_post->ID    The ID of the post the comment is connected to.
     88     */
     89    do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
    6190?>
    6291    </item>
Note: See TracChangeset for help on using the changeset viewer.