Check to see if we have an author before displaying it. See #9948.

git-svn-id: http://svn.automattic.com/wordpress/trunk@11471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-05-27 21:51:25 +00:00
parent a3c2702e3a
commit 68a6949d44
1 changed files with 4 additions and 2 deletions

View File

@ -823,9 +823,11 @@ function wp_widget_rss_output( $rss, $args = array() ) {
$author = '';
if ( $show_author ) {
$author = $item->get_author();
if ( is_object($author) ) {
$author = $author->get_name();
$author = ' <cite>' . esc_html( strip_tags( $author ) ) . '</cite>';
}
}
if ( $link == '' ) {
echo "<li>$title{$date}{$summary}{$author}</li>";