Permalink
Browse files

RSS widget shouldn't link if there isn't a link. Props MtDewVirus. fi…

…xes #7614 for 2.6

git-svn-id: http://svn.automattic.com/wordpress/branches/2.6@8747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 641e1e9 commit 073cfc341caf05fdaebbccbb9b26821baf78fdef ryan committed Aug 27, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 wp-includes/widgets.php
View
@@ -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>';

0 comments on commit 073cfc3

Please sign in to comment.