Exemple #1
0
>
        <?php 
        $quick_if = ot_get_option('quick_view_info');
        if ($quick_if == '1') {
            echo '
						<div class="qv_tooltip"  title="
							<h4 class=\'gv-title\'>' . esc_attr(get_the_title()) . '</h4>
							<div class=\'gv-ex\' >' . esc_attr(get_the_excerpt()) . '</div>
							<div class= \'gv-button\'>';
            if ($format == 'video') {
                echo '<div class=\'quick-view\'><a href=' . get_permalink() . ' title=\'' . esc_attr(get_the_title()) . '\'>' . __('Watch Now', 'cactusthemes') . '</a></div>';
            } else {
                echo '<div class=\'quick-view\'><a href=' . get_permalink() . ' title=\'' . esc_attr(get_the_title()) . '\'>' . __('Read more', 'cactusthemes') . '</a></div>';
            }
            echo '
								<div class= \'gv-link\'>' . quick_view_tm() . '</div>
							</div>
							</div>
						">';
        }
        ?>
        <div class="item-thumbnail">
            <a href="<?php 
        the_permalink();
        ?>
">
                <?php 
        if (has_post_thumbnail()) {
            $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumb_520x293', true);
        } else {
            $thumbnail[0] = function_exists('tm_get_default_image') ? tm_get_default_image() : '';
    function get_item_single_video($thumb, $show_title, $show_exceprt, $show_rate, $show_dur, $show_view, $show_com, $show_like, $show_aut, $show_date, $themes_pur, $number_excerpt, $quick_view = 'def')
    {
        global $_device_;
        global $_is_retina_;
        if ($_device_ == 'mobile' && !$_is_retina_) {
            $thumb = $thumb == 'thumb_520x293' ? 'thumb_260x146' : ($thumb == 'thumb_260x146' ? 'thumb_130x73' : $thumb);
        }
        $html = '';
        $quick_if = $quick_view == 'def' ? ot_get_option('quick_view_info') : $quick_view;
        $html .= '	
		<div class="video-item">
		   <div class="col-md-6 col-sm-6">';
        if ($quick_if == '1') {
            $format = get_post_format(get_the_ID());
            $html .= '
				<div class="qv_tooltip"  title="
					<h4 class=\'gv-title\'>' . esc_attr(get_the_title()) . '</h4>
					<div class=\'gv-ex\' >' . esc_attr(get_the_excerpt()) . '</div>
					<div class= \'gv-button\'>';
            if ($format == 'video') {
                $html .= '<div class=\'quick-view\'><a href=' . get_permalink() . ' title=\'' . esc_attr(get_the_title()) . '\'>' . __('Watch Now', 'cactusthemes') . '</a></div>';
            } else {
                $html .= '<div class=\'quick-view\'><a href=' . get_permalink() . ' title=\'' . esc_attr(get_the_title()) . '\'>' . __('Read more', 'cactusthemes') . '</a></div>';
            }
            $html .= '
						<div class= \'gv-link\'>' . quick_view_tm() . '</div>
					</div>
					</div>
				">';
        }
        $html .= '	
				<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') {
            $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>';
        if ($quick_if == '1') {
            $html .= '</div>';
        }
        $html .= '	
			</div>
			<div class="col-md-6 col-sm-6">
				<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">' . wp_trim_words(get_the_excerpt(), $number_excerpt, $more = '') . '</div>';
        }
        $html .= '
		   </div>
		   </div>';
        return $html;
    }