From cbdc90759c7d82b9fd9ec0ffec2d9c2d37e419e7 Mon Sep 17 00:00:00 2001 From: rob1n Date: Wed, 13 Jun 2007 17:23:38 +0000 Subject: [PATCH] wp_rss() updates. fixes #3834 git-svn-id: http://svn.automattic.com/wordpress/trunk@5698 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rss.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/wp-includes/rss.php b/wp-includes/rss.php index d4732b7e2..ab3e9e9ec 100644 --- a/wp-includes/rss.php +++ b/wp-includes/rss.php @@ -817,23 +817,26 @@ function parse_w3cdtf ( $date_str ) { } } -function wp_rss ($url, $num_items) { - //ini_set("display_errors", false); uncomment to suppress php errors thrown if the feed is not returned. - $rss = fetch_rss($url); - if ( $rss ) { - echo ""; - } - else { - echo 'An error has occurred the feed is probably down, try again later.'; +function wp_rss( $url, $num_items = -1 ) { + if ( $rss = fetch_rss( $url ) ) { + echo ''; + } else { + _e( 'An error has occurred, which probably means the feed is down. Try again later.' ); } }