Make WordPress Core

Ticket #26869: do_feed.diff

File do_feed.diff, 918 bytes (added by DrewAPicture, 11 years ago)

$hook

  • src/wp-includes/functions.php

     
    10791079        if ( $feed == '' || $feed == 'feed' )
    10801080                $feed = get_default_feed();
    10811081
    1082         $hook = 'do_feed_' . $feed;
    1083         if ( ! has_action( $hook ) )
     1082        if ( ! has_action( "do_feed_{$feed}" ) )
    10841083                wp_die( __( 'ERROR: This is not a valid feed template.' ), '', array( 'response' => 404 ) );
    10851084
    10861085        /**
    10871086         * Fires once the given feed is loaded.
    10881087         *
    1089          * The dynamic hook name, $hook, refers to the feed name.
     1088         * The dynamic portion of the hook name, $feed, refers to the feed name.
    10901089         *
    10911090         * @since 2.1.0
    10921091         *
    10931092         * @param bool $is_comment_feed Whether the feed is a comment feed.
    10941093         */
    1095         do_action( $hook, $wp_query->is_comment_feed );
     1094        do_action( "do_feed_{$feed}", $wp_query->is_comment_feed );
    10961095}
    10971096
    10981097/**