Version Description
- Added compatibility with YouTube's new iframe embedding
- Now supports most embedding plugins
Download this release
Release Info
Developer | sutherlandboswell |
Plugin | Video Thumbnails |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- readme.txt +5 -1
- video-thumbnails.php +7 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://amzn.com/w/1L25YG6FO8AZ1
|
|
4 |
Tags: Video, YouTube, Vimeo, Blip.tv, Justin.tv, Thumbnails
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.0.4
|
7 |
-
Stable tag: 1.0.
|
8 |
|
9 |
Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template.
|
10 |
|
@@ -77,6 +77,10 @@ The Vimeo API has a rate limit, so in rare cases you may exceed this limit. Try
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
80 |
= 1.0.3 =
|
81 |
* Fixed an issue where existing thumbnails (such as ones manually set by the user) would be replaced by Video Thumbnails
|
82 |
* Added a checks to see if cURL is running
|
4 |
Tags: Video, YouTube, Vimeo, Blip.tv, Justin.tv, Thumbnails
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.0.4
|
7 |
+
Stable tag: 1.0.4
|
8 |
|
9 |
Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template.
|
10 |
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.0.4 =
|
81 |
+
* Added compatibility with YouTube's new iframe embedding
|
82 |
+
* Now supports most embedding plugins
|
83 |
+
|
84 |
= 1.0.3 =
|
85 |
* Fixed an issue where existing thumbnails (such as ones manually set by the user) would be replaced by Video Thumbnails
|
86 |
* Added a checks to see if cURL is running
|
video-thumbnails.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://sutherlandboswell.com/2010/11/wordpress-video-thumbnails/
|
|
5 |
Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Currently supports YouTube, Vimeo, Blip.tv, and Justin.tv.
|
6 |
Author: Sutherland Boswell
|
7 |
Author URI: http://sutherlandboswell.com
|
8 |
-
Version: 1.0.
|
9 |
License: GPL2
|
10 |
*/
|
11 |
/* Copyright 2010 Sutherland Boswell (email : sutherland.boswell@gmail.com)
|
@@ -71,6 +71,7 @@ function get_video_thumbnail($post_id=null) {
|
|
71 |
// Gets the post's content
|
72 |
$post_array = get_post($post_id);
|
73 |
$markup = $post_array->post_content;
|
|
|
74 |
$new_thumbnail = null;
|
75 |
|
76 |
// Simple Video Embedder Compatibility
|
@@ -83,6 +84,11 @@ function get_video_thumbnail($post_id=null) {
|
|
83 |
// Checks for a standard YouTube embed
|
84 |
preg_match('#<object[^>]+>.+?http://www.youtube.com/v/([A-Za-z0-9\-_]+).+?</object>#s', $markup, $matches);
|
85 |
|
|
|
|
|
|
|
|
|
|
|
86 |
// Checks for any YouTube URL
|
87 |
if(!isset($matches[1])) {
|
88 |
preg_match('#http://w?w?w?.?youtube.com/watch\?v=([A-Za-z0-9\-_]+)#s', $markup, $matches);
|
5 |
Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Currently supports YouTube, Vimeo, Blip.tv, and Justin.tv.
|
6 |
Author: Sutherland Boswell
|
7 |
Author URI: http://sutherlandboswell.com
|
8 |
+
Version: 1.0.4
|
9 |
License: GPL2
|
10 |
*/
|
11 |
/* Copyright 2010 Sutherland Boswell (email : sutherland.boswell@gmail.com)
|
71 |
// Gets the post's content
|
72 |
$post_array = get_post($post_id);
|
73 |
$markup = $post_array->post_content;
|
74 |
+
$markup = apply_filters('the_content',$markup);
|
75 |
$new_thumbnail = null;
|
76 |
|
77 |
// Simple Video Embedder Compatibility
|
84 |
// Checks for a standard YouTube embed
|
85 |
preg_match('#<object[^>]+>.+?http://www.youtube.com/v/([A-Za-z0-9\-_]+).+?</object>#s', $markup, $matches);
|
86 |
|
87 |
+
// Checks for YouTube iframe
|
88 |
+
if(!isset($matches[1])) {
|
89 |
+
preg_match('#http://www.youtube.com/embed/([A-Za-z0-9\-_]+)#s', $markup, $matches);
|
90 |
+
}
|
91 |
+
|
92 |
// Checks for any YouTube URL
|
93 |
if(!isset($matches[1])) {
|
94 |
preg_match('#http://w?w?w?.?youtube.com/watch\?v=([A-Za-z0-9\-_]+)#s', $markup, $matches);
|