From 681d100fd6bf9794ff505487a8dc18ec663ec0d8 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 13 Oct 2015 01:06:26 +0000 Subject: [PATCH] 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 --- src/wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index b99d9985a0..87a8e5da3f 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -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.