options = wp_parse_args( $options, SRR_Options::defaults() ); } public function html(){ $urls = trim( $this->options['urls'] ); $tab_titles = $this->options['tab_titles']; $count = intval( $this->options['count'] ); $show_title = intval( $this->options['show_title'] ); $show_date = intval( $this->options['show_date'] ); $show_desc = intval( $this->options['show_desc'] ); $show_author = intval( $this->options['show_author'] ); $show_thumb = intval( $this->options['show_thumb'] ); $open_newtab = intval( $this->options['open_newtab'] ); $add_nofollow = intval( $this->options['add_nofollow'] ); $strip_desc = intval( $this->options['strip_desc'] ); $strip_title = intval( $this->options['strip_title'] ); $offset = intval( $this->options['offset'] ); $date_format = $this->options['date_format']; $date_timezone = $this->options['date_timezone']; $order_by = $this->options['order_by']; $read_more = $this->options['read_more']; $rich_desc = intval( $this->options['rich_desc'] ); $link_desc = intval( $this->options['link_desc'] ); $desc_type = $this->options['desc_type']; $thumbnail_position = $this->options['thumbnail_position']; $thumbnail_crop_position = $this->options['thumbnail_crop_position']; $thumbnail_size = $this->options['thumbnail_size']; $thumbnail_default = $this->options['thumbnail_default']; $thumbnail_type = $this->options['thumbnail_type']; $no_feed_text = $this->options['no_feed_text']; $color_theme = $this->options['color_style']; $display_type = $this->options['display_type']; $visible_items = intval( $this->options['visible_items'] ); $ticker_speed = intval( $this->options['ticker_speed'] ) * 1000; $scroll_height = $this->options['scroll_height']; if( empty( $urls ) ){ return ''; } $count = ( $offset > 0 ) ? $count + $offset : $count; $url_delim = strpos( $urls, ',' ) !== false ? ',' : "\n"; $tab_title_delim = strpos( $tab_titles, ',' ) !== false ? ',' : "\n"; $urls = explode( $url_delim, $urls ); $tab_titles = explode( $tab_title_delim, $tab_titles ); $url_count = count( $urls ); $feeds = array(); $html = ''; $no_feed_html = '
RSS Error: ' . wp_kses_post( $feed->get_error_message() ) . '
' . $desc . '
' ) );
}else{
$desc = str_replace( array( "\n", "\r" ), ' ', strip_tags( @html_entity_decode( $desc_content, ENT_QUOTES, get_option('blog_charset') ) ) );
if( $strip_desc != 0 ){
$desc = wp_trim_words( $desc, $strip_desc );
if ( '[...]' == substr( $desc, -5 ) ){
$desc = substr( $desc, 0, -5 );
}else if ( '…' == substr( $desc, -8 ) ){
$desc = substr( $desc, 0, -8 );
}else if ( '...' == substr( $desc, -3 ) ){
$desc = substr( $desc, 0, -3 );
}elseif ( '[…]' != substr( $desc, -10 ) ){
$desc .= '';
}
}
$desc = trim( esc_html( $desc ) );
if( !empty( $desc ) ){
if( $link_desc ){
$desc = '' . $desc . '';
}
$read_more_link = !empty( $read_more ) ? ' ' . esc_html( $read_more ) . '' : '';
$desc = $desc . $read_more_link;
}
}
}
// Author
$author = '';
if( $show_author ){
$author = $item->get_author();
if ( is_object( $author ) && $author->get_name() ) {
$author = strip_tags( $author->get_name() );
}
}
$t_title = '';
$t_meta = '';
$t_thumb = '';
$t_desc = '';
if( $show_title ){
$t_title .= '';
}
// Metadata
if( $show_date || $show_author ){
$t_meta .= ''; // End meta
}
if ( $show_thumb ){
$t_thumb .= $thumb;
}
if( $show_desc && !empty( $desc ) ){
$t_desc .= '