Make WordPress Core

Changeset 25530


Ignore:
Timestamp:
09/20/2013 10:26:08 PM (13 years ago)
Author:
DrewAPicture
Message:

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

Props dustyf for the initial patch.
See #25229.

File:
1 edited

Legend:

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

    r25315 r25530  
    1818        xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    1919        xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    20         <?php do_action('rss2_ns'); ?>
     20        <?php
     21        /**
     22         * Fires at the end of the RSS root to add namespaces.
     23         *
     24         * @since 2.0.0
     25         */
     26        do_action( 'rss2_ns' );
     27        ?>
    2128>
    2229
    … …  
    2835        <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
    2936        <language><?php bloginfo_rss( 'language' ); ?></language>
    30         <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
    31         <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
    32         <?php do_action('rss2_head'); ?>
    33         <?php while( have_posts()) : the_post(); ?>
     37        <?php
     38        $duration = 'hourly';
     39        /**
     40         * Filter how often to update the RSS feed.
     41         *
     42         * @since 2.1.0
     43         *
     44         * @param string $duration The update period.
     45         *                         Default 'hourly'. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'.
     46         */
     47        ?>
     48        <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', $duration ); ?></sy:updatePeriod>
     49        <?php
     50        $frequency = '1';
     51        /**
     52         * Filter the RSS update frequency.
     53         *
     54         * @since 2.1.0
     55         *
     56         * @param string $frequency An integer passed as a string representing the frequency
     57         *                          of RSS updates within the update period. Default '1'.
     58         */
     59        ?>
     60        <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', $frequency ); ?></sy:updateFrequency>
     61        <?php
     62        /**
     63         * Fires at the end of the RSS2 Feed Header.
     64         *
     65         * @since 2.0.0
     66         */
     67        do_action( 'rss2_head');
     68
     69        while( have_posts()) : the_post();
     70        ?>
    3471        <item>
    3572                <title><?php the_title_rss() ?></title>
    … …  
    5592                <slash:comments><?php echo get_comments_number(); ?></slash:comments>
    5693<?php rss_enclosure(); ?>
    57         <?php do_action('rss2_item'); ?>
     94        <?php
     95        /**
     96         * Fires at the end of each RSS2 feed item.
     97         *
     98         * @since 2.0.0
     99         */
     100        do_action( 'rss2_item' );
     101        ?>
    58102        </item>
    59103        <?php endwhile; ?>
Note: See TracChangeset for help on using the changeset viewer.