Make WordPress Core

Changeset 35097


Ignore:
Timestamp:
10/13/2015 01:02:47 AM (10 years ago)
Author:
DrewAPicture
Message:

Feeds: Adjust the do_feed_{$feed} hook name to actually be dynamic, rather than pre-storing the tag name in a variable and referencing that.

Props johnbillion.
Fixes #34264.

File:
1 edited

Legend:

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

    r35092 r35097  
    11661166     * Fires once the given feed is loaded.
    11671167     *
    1168      * The dynamic hook name, $hook, refers to the feed name.
     1168     * The dynamic portion of the hook name, `$feed`, refers to the feed template name.
     1169     * Possible values include: 'rdf', 'rss', 'rss2', and 'atom'.
    11691170     *
    11701171     * @since 2.1.0
     
    11721173     * @param bool $is_comment_feed Whether the feed is a comment feed.
    11731174     */
    1174     do_action( $hook, $wp_query->is_comment_feed );
     1175    do_action( "do_feed_{$feed}", $wp_query->is_comment_feed );
    11751176}
    11761177
Note: See TracChangeset for help on using the changeset viewer.