Return error when requesting invalid feed format. Props pishmishy. fixes #5446

git-svn-id: http://svn.automattic.com/wordpress/trunk@7038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-26 10:05:05 +00:00
parent 5f5694ee64
commit 4446c81177

View File

@ -901,6 +901,11 @@ function do_feed() {
$feed = get_default_feed();
$hook = 'do_feed_' . $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 );
}