- if ( !$publisher = wp_specialchars( strip_tags( isset($item['dc']['publisher']) ? $item['dc']['publisher'] : $item['author_name'] ) ) )
- $publisher = __( 'Somebody' );
- if ( $site_link )
- $publisher = "<a href='$site_link'>$publisher</a>";
- else
- $publisher = "<strong>$publisher</strong>";
-
- if ( isset($item['description']) )
- $content = $item['description'];
- elseif ( isset($item['summary']) )
- $content = $item['summary'];
- elseif ( isset($item['atom_content']) )
- $content = $item['atom_content'];
- else
- $content = __( 'something' );
- $content = wp_html_excerpt($content, 50) . ' ...';
- if ( $link )
- $text = _c( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"|feed_display' );
- else
- $text = _c( '%1$s linked here saying, "%3$s"|feed_display' );
-
- if ( $show_date ) {
- if ( $show_author || $show_summary )
- $text .= _c( ' on %4$s|feed_display' );
- $date = wp_specialchars( strip_tags( isset($item['pubdate']) ? $item['pubdate'] : $item['published'] ) );
- $date = strtotime( $date );
- $date = gmdate( get_option( 'date_format' ), $date );
- }
+ if ( !isset($items) )
+ $items = 10;
+
+ foreach ( $rss->get_items(0, $items) as $item ) {
+ $publisher = '';
+ $site_link = '';
+ $link = '';
+ $content = '';
+ $date = '';
+ $link = esc_url( strip_tags( $item->get_link() ) );
+
+ $author = $item->get_author();
+ if ( $author ) {
+ $site_link = esc_url( strip_tags( $author->get_link() ) );