Greetings to all! The site on wordpress, noticed this feature: if you add one entry from the video (on vimeo for example) and specify the video format, and the second is already with the standard format, but without specifying a thumbnail, the video is duplicated in the place of the second entry miniature. I do not know, maybe this is the bug of the theme itself .. Here is the code, somewhere here is a cant:
// Video Post Filter // // ==================================================== // if (!function_exists('mad_video_post_filter')) { function mad_video_post_filter($this_post) { $this_post['content'] = preg_replace( '|^\s*(https?://[^\s"]+)\s*$|im', "[embed]$1[/embed]", strip_tags($this_post['content'])); preg_match("!\[embed.+?\]|\[video.+?\]!", $this_post['content'], $match_video); if (!empty($match_video)) { global $wp_embed; $alias = $this_post['image_size']; $video = $match_video[0]; $video = str_replace('[embed]', '[embed width="'. $alias[0] .'" height="'. $alias[1] .'"]', $video); $this_post['before_content'] = "<div class='entry-media image-overlay'>"; $this_post['before_content'] .= do_shortcode($wp_embed->run_shortcode($video)); $this_post['before_content'] .= "</div>"; $this_post['content'] = str_replace($match_video[0], "", $this_post['content']); $this_post['content'] = apply_filters('the_content', $this_post['content']); } return $this_post; } }