'', 'urls' => '', 'tab_titles' => '', 'count' => 5, 'show_date' => 0, 'show_desc' => 1, 'show_author' => 0, 'show_thumb' => 1, 'open_newtab' => 1, 'strip_desc' => 100, 'add_nofollow' => 1, 'read_more' => '[...]', 'rich_desc' => 0 , 'color_style' => 'none', 'enable_ticker' => 1, 'visible_items' => 5, 'strip_title' => 0, 'ticker_speed' => 4, ); } public static function color_themes(){ return array( 'No style' => 'none', 'Grey' => 'grey', 'Dark' => 'dark', 'Orange' => 'orange', 'Simple modern' => 'smodern' ); } public static function render_feed( $settings ){ $settings = wp_parse_args( $settings, self::default_settings() ); $urls = stripslashes( $settings['urls'] ); $tab_titles = stripslashes( $settings['tab_titles'] ); $count = intval( $settings['count'] ); $show_date = intval( $settings['show_date'] ); $show_desc = intval( $settings['show_desc'] ); $show_author = intval( $settings['show_author'] ); $show_thumb = stripslashes( $settings['show_thumb'] ); $open_newtab = intval( $settings['open_newtab'] ); $add_nofollow = intval( $settings['add_nofollow'] ); $strip_desc = intval( $settings['strip_desc'] ); $strip_title = intval( $settings['strip_title'] ); $read_more = htmlspecialchars( $settings['read_more'] ); $rich_desc = intval( $settings['rich_desc'] ); $color_theme = stripslashes( $settings['color_style'] ); $enable_ticker = intval( $settings['enable_ticker'] ); $visible_items = intval( $settings['visible_items'] ); $ticker_speed = intval( $settings['ticker_speed'] ) * 1000; if( empty( $urls ) ){ return ''; } $url_delim = strpos( $urls, ',' ) !== false ? ',' : "\n"; $tab_title_delim = strpos( $tab_titles, ',' ) !== false ? ',' : "\n"; $rand = array(); $url = explode( $url_delim, $urls ); $tab_title = explode( $tab_title_delim, $tab_titles ); $url_count = count( $url ); // Generating the tabs if( $url_count > 1 ){ echo '
RSS Error: ' . $rss->get_error_message() . '
' . $desc . '');
}else{
$read_more = '';
$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 );
$read_more = ( !empty( $read_more ) ) ? '' . $read_more . '' : '';
if ( '[...]' == substr( $desc, -5 ) )
$desc = substr( $desc, 0, -5 );
elseif ( '[…]' != substr( $desc, -10 ) )
$desc .= '';
$desc = esc_html( $desc );
}
$desc = $thumb . $desc . ' ' . $read_more;
}
// Getting the author
$author = $item->get_author();
if ( is_object($author) ) {
$author = $author->get_name();
$author = esc_html(strip_tags($author));
}
echo "\n\t";
// Display the feed items
echo '