Make WordPress Core

Changeset 35098


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

Feeds: Simplify logic for checking if the do_feed_{$feed} action is hooked to any callbacks.

See [35097] for where the aforementioned hook was renamed to actually be dynamic, thus rendering creation of the extra $hook variable moot.

See #34264.

File:
1 edited

Legend:

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

    r35097 r35098  
    11591159        $feed = get_default_feed();
    11601160
    1161     $hook = 'do_feed_' . $feed;
    1162     if ( ! has_action( $hook ) )
     1161    if ( ! has_action( "do_feed_{$feed}" ) ) {
    11631162        wp_die( __( 'ERROR: This is not a valid feed template.' ), '', array( 'response' => 404 ) );
     1163    }
    11641164
    11651165    /**
Note: See TracChangeset for help on using the changeset viewer.