Return error when requesting invalid feed format. Props pishmishy. fixes #5446
git-svn-id: https://develop.svn.wordpress.org/trunk@7038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a8613a3e4d
commit
78f9d0757a
@ -901,7 +901,12 @@ function do_feed() {
|
||||
$feed = get_default_feed();
|
||||
|
||||
$hook = 'do_feed_' . $feed;
|
||||
do_action( $hook, $wp_query->is_comment_feed );
|
||||
if ( !has_action($hook) ) {
|
||||
$message = sprintf( __( 'ERROR: %s is not a valid feed template' ), wp_specialchars($feed));
|
||||
wp_die($message);
|
||||
}
|
||||
|
||||
do_action( $hook, $wp_query->is_comment_feed );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user