From 60794fc8e226a8f2804d17790247788c780bf35c 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: https://develop.svn.wordpress.org/trunk@5698 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 d4732b7e29..ab3e9e9ec8 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.' ); } }