RSS widget shouldn't link if there isn't a link. Props MtDewVirus. fixes #7614

git-svn-id: https://develop.svn.wordpress.org/trunk@8746 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-27 18:00:51 +00:00
parent 903915c067
commit 2a643a7f56
1 changed files with 6 additions and 2 deletions

View File

@ -1162,8 +1162,12 @@ function wp_widget_rss_output( $rss, $args = array() ) {
$author = ' <cite>' . wp_specialchars( strip_tags( $item['author_name'] ) ) . '</cite>';
}
echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
}
if ( $link == '' ) {
echo "<li>$title{$date}{$summary}{$author}</li>";
} else {
echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
}
}
echo '</ul>';
} else {
echo '<ul><li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li></ul>';