Example #1
0
function print_video_thumb($post)
{
    print_video_thumb_backward($post, $thumb_url) || print_video_thumb_custom_field($post, $thumb_url) || print_video_thumb_supported_site($post, $thumb_url) || print_video_thumb_first_post_image($post, $thumb_url) || print_video_thumb_unsupported_site($post, $thumb_url);
    echo get_video_thumb(get_permalink($post->ID), $post->post_title, $thumb_url);
}
     <?php 
 $indicators = '';
 $round_indicators = '';
 $slides = '';
 $captions = '';
 $counter = 0;
 $has_video = 0;
 if ($video_id != '') {
     $has_video = 1;
     $counter = 1;
     $videoitem = 'videoitem';
     if ($slider_size == 'full') {
         $videoitem = 'videoitem_full';
     }
     $indicators .= '<li data-target="#carousel-listing"  data-video_data="' . $video_type . '" data-video_id="' . $video_id . '"  data-slide-to="0" class="active video_thumb_force">
                      <img src= "' . get_video_thumb($post->ID) . '" alt="video_thumb" class="img-responsive"/>
                      <span class="estate_video_control"><i class="fa fa-play"></i> </span>
                      </li>';
     $round_indicators .= ' <li data-target="#carousel-listing" data-slide-to="0" class="active"></li>';
     $slides .= '<div class="item active ' . $videoitem . '">';
     if ($video_type == 'vimeo') {
         $slides .= wpestate_custom_vimdeo_video($video_id);
     } else {
         $slides .= wpestate_custom_youtube_video($video_id);
     }
     $slides .= '</div>';
 }
 if (has_post_thumbnail()) {
     $counter++;
     $active = '';
     if ($counter == 1 && $has_video != 1) {