Video Thumbnails - Version 2.10.1

Version Description

  • Removed Justin.tv due to their shutdown
Download this release

Release Info

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

Code changes from version 2.10 to 2.10.1

php/providers/class-justintv-thumbnails.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
-
3
- /* Copyright 2014 Sutherland Boswell (email : sutherland.boswell@gmail.com)
4
-
5
- This program is free software; you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License, version 2, as
7
- published by the Free Software Foundation.
8
-
9
- This program is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with this program; if not, write to the Free Software
16
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
- */
18
-
19
- // Require thumbnail provider class
20
- require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-video-thumbnails-provider.php' );
21
-
22
- class Justintv_Thumbnails extends Video_Thumbnails_Provider {
23
-
24
- // Human-readable name of the video provider
25
- public $service_name = 'Justin.tv';
26
- const service_name = 'Justin.tv';
27
- // Slug for the video provider
28
- public $service_slug = 'justintv';
29
- const service_slug = 'justintv';
30
-
31
- public static function register_provider( $providers ) {
32
- $providers[self::service_slug] = new self;
33
- return $providers;
34
- }
35
-
36
- // Regex strings
37
- public $regexes = array(
38
- '#//(?:www\.)?justin\.tv/swflibs/JustinPlayer\.swf\?channel=([a-zA-Z0-9_]+)#' // Channel player
39
- );
40
-
41
- // Thumbnail URL
42
- public function get_thumbnail_url( $id ) {
43
- $request = "http://api.justin.tv/api/channel/show/$id.json";
44
- $response = wp_remote_get( $request, array( 'sslverify' => false ) );
45
- if( is_wp_error( $response ) ) {
46
- $result = $this->construct_info_retrieval_error( $request, $response );
47
- } else {
48
- $result = json_decode( $response['body'] );
49
- $result = $result->screen_cap_url_huge;
50
- }
51
- return $result;
52
- }
53
-
54
- // Test cases
55
- public static function get_test_cases() {
56
- return array(
57
- array(
58
- 'markup' => '<object type="application/x-shockwave-flash" data="http://www.justin.tv/swflibs/JustinPlayer.swf?channel=twit" id="live_embed_player_flash" height="300" width="400" bgcolor="#000000"><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="movie" value="http://www.justin.tv/swflibs/JustinPlayer.swf" /><param name="flashvars" value="hostname=www.justin.tv&channel=twit&auto_play=false&start_volume=25" /></object>',
59
- 'expected' => 'http://static-cdn.jtvnw.net/previews/live_user_twit-630x473.jpg',
60
- 'expected_hash' => 'b8c0dd6565f34e6bfbbddbb07ff0df74',
61
- 'name' => __( 'Flash Embed', 'video-thumbnails' )
62
- ),
63
- );
64
- }
65
-
66
- }
67
-
68
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
php/providers/providers.php CHANGED
@@ -22,7 +22,6 @@ require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-vimeo-thumbnails.php
22
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-facebook-thumbnails.php' );
23
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-vine-thumbnails.php' );
24
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-blip-thumbnails.php' );
25
- require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-justintv-thumbnails.php' );
26
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-dailymotion-thumbnails.php' );
27
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-metacafe-thumbnails.php' );
28
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-vk-thumbnails.php' );
@@ -45,7 +44,6 @@ add_filter( 'video_thumbnail_providers', array( 'Vimeo_Thumbnails', 'register_pr
45
  add_filter( 'video_thumbnail_providers', array( 'Facebook_Thumbnails', 'register_provider' ) );
46
  add_filter( 'video_thumbnail_providers', array( 'Vine_Thumbnails', 'register_provider' ) );
47
  add_filter( 'video_thumbnail_providers', array( 'Blip_Thumbnails', 'register_provider' ) );
48
- add_filter( 'video_thumbnail_providers', array( 'Justintv_Thumbnails', 'register_provider' ) );
49
  add_filter( 'video_thumbnail_providers', array( 'Dailymotion_Thumbnails', 'register_provider' ) );
50
  add_filter( 'video_thumbnail_providers', array( 'Metacafe_Thumbnails', 'register_provider' ) );
51
  add_filter( 'video_thumbnail_providers', array( 'Vk_Thumbnails', 'register_provider' ) );
22
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-facebook-thumbnails.php' );
23
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-vine-thumbnails.php' );
24
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-blip-thumbnails.php' );
 
25
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-dailymotion-thumbnails.php' );
26
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-metacafe-thumbnails.php' );
27
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-vk-thumbnails.php' );
44
  add_filter( 'video_thumbnail_providers', array( 'Facebook_Thumbnails', 'register_provider' ) );
45
  add_filter( 'video_thumbnail_providers', array( 'Vine_Thumbnails', 'register_provider' ) );
46
  add_filter( 'video_thumbnail_providers', array( 'Blip_Thumbnails', 'register_provider' ) );
 
47
  add_filter( 'video_thumbnail_providers', array( 'Dailymotion_Thumbnails', 'register_provider' ) );
48
  add_filter( 'video_thumbnail_providers', array( 'Metacafe_Thumbnails', 'register_provider' ) );
49
  add_filter( 'video_thumbnail_providers', array( 'Vk_Thumbnails', 'register_provider' ) );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: sutherlandboswell
3
  Donate link: http://wie.ly/u/donate
4
  Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image
5
  Requires at least: 3.2
6
- Tested up to: 3.9
7
- Stable tag: 2.10
8
 
9
  Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
10
 
@@ -22,7 +22,6 @@ Video Thumbnails makes it easy to automatically display video thumbnails in your
22
  * Vimeo
23
  * Facebook
24
  * Vine
25
- * Justin.tv
26
  * Twitch
27
  * Dailymotion
28
  * Metacafe
@@ -132,6 +131,9 @@ The Vimeo API has a rate limit, so in rare cases you may exceed this limit. Try
132
 
133
  == Changelog ==
134
 
 
 
 
135
  = 2.10 =
136
  * Improved debugging page
137
 
3
  Donate link: http://wie.ly/u/donate
4
  Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image
5
  Requires at least: 3.2
6
+ Tested up to: 3.9.2
7
+ Stable tag: 2.10.1
8
 
9
  Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
10
 
22
  * Vimeo
23
  * Facebook
24
  * Vine
 
25
  * Twitch
26
  * Dailymotion
27
  * Metacafe
131
 
132
  == Changelog ==
133
 
134
+ = 2.10.1 =
135
+ * Removed Justin.tv due to their shutdown
136
+
137
  = 2.10 =
138
  * Improved debugging page
139
 
video-thumbnails.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://refactored.co/plugins/video-thumbnails
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Supports YouTube, Vimeo, Facebook, Vine, Justin.tv, Twitch, Dailymotion, Metacafe, VK, Blip, Google Drive, Funny or Die, CollegeHumor, MPORA, Wistia, Youku, and Rutube.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
- Version: 2.10
9
  License: GPL2
10
  Text Domain: video-thumbnails
11
  Domain Path: /languages/
@@ -30,7 +30,7 @@ Domain Path: /languages/
30
 
31
  define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
32
  define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
33
- define( 'VIDEO_THUMBNAILS_VERSION', '2.10' );
34
 
35
  // Providers
36
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/providers.php' );
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Supports YouTube, Vimeo, Facebook, Vine, Justin.tv, Twitch, Dailymotion, Metacafe, VK, Blip, Google Drive, Funny or Die, CollegeHumor, MPORA, Wistia, Youku, and Rutube.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
+ Version: 2.10.1
9
  License: GPL2
10
  Text Domain: video-thumbnails
11
  Domain Path: /languages/
30
 
31
  define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
32
  define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
33
+ define( 'VIDEO_THUMBNAILS_VERSION', '2.10.1' );
34
 
35
  // Providers
36
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/providers.php' );