Better error checking
git-svn-id: http://svn.automattic.com/wordpress/trunk@2248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
68e2bbefb3
commit
f92b0a038a
|
@ -89,7 +89,7 @@ $rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashi
|
|||
if ( isset($rss->items) && 0 != count($rss->items) ) {
|
||||
?>
|
||||
<div id="incominglinks">
|
||||
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://feeds.technorati.com/cosmos/search.html?url=<?php echo trailingslashit(get_option('home')); ?>&partner=wordpress"><?php _e('More'); ?> »</a></cite></h3>
|
||||
<h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/cosmos/search.html?url=<?php echo trailingslashit(get_option('home')); ?>&partner=wordpress"><?php _e('More'); ?> »</a></cite></h3>
|
||||
<ul>
|
||||
<?php
|
||||
$rss->items = array_slice($rss->items, 0, 10);
|
||||
|
@ -107,7 +107,7 @@ foreach ($rss->items as $item ) {
|
|||
<p><?php _e('Below is the latest news from the official WordPress development blog, click on a title to read the full entry.'); ?></p>
|
||||
<?php
|
||||
$rss = @fetch_rss('http://wordpress.org/development/feed/');
|
||||
if ( $rss ) {
|
||||
if ( isset($rss->items) && 0 != count($rss->items) ) {
|
||||
?>
|
||||
<h3>WordPress Development Blog</h3>
|
||||
<?php
|
||||
|
@ -124,8 +124,7 @@ foreach ($rss->items as $item ) {
|
|||
|
||||
<?php
|
||||
$rss = @fetch_rss('http://planet.wordpress.org/feed/');
|
||||
//var_dump($rss);
|
||||
if ( $rss ) {
|
||||
if ( isset($rss->items) && 0 != count($rss->items) ) {
|
||||
?>
|
||||
<div id="planetnews">
|
||||
<h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> »</a></h3>
|
||||
|
|
Loading…
Reference in New Issue