';
// Check feed items
if ($maxitems == 0){
echo '
No items.
';
}else{
$j=1;
// Loop through each feed item
foreach ($rss_items as $item){
// Get the link
$link = $item->get_link();
while ( stristr($link, 'http') != $link ){ $link = substr($link, 1); }
$link = esc_url(strip_tags($link));
// Get the item title
$title = esc_attr(strip_tags($item->get_title()));
if ( empty($title) )
$title = __('Untitled');
// Get the date
$date = $item->get_date('j F Y');
// Get the description
$desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );
if($strip_desc != 0){
$desc = wp_html_excerpt( $desc, $strip_desc );
if ( '[...]' == substr( $desc, -5 ) )
$desc = substr( $desc, 0, -5 ) . '[…]';
elseif ( '[…]' != substr( $desc, -10 ) )
$desc .= ' […]';
}
$desc = esc_html( $desc );
// Get the author
$author = $item->get_author();
if ( is_object($author) ) {
$author = $author->get_name();
$author = esc_html(strip_tags($author));
}
echo "\n\n\t";
// Display the feed items
echo '
';
echo '
' .$title . '';
if($show_date) echo '
' . $date . '';
if($show_author) echo ' -
' . $author . '';
if($show_desc) echo '
' . $desc . '
';
echo '
';
// End display
$j++;
}
}
// Outer wrap end
echo "\n\n