Beispiel #1
0
function parse_tm_related_post_func($atts, $content)
{
    $postformat = isset($atts['postformat']) ? $atts['postformat'] : '';
    $posttypes = isset($atts['posttypes']) ? $atts['posttypes'] : 'post';
    $count = isset($atts['count']) ? $atts['count'] : -1;
    $tags = isset($atts['tag']) ? $atts['tag'] : '';
    $orderby = isset($atts['orderby']) ? $atts['orderby'] : '';
    global $post;
    if (is_single()) {
        if ($tags == '') {
            $tags = '';
            $posttags = get_the_tags();
            if ($posttags) {
                foreach ($posttags as $tag) {
                    $tags .= ',' . $tag->slug;
                }
                $tags = substr($tags, 1);
            }
        }
    }
    $args = array('taxonomy' => 'post_format', 'post_type' => $posttypes, 'posts_per_page' => $count, 'post_status' => 'publish', 'posts_not_in' => array(get_the_ID($post)), 'terms' => array($postformat), 'tag' => $tags);
    $the_query = new WP_Query($args);
    if ($the_query->have_posts()) {
        $html = '<div class="popular_video ">';
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $html .= '
				<div class="row-fluid">
				  <div class="rt-article span12">
					  <div class="popular_video_item">
						  <div class="video_thumb">
							<a href="#">' . get_the_post_thumbnail(get_the_ID(), array(150, 150)) . '
							<span class="link-overlay fa fa-play"></span></a>
							' . tm_post_rating(get_the_ID()) . '
						  </div> 	
						  <div class="pp_info">
							<h4 class="rt-article-title"> <a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h4>
							<div class="pp_video_view"><span><i class="icon-eye-open"></i>  ' . tm_get_post_views() . '' . __('  Views') . '</span></div>
							<div class="pp_video_comment"><span><i class="icon-comment"></i>  ' . get_comments_number() . '' . __(' Comments') . '</span></div>
							<div class="pp_video_like"><span><i class="icon-heart"></i>   ' . tm_get_post_likes(get_the_ID()) . ' ' . __(' Likes') . '</span></div>
						  </div>
						<!-- end post wrap -->
						<div class="clear"><!-- --></div>
					</div>
				  </div>
				  <!-- end span -->                              
				</div>
			';
        }
    }
    $html .= '
		</div>
		<div class="clear"></div>
	';
    wp_reset_query();
    return $html;
}
Beispiel #2
0
        ?>
">
                <?php 
        if ($format == '' || $format == 'standard') {
            ?>
                <div class="link-overlay fa fa-search"></div>
                <?php 
        } else {
            ?>
                <div class="link-overlay fa fa-play"></div>
                <?php 
        }
        ?>
            </a>
            <?php 
        echo tm_post_rating(get_the_ID());
        ?>
        </div>
        <?php 
        if ($quick_if == '1') {
            echo '</div>';
        }
        ?>
        <div class="item-head">
            <h3><a href="<?php 
        the_permalink();
        ?>
" rel="<?php 
        the_ID();
        ?>
" title="<?php 
            }
            ?>
									<img src="<?php 
            echo $thumbnail[0];
            ?>
" alt="<?php 
            the_title_attribute($id_nex_m);
            ?>
" title="<?php 
            the_title_attribute($id_nex_m);
            ?>
">
										<div class="link-overlay fa fa-play"></div>
									</a>
									<?php 
            echo tm_post_rating($id_nex_m);
            ?>
									<div class="item-head">
										<h3><a href="<?php 
            echo get_permalink($id_nex_m);
            ?>
" title="<?php 
            echo get_the_title($id_nex_m);
            ?>
"><?php 
            echo get_the_title($id_nex_m);
            ?>
</a></h3>
									</div>
								</div>
							</div><!--/video-item-->
    function get_item_relate_video($thumb, $show_title, $show_exceprt, $show_rate, $show_dur, $show_view, $show_com, $show_like, $show_aut, $show_date, $themes_pur)
    {
        $format = get_post_format(get_the_ID());
        $html = '';
        $html .= '
		<div class="video-item">
			  <div class="item-thumbnail">
				  <a href="' . get_permalink() . '" title="' . esc_attr(get_the_title()) . '">';
        if (has_post_thumbnail()) {
            $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), $thumb, true);
        } else {
            $thumbnail[0] = function_exists('tm_get_default_image') ? tm_get_default_image() : '';
            $thumbnail[1] = 520;
            $thumbnail[2] = 293;
        }
        $html .= '<img src="' . $thumbnail[0] . '" width="' . $thumbnail[1] . '" height="' . $thumbnail[2] . '" alt="' . get_the_title('echo=0') . '" title="' . the_title_attribute('echo=0') . '">';
        if ($themes_pur != '0') {
            if ($format == '' || $format == 'standard' || $format == 'gallery') {
                $html .= '<div class="link-overlay fa fa-search"></div>';
            } else {
                $html .= '<div class="link-overlay fa fa-play "></div>';
            }
        }
        $html .= '</a>';
        if ($show_rate != '0') {
            $html .= tm_post_rating(get_the_ID());
        }
        if ($show_dur != '0') {
            if (get_post_meta(get_the_id(), 'time_video', true) != '00:00' && get_post_meta(get_the_id(), 'time_video', true) != '00' && get_post_meta(get_the_id(), 'time_video', true) != '') {
                $html .= '
							<span class="rating-bar bgcolor2 time_dur">' . get_post_meta(get_the_id(), 'time_video', true) . '</span>';
            }
        }
        $html .= '
			  </div>
			  <div class="item-head">';
        if ($show_title != '0') {
            $html .= '
				  <h3><a href="' . get_permalink(get_the_ID()) . '">' . strip_tags(get_the_title(get_the_ID())) . '</a></h3>';
        }
        $html .= '
				  <div class="item-info">';
        if ($show_aut != '0') {
            $author = get_author_posts_url(get_the_author_meta('ID'));
            $html .= '<span  class="item-author"><a href="' . $author . '" title="' . get_the_author() . '">' . get_the_author() . '</a></span>';
        }
        if ($show_date != '0') {
            $html .= '<span class="item-date">' . get_the_time(get_option('date_format')) . '</span>';
        }
        $html .= '<div class="item-meta no-bg">';
        if ($show_view != '0') {
            $html .= tm_html_video_meta('view', false, false);
        }
        if ($show_com != '0') {
            $html .= tm_html_video_meta('comment', false, false);
        }
        if ($show_like != '0') {
            $html .= tm_html_video_meta('like', false, false);
        }
        $html .= '</div>
				  </div>';
        $html .= '	  
			  </div>';
        if ($show_exceprt != '0') {
            $html .= '
			  <div class="item-content">' . get_the_excerpt() . '</div>';
        }
        $html .= '
		</div>			
	  ';
        return $html;
    }
Beispiel #5
0
function parse_tm_cat_videos_func($atts, $content)
{
    $condition = isset($atts['condition']) ? $atts['condition'] : '';
    $count = isset($atts['count']) ? $atts['count'] : -1;
    $categories = isset($atts['categories']) ? $atts['categories'] : '';
    if ($condition == 'likes' && class_exists('CT_ContentHelper')) {
        $atts = array();
        global $wpdb;
        $show_count = 1;
        $time_range = 'all';
        //$show_type = $instance['show_type'];
        $order_by = 'ORDER BY like_count DESC, post_title';
        if ($count > 0) {
            $limit = "LIMIT " . $count;
        }
        $show_excluded_posts = get_option('wti_like_post_show_on_widget');
        $excluded_post_ids = explode(',', get_option('wti_like_post_excluded_posts'));
        if (!$show_excluded_posts && count($excluded_post_ids) > 0) {
            $where = "AND post_id NOT IN (" . get_option('wti_like_post_excluded_posts') . ")";
        }
        //getting the most liked posts
        $query = "SELECT post_id, SUM(value) AS like_count, post_title FROM `{$wpdb->prefix}wti_like_post` L, {$wpdb->prefix}posts P ";
        $query .= "WHERE L.post_id = P.ID AND post_status = 'publish' AND value > 0 {$where} GROUP BY post_id {$order_by} {$limit}";
        $posts = $wpdb->get_results($query);
        $item_loop_video = new CT_ContentHtml();
        $widget_data = '
				<div id="top-carousel" class="cat-carousel">
					 <div class="container">
						<div class="is-carousel" id="top1">
							<div class="carousel-content">';
        if (count($posts) > 0) {
            foreach ($posts as $post) {
                $post_title = stripslashes($post->post_title);
                $permalink = get_permalink($post->post_id);
                $like_count = $post->like_count;
                $widget_data .= $item_loop_video->tm_likes_cat_html($post, $like_count);
            }
        }
        $widget_data .= '
						</div><!--/carousel-content-->
						<div class="carousel-button">
							<a href="#" class="prev maincolor1 bordercolor1 bgcolor1hover"><i class="fa fa-chevron-left"></i></a>
							<a href="#" class="next maincolor1 bordercolor1 bgcolor1hover"><i class="fa fa-chevron-right"></i></a>
						</div><!--/carousel-button-->
					</div><!--/is-carousel-->
					</div>
			</div>';
        wp_reset_query();
        return $widget_data;
    } else {
        if (class_exists('CT_ContentHelper')) {
            $item_video1 = new CT_ContentHelper();
            $the_query = $item_video1->tm_get_popular_posts($condition, $tags, $count, $ids, $sort_by, $categories, $args = array());
            $num_item = count($the_query->posts);
            $html = '
			<div id="top-carousel" class="cat-carousel">
				 <div class="container">
					<div class="is-carousel" id="top1">
						<div class="carousel-content">';
            if ($the_query->have_posts()) {
                while ($the_query->have_posts()) {
                    $the_query->the_post();
                    $html .= '   
							<div class="video-item">
								<div class="item-thumbnail">
									<a href="' . get_permalink() . '" title="' . get_the_title() . '">';
                    if (has_post_thumbnail()) {
                        $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumb_196x126', true);
                    } else {
                        $thumbnail[0] = function_exists('tm_get_default_image') ? tm_get_default_image() : '';
                    }
                    $html .= '
									<img src="' . $thumbnail[0] . '" alt="' . the_title_attribute('echo=0') . '" title="' . the_title_attribute('echo=0') . '">
										<div class="link-overlay fa fa-play"></div>
									</a>
									' . tm_post_rating(get_the_ID()) . '
									<div class="item-head">
										<h3><a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h3>
									</div>
								</div>
							</div>';
                }
            }
            $html .= '
						</div><!--/carousel-content-->
						<div class="carousel-button">
							<a href="#" class="prev maincolor1 bordercolor1 bgcolor1hover"><i class="fa fa-chevron-left"></i></a>
							<a href="#" class="next maincolor1 bordercolor1 bgcolor1hover"><i class="fa fa-chevron-right"></i></a>
						</div><!--/carousel-button-->
					</div><!--/is-carousel-->
					</div>
			</div>';
            wp_reset_query();
            return $html;
        }
    }
}
Beispiel #6
0
function parse_tm_amazing_func($atts, $content)
{
    $condition = ot_get_option('header_home_condition', 'lastest');
    $ids = ot_get_option('header_home_postids', '');
    $categories = ot_get_option('header_home_cat', '');
    $tags = ot_get_option('header_home_tag', '');
    $sort_by = ot_get_option('header_home_order', 'DESC');
    $count = ot_get_option('header_home_number', 12);
    $themes_pur = '';
    if (function_exists('ot_get_option')) {
        $themes_pur = ot_get_option('theme_purpose');
    }
    if (class_exists('CT_ContentHelper')) {
        $conditions = 'latest';
        $ids = '';
        $item_loop_video = new CT_ContentHelper();
        $the_query = $item_loop_video->tm_get_popular_posts($condition, $tags, $count, $ids, $sort_by, $categories, $args = array(), $themes_pur);
        $num_item = count($the_query->posts);
        $show_title = 1;
        $show_meta = $show_exceprt = 0;
        $item_video = new CT_ContentHtml();
        if ($the_query->have_posts()) {
            $html = '
			<div id="slider" class="amazing" ' . (!ot_get_option('header_home_auto') ? 'data-notauto=1' : '') . (ot_get_option('header_home_auto_timeout') ? ' data-auto_timeout=' . ot_get_option('header_home_auto_timeout') : '') . (ot_get_option('header_home_auto_duration') ? ' data-auto_duration=' . ot_get_option('header_home_auto_duration') : '') . '>
			<div class="overlay">
				<div class="container">
					<div class="inner-slides"> ';
            $arr_thumb = array();
            $arr_id = array();
            while ($the_query->have_posts()) {
                $the_query->the_post();
                $thumb = get_post_meta(get_the_ID(), 'ct_bg_image', true);
                if ($thumb == '') {
                    $thumb = get_post_thumbnail_id(get_the_ID());
                    $arr_thumb[] = $thumb;
                } else {
                    $arr_thumb[] = $thumb;
                }
                $html .= '
							<div class="slide">	
								<div class="container ">
								<div class="row video-item">
									<div class="col-md-6">
										<div class="item-thumbnail element ">
											<a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_post_thumbnail(get_the_ID(), 'thumb_100x100', array('alt' => get_the_title())) . '
											<div class="link-overlay fa fa-play "></div>
											</a>
										</div>
									</div>
									<div class="col-md-6">
										<div class="item-head element">
											<h3 class="item-heading"><a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '';
                if (tm_post_rating(get_the_ID())) {
                    $html .= tm_post_rating(get_the_ID()) . '<span class="rating-bar rate-ama bgcolor2">/10</span></a></h3>';
                } else {
                    $html .= '</a></h3>';
                }
                $html .= '<div class="item-info">
												<span class="item-date">' . get_the_time(get_option('date_format'), get_the_ID()) . '</span>
												<span class="item-author">by <a href="' . get_author_posts_url(get_the_author_meta('ID')) . '" title="' . get_the_author() . '" rel="author">' . get_the_author() . '</a></span>
											</div>
											<div class="item-content"><p>' . wp_trim_words(get_the_excerpt(), 15, $more = '') . '</p>
		</div>
																				<a class="ct-btn small " href="' . get_permalink() . '">' . __('View Details', 'cactusthemes') . '</a>
											<div class="clearfix"></div>
										</div>
									</div>
								</div>
								</div>
							</div>							
						';
            }
            $html .= '</div>
				</div>
			</div>
			<div class="bg-slides">';
            for ($i = 0; $i < $num_item; $i++) {
                $background_image_post = wp_get_attachment_image_src($arr_thumb[$i], 'full');
                $html .= '<div class="bg_slider" ><img src="' . $background_image_post[0] . '" /></div>';
            }
            //while($the_query->have_posts()){ $the_query->the_post();
            //$html .= get_the_post_thumbnail(get_the_ID(), 'thumb_100x100', array('alt' => get_the_title()));
            //}
            $html .= '	
			</div>
			<div class="carousel-button">
				<a href="#" class="prev maincolor1 bordercolor1 bgcolor1hover" style="display: block;"><i class="fa fa-chevron-left"></i></a>
				<a href="#" class="next maincolor1 bordercolor1 bgcolor1hover" style="display: block;"><i class="fa fa-chevron-right"></i></a>
			</div>
			<div class="carousel-pagination">
				<a href="#">1</a><a href="#">2</a><a href="#">3</a>
			</div>
        </div><!--/slider-->

		<div class="clear"></div>
		';
        }
        wp_reset_query();
        return $html;
    }
}
    function widget($args, $instance)
    {
        wp_enqueue_script('jquery-isotope');
        $cache = wp_cache_get('widget_trending_videos', 'widget');
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!isset($argsxx['widget_id'])) {
            $argsxx['widget_id'] = $this->id;
        }
        if (isset($cache[$argsxx['widget_id']])) {
            echo $cache[$argsxx['widget_id']];
            return;
        }
        ob_start();
        extract($args);
        $conditions = empty($instance['conditions']) ? '' : $instance['conditions'];
        $title = empty($instance['title']) ? '' : $instance['title'];
        $title = apply_filters('widget_title', $title);
        $number = empty($instance['number']) ? '' : $instance['number'];
        $timerange = empty($instance['timerange']) ? '' : $instance['timerange'];
        $show_likes = empty($instance['show_likes']) ? '' : $instance['show_likes'];
        $show_com = empty($instance['show_com']) ? '' : $instance['show_com'];
        $link = empty($instance['link']) ? '' : $instance['link'];
        $show_view = empty($instance['show_view']) ? '' : $instance['show_view'];
        $show_rate = empty($instance['show_rate']) ? '' : $instance['show_rate'];
        $show_excerpt = empty($instance['show_excerpt']) ? '' : $instance['show_excerpt'];
        $num_ex = empty($instance['num_ex']) ? '' : $instance['num_ex'];
        if (function_exists('ot_get_option')) {
            $themes_pur = ot_get_option('theme_purpose');
        }
        if ($conditions == 'most_liked' && class_exists('CT_ContentHelper')) {
            global $wpdb;
            $show_count = 1;
            if ($timerange == 'day') {
                $time_range = '1';
            } else {
                if ($timerange == 'week') {
                    $time_range = '7';
                } else {
                    if ($timerange == 'month') {
                        $time_range = '1m';
                    } else {
                        if ($timerange == 'year') {
                            $time_range = '1y';
                        }
                    }
                }
            }
            //$time_range = $instance['time_range'];
            //$show_type = $instance['show_type'];
            $order_by = 'ORDER BY like_count DESC, post_title';
            if ($number > 0) {
                $limit = "LIMIT " . $number;
            }
            $widget_data = $before_widget;
            $widget_data .= $before_title . $title . $after_title;
            $show_excluded_posts = get_option('wti_like_post_show_on_widget');
            $excluded_post_ids = explode(',', get_option('wti_like_post_excluded_posts'));
            if (!$show_excluded_posts && count($excluded_post_ids) > 0) {
                $where = "AND post_id NOT IN (" . get_option('wti_like_post_excluded_posts') . ")";
            }
            if ($time_range != 'all') {
                $last_date = GetWtiLastDate($time_range);
                $where .= " AND date_time >= '{$last_date}'";
            }
            //getting the most liked posts
            $query = "SELECT post_id, SUM(value) AS like_count, post_title FROM `{$wpdb->prefix}wti_like_post` L, {$wpdb->prefix}posts P ";
            $query .= "WHERE L.post_id = P.ID AND post_status = 'publish' AND value > 0 {$where} GROUP BY post_id {$order_by} {$limit}";
            $posts = $wpdb->get_results($query);
            if (count($posts) > 0) {
                $item_loop_video = new CT_ContentHtml();
                $widget_data .= '
			<div class="widget-content">
					<div class="list-rating-item row">';
                foreach ($posts as $post) {
                    $p_data = $excerpt = '';
                    $post_title = stripslashes($post->post_title);
                    $permalink = get_permalink($post->post_id);
                    $like_count = $post->like_count;
                    $p_data = get_post($post->post_id);
                    $excerpt = strip_tags($p_data->post_content);
                    $excerpt = wp_trim_words($excerpt, $num_ex, $more = '');
                    $widget_data .= $item_loop_video->tm_likes_html($post, $like_count, $themes_pur, $show_likes, $show_com, $show_rate, $show_view, $show_excerpt, $excerpt);
                }
                $widget_data .= '</div>
			</div>';
            }
            $widget_data .= $after_widget;
            echo $widget_data;
        } else {
            if (class_exists('CT_ContentHelper')) {
                if ($conditions == 'most_viewed' || $conditions == '') {
                    if ($timerange == 'day') {
                        $args = array('post_type' => 'post', 'posts_per_page' => $number, 'meta_key' => '_count-views_day-' . date("Ymd"), 'orderby' => 'meta_value_num', 'order' => 'DESC', 'post_status' => 'publish');
                    } else {
                        if ($timerange == 'week') {
                            $args = array('post_type' => 'post', 'posts_per_page' => $number, 'meta_key' => '_count-views_week-' . date("YW"), 'orderby' => 'meta_value_num', 'order' => '', 'post_status' => 'publish');
                        } else {
                            if ($timerange == 'month') {
                                $args = array('post_type' => 'post', 'posts_per_page' => $number, 'meta_key' => '_count-views_month-' . date("Ym"), 'orderby' => 'meta_value_num', 'order' => '', 'post_status' => 'publish');
                            } else {
                                if ($timerange == 'year') {
                                    $args = array('post_type' => 'post', 'posts_per_page' => $number, 'meta_key' => '_count-views_year-' . date("Y"), 'orderby' => 'meta_value_num', 'order' => '', 'post_status' => 'publish');
                                }
                            }
                        }
                    }
                    if ($themes_pur != '0') {
                        $args['tax_query'] = array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video'));
                    }
                    $the_query = new WP_Query($args);
                    $html = $before_widget;
                    if ($title) {
                        $html .= $before_title . $title . $after_title;
                    }
                    if ($the_query->have_posts()) {
                        $html .= '
						<div class="widget-content">
						<div class="list-rating-item row">
					';
                        $item_video = new CT_ContentHtml();
                        $i = 0;
                        while ($the_query->have_posts()) {
                            $the_query->the_post();
                            $i++;
                            $excerpt = get_the_excerpt();
                            $excerpt = wp_trim_words($excerpt, $num_ex, $more = '');
                            $html .= $item_video->get_item_video_trending($conditions, $themes_pur, $show_likes, $show_com, $show_rate, $show_view, $show_excerpt, $excerpt);
                        }
                        $html .= '</div>
					</div>';
                    }
                    $html .= $after_widget;
                    echo $html;
                } else {
                    if ($conditions == 'most_comments') {
                        wp_reset_postdata();
                        if ($timerange == 'day') {
                            $some_comments = get_comments(array('date_query' => array(array('after' => '1 day ago'))));
                        } else {
                            if ($timerange == 'week') {
                                $some_comments = get_comments(array('date_query' => array(array('after' => '1 week ago'))));
                            } else {
                                if ($timerange == 'month') {
                                    $some_comments = get_comments(array('date_query' => array(array('after' => '1 month ago'))));
                                } else {
                                    if ($timerange == 'year') {
                                        $some_comments = get_comments(array('date_query' => array(array('after' => '1 year ago'))));
                                    }
                                }
                            }
                        }
                        $html = $before_widget;
                        if ($title) {
                            $html .= $before_title . $title . $after_title;
                        }
                        $arr_id = array();
                        foreach ($some_comments as $comment) {
                            $arr_id[] = $comment->comment_post_ID;
                        }
                        $arr_id = array_unique($arr_id, SORT_REGULAR);
                        //$arr_id = implode(",", $arr_id);
                        $args = array('post_type' => 'post', 'posts_per_page' => $number, 'order' => $sort_by, 'post_status' => 'publish', 'post__in' => $arr_id, 'ignore_sticky_posts' => 1);
                        $query = new WP_Query($args);
                        if ($query->have_posts()) {
                            $html .= '
				<div class="widget-content">
					<div class="list-rating-item row">';
                            while ($query->have_posts()) {
                                $query->the_post();
                                $excerpt = get_the_excerpt();
                                $html .= '
						<div class="col-md-12 col-sm-4">
						  <div class="video-item">
							  <div class="videos-row">
									<div class="item-thumbnail">
										<a href="' . get_permalink(get_the_ID()) . '" title="' . get_the_title(get_the_ID()) . '">';
                                if (has_post_thumbnail(get_the_ID())) {
                                    $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'thumb_139x89', true);
                                } else {
                                    $thumbnail[0] = function_exists('tm_get_default_image') ? tm_get_default_image() : '';
                                }
                                $html .= '<img src="' . $thumbnail[0] . '" alt="' . the_title_attribute('echo=0') . '" title="' . the_title_attribute('echo=0') . '">';
                                //'.get_the_post_thumbnail(get_the_ID(), array(139,89) ).'
                                if ($themes_pur != '0') {
                                    $html .= '<div class="link-overlay fa fa-play "></div>';
                                }
                                $html .= '</a>';
                                if ($show_rate != 'hide_r') {
                                    $html .= tm_post_rating(get_the_ID());
                                }
                                $html .= '</div>
								  <div class="item-info">
									<div class="all-info">
									<h2 class="rt-article-title"> <a href="' . get_permalink(get_the_ID()) . '" title="' . get_the_title(get_the_ID()) . '">' . get_the_title(get_the_ID()) . '</a></h2>
									<div class="item-meta">';
                                if ($show_view != 'hide_v') {
                                    $html .= '<span class="pp-icon"><i class="fa fa-eye"></i> ' . get_post_meta(get_the_ID(), '_count-views_all', true) . '</span><br>';
                                }
                                if ($show_likes != 'hide_l' && function_exists('GetWtiLikeCount')) {
                                    $html .= '<span class="pp-icon iclike"><i class="fa fa-thumbs-up"></i> ' . str_replace('+', '', GetWtiLikeCount(get_the_ID())) . '</span><br>';
                                }
                                if ($show_com != 'hide_c') {
                                    $html .= '<span class="pp-icon"><i class="fa fa-comment"></i> ' . get_comments_number(get_the_ID()) . '</span><br>';
                                }
                                $html .= '
										</div>
										</div>
										</div>';
                                if ($show_excerpt != 'hide_ex') {
                                    $html .= '<div class="pp-exceprt">' . $excerpt . '</div>';
                                }
                                $html .= '
							   </div>
						  </div>
						</div>
						';
                            }
                            $html .= '</div>
				</div>';
                        }
                        $html .= $after_widget;
                        echo $html;
                    }
                }
                wp_reset_postdata();
                $cache[$argsxx['widget_id']] = ob_get_flush();
                wp_cache_set('widget_trending_videos', $cache, 'widget');
            }
        }
    }