From 48811702cd9e77a4e3cca5c36ce9f1796d9f22ed Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 13 Oct 2015 01:07:25 +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. Built from https://develop.svn.wordpress.org/trunk@35098 git-svn-id: http://core.svn.wordpress.org/trunk@35063 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b99d9985a0..87a8e5da3f 100644 --- a/wp-includes/functions.php +++ b/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. diff --git a/wp-includes/version.php b/wp-includes/version.php index ea2e7dee45..97621554ea 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-35097'; +$wp_version = '4.4-alpha-35098'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.