' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '
';
}
$rss_items = $rss->get_items( 0, $attributes['itemsToShow'] );
$list_items = '';
$open_in_new_tab = ! empty( $attributes['openInNewTab'] );
$rel = ! empty( $attributes['rel'] ) ? trim( $attributes['rel'] ) : '';
$link_attributes = '';
if ( $open_in_new_tab ) {
$link_attributes .= ' target="_blank"';
}
if ( '' !== $rel ) {
$link_attributes .= ' rel="' . esc_attr( $rel ) . '"';
}
foreach ( $rss_items as $item ) {
$title = esc_html( trim( strip_tags( html_entity_decode( $item->get_title() ) ) ) );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
$link = $item->get_link();
$link = esc_url( $link );
if ( $link ) {
$title = "