/** * replace thumbnail by featured video if exists and if has auto-insert configuration * @param unknown $html * @param unknown $post_id * @param unknown $post_thumbnail_id * @param unknown $size * @param unknown $attr */ function tool_video_post_thumbnail_filter($html, $post_id, $post_thumbnail_id, $size, $attr) { $auto_insert = custom_get_option("tool-video-auto-insert"); if (!empty($auto_insert) && $auto_insert == 'on') { $default_width = custom_get_option("tool-video-default-width"); $default_height = custom_get_option("tool-video-default-height"); $video_embed = video_get_featured_video($post_id, $default_width, $default_height); if (!empty($video_embed)) { $html = '<div class="featured-video">' . $video_embed . '</div>'; } } $html = apply_filters("post_featured_video_html", $html, $post_id, $post_thumbnail_id, $size, $attr); return $html; }
?> px; width: <?php echo $width; ?> %;"> <div class="inner-item video" style="width: 100%; height: 100%;"> <?php if (function_exists("custom_display_badge")) { custom_display_badge(); } ?> <?php if (video_has_featured_video(get_the_ID())) { echo video_get_featured_video(get_the_ID(), "100%", "100%"); } else { if (is_admin()) { ?> <div class="no-content" style="min-height: 150px;"><i class="fa fa-ban"></i></div> <?php } } ?> <?php if (!is_admin()) { ?> <div class="has-more"><a class="post-link" href="<?php the_permalink(); ?> " title="<?php