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.


git-svn-id: https://develop.svn.wordpress.org/trunk@35098 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-10-13 01:06:26 +00:00
parent 1246590769
commit 681d100fd6
1 changed files with 2 additions and 2 deletions

View File

@ -1158,9 +1158,9 @@ function do_feed() {
if ( $feed == '' || $feed == 'feed' )
$feed = get_default_feed();
$hook = 'do_feed_' . $feed;
if ( ! has_action( $hook ) )
if ( ! has_action( "do_feed_{$feed}" ) ) {
wp_die( __( 'ERROR: This is not a valid feed template.' ), '', array( 'response' => 404 ) );
}
/**
* Fires once the given feed is loaded.