Video Thumbnails - Version 2.0.1

Version Description

  • Added support for Facebook's iFrame player
Download this release

Release Info

Developer sutherlandboswell
Plugin Icon 128x128 Video Thumbnails
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

php/class-video-thumbnails-settings.php CHANGED
@@ -110,6 +110,11 @@ class Video_Thumbnails_Settings {
110
 
111
  }
112
 
 
 
 
 
 
113
  // Save options to database if they've been updated
114
  if ( $options_need_updating ) {
115
  update_option( 'video_thumbnails', $options );
110
 
111
  }
112
 
113
+ if ( version_compare( $options['version'], VIDEO_THUMBNAILS_VERSION, '<' ) ) {
114
+ $options['version'] = VIDEO_THUMBNAILS_VERSION;
115
+ $options_need_updating = true;
116
+ }
117
+
118
  // Save options to database if they've been updated
119
  if ( $options_need_updating ) {
120
  update_option( 'video_thumbnails', $options );
php/providers/class-facebook-thumbnails.php CHANGED
@@ -35,7 +35,8 @@ class Facebook_Thumbnails extends Video_Thumbnails_Providers {
35
 
36
  // Regex strings
37
  public $regexes = array(
38
- '#"http://www.facebook.com/v/([0-9]+)"#' // Facebook Embed
 
39
  );
40
 
41
  // Thumbnail URL
@@ -48,7 +49,12 @@ class Facebook_Thumbnails extends Video_Thumbnails_Providers {
48
  array(
49
  'markup' => '<object width=420 height=180><param name=allowfullscreen value=true></param><param name=allowscriptaccess value=always></param><param name=movie value="http://www.facebook.com/v/2560032632599"></param><embed src="http://www.facebook.com/v/2560032632599" type="application/x-shockwave-flash" allowscriptaccess=always allowfullscreen=true width=420 height=180></embed></object>',
50
  'expected' => 'https://graph.facebook.com/2560032632599/picture',
51
- 'name' => 'Embed'
 
 
 
 
 
52
  ),
53
  );
54
 
35
 
36
  // Regex strings
37
  public $regexes = array(
38
+ '#"http://www\.facebook\.com/v/([0-9]+)"#', // Flash Embed
39
+ '#"https?://www\.facebook\.com/video/embed\?video_id=([0-9]+)"#' // iFrame Embed
40
  );
41
 
42
  // Thumbnail URL
49
  array(
50
  'markup' => '<object width=420 height=180><param name=allowfullscreen value=true></param><param name=allowscriptaccess value=always></param><param name=movie value="http://www.facebook.com/v/2560032632599"></param><embed src="http://www.facebook.com/v/2560032632599" type="application/x-shockwave-flash" allowscriptaccess=always allowfullscreen=true width=420 height=180></embed></object>',
51
  'expected' => 'https://graph.facebook.com/2560032632599/picture',
52
+ 'name' => 'Flash Embed'
53
+ ),
54
+ array(
55
+ 'markup' => '<iframe src="https://www.facebook.com/video/embed?video_id=2560032632599" width="960" height="720" frameborder="0"></iframe>',
56
+ 'expected' => 'https://graph.facebook.com/2560032632599/picture',
57
+ 'name' => 'iFrame Embed'
58
  ),
59
  );
60
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wie.ly/u/donate
4
  Tags: Video, Thumbnails, YouTube, Vimeo, Blip, Justin.tv, Dailymotion, Metacafe, Image, Featured Image, Post Thumbnail
5
  Requires at least: 3.1
6
  Tested up to: 3.5.1
7
- Stable tag: 2.0
8
 
9
  Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
10
 
@@ -96,6 +96,9 @@ The Vimeo API has a rate limit, so in rare cases you may exceed this limit. Try
96
 
97
  == Changelog ==
98
 
 
 
 
99
  = 2.0 =
100
  * Completely rewritten for better performance, more organized code, and easier maintenance
101
  * Added support for Funny or Die
4
  Tags: Video, Thumbnails, YouTube, Vimeo, Blip, Justin.tv, Dailymotion, Metacafe, Image, Featured Image, Post Thumbnail
5
  Requires at least: 3.1
6
  Tested up to: 3.5.1
7
+ Stable tag: 2.0.1
8
 
9
  Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
10
 
96
 
97
  == Changelog ==
98
 
99
+ = 2.0.1 =
100
+ * Added support for Facebook's iFrame player
101
+
102
  = 2.0 =
103
  * Completely rewritten for better performance, more organized code, and easier maintenance
104
  * Added support for Funny or Die
video-thumbnails.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://refactored.co/plugins/video-thumbnails
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Currently supports YouTube, Vimeo, Facebook, Blip.tv, Justin.tv, Dailymotion, Metacafe, Wistia, Youku, Funny or Die, and MPORA.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
- Version: 2.0
9
  License: GPL2
10
  */
11
  /* Copyright 2013 Sutherland Boswell (email : sutherland.boswell@gmail.com)
@@ -28,7 +28,7 @@ License: GPL2
28
 
29
  define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
30
  define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
31
- define( 'VIDEO_THUMBNAILS_VERSION', '2.0' );
32
 
33
  // Providers
34
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-video-thumbnails-providers.php' );
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Currently supports YouTube, Vimeo, Facebook, Blip.tv, Justin.tv, Dailymotion, Metacafe, Wistia, Youku, Funny or Die, and MPORA.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
+ Version: 2.0.1
9
  License: GPL2
10
  */
11
  /* Copyright 2013 Sutherland Boswell (email : sutherland.boswell@gmail.com)
28
 
29
  define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
30
  define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
31
+ define( 'VIDEO_THUMBNAILS_VERSION', '2.0.1' );
32
 
33
  // Providers
34
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-video-thumbnails-providers.php' );