Fix typos in get_rss(). Props zuzara. fixes #3527

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-01-30 18:11:04 +00:00
parent 81bf2a7ad7
commit a30e02110f

View File

@ -816,9 +816,8 @@ function parse_w3cdtf ( $date_str ) {
return -1; return -1;
} }
} }
function wp_rss ($url, $num) { function wp_rss ($url, $num_items) {
//ini_set("display_errors", false); uncomment to suppress php errors thrown if the feed is not returned. //ini_set("display_errors", false); uncomment to suppress php errors thrown if the feed is not returned.
$num_items = $num;
$rss = fetch_rss($url); $rss = fetch_rss($url);
if ( $rss ) { if ( $rss ) {
echo "<ul>"; echo "<ul>";
@ -837,7 +836,7 @@ function wp_rss ($url, $num) {
} }
} }
function get_rss ($uri, $num = 5) { // Like get posts, but for RSS function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS
$rss = fetch_rss($url); $rss = fetch_rss($url);
if ( $rss ) { if ( $rss ) {
$rss->items = array_slice($rss->items, 0, $num_items); $rss->items = array_slice($rss->items, 0, $num_items);
@ -848,7 +847,6 @@ function get_rss ($uri, $num = 5) { // Like get posts, but for RSS
echo "</a><br />\n"; echo "</a><br />\n";
echo "</li>\n"; echo "</li>\n";
} }
return $posts;
} else { } else {
return false; return false;
} }