Changeset 1070207
- Timestamp:
- 01/18/2015 02:04:42 AM (11 years ago)
- Location:
- video-thumbnails
- Files:
-
- 7 deleted
- 22 edited
- 35 copied
-
tags/2.10.3 (copied) (copied from video-thumbnails/trunk)
-
tags/2.10.3/css/settings.css (copied) (copied from video-thumbnails/trunk/css/settings.css)
-
tags/2.10.3/js/settings.js (copied) (copied from video-thumbnails/trunk/js/settings.js)
-
tags/2.10.3/languages (copied) (copied from video-thumbnails/trunk/languages)
-
tags/2.10.3/languages/video-thumbnails-de_DE.mo (copied) (copied from video-thumbnails/trunk/languages/video-thumbnails-de_DE.mo)
-
tags/2.10.3/languages/video-thumbnails-de_DE.po (copied) (copied from video-thumbnails/trunk/languages/video-thumbnails-de_DE.po)
-
tags/2.10.3/php/class-video-thumbnails-settings.php (copied) (copied from video-thumbnails/trunk/php/class-video-thumbnails-settings.php) (2 diffs)
-
tags/2.10.3/php/extensions/automatic-youtube-video-posts.php (copied) (copied from video-thumbnails/trunk/php/extensions/automatic-youtube-video-posts.php)
-
tags/2.10.3/php/extensions/class-ayvp-thumbnails.php (deleted)
-
tags/2.10.3/php/extensions/class-simple-video-embedder-thumbnails.php (deleted)
-
tags/2.10.3/php/extensions/class-video-thumbnails-extension.php (deleted)
-
tags/2.10.3/php/extensions/extensions.php (copied) (copied from video-thumbnails/trunk/php/extensions/extensions.php)
-
tags/2.10.3/php/extensions/simple-video-embedder.php (copied) (copied from video-thumbnails/trunk/php/extensions/simple-video-embedder.php)
-
tags/2.10.3/php/extensions/wp-robot.php (copied) (copied from video-thumbnails/trunk/php/extensions/wp-robot.php)
-
tags/2.10.3/php/providers/class-blip-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-blip-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-collegehumor-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-collegehumor-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-dailymotion-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-dailymotion-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-facebook-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-facebook-thumbnails.php) (3 diffs)
-
tags/2.10.3/php/providers/class-funnyordie-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-funnyordie-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-googledrive-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-googledrive-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-justintv-thumbnails.php (deleted)
-
tags/2.10.3/php/providers/class-kaltura-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-kaltura-thumbnails.php) (2 diffs)
-
tags/2.10.3/php/providers/class-metacafe-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-metacafe-thumbnails.php) (3 diffs)
-
tags/2.10.3/php/providers/class-mpora-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-mpora-thumbnails.php)
-
tags/2.10.3/php/providers/class-rutube-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-rutube-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-sapo-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-sapo-thumbnails.php) (3 diffs)
-
tags/2.10.3/php/providers/class-ted-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-ted-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-tudou-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-tudou-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-twitch-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-twitch-thumbnails.php) (3 diffs)
-
tags/2.10.3/php/providers/class-video-thumbnails-provider.php (copied) (copied from video-thumbnails/trunk/php/providers/class-video-thumbnails-provider.php) (1 diff)
-
tags/2.10.3/php/providers/class-video-thumbnails-providers.php (deleted)
-
tags/2.10.3/php/providers/class-vimeo-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vimeo-thumbnails.php) (2 diffs)
-
tags/2.10.3/php/providers/class-vine-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vine-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-vk-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vk-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-wistia-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-wistia-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-youku-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-youku-thumbnails.php) (1 diff)
-
tags/2.10.3/php/providers/class-youtube-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-youtube-thumbnails.php)
-
tags/2.10.3/php/providers/providers.php (copied) (copied from video-thumbnails/trunk/php/providers/providers.php)
-
tags/2.10.3/readme.txt (copied) (copied from video-thumbnails/trunk/readme.txt) (2 diffs)
-
tags/2.10.3/screenshot-1.gif (deleted)
-
tags/2.10.3/screenshot-2.gif (deleted)
-
tags/2.10.3/video-thumbnails.php (copied) (copied from video-thumbnails/trunk/video-thumbnails.php) (3 diffs)
-
trunk/php/class-video-thumbnails-settings.php (modified) (2 diffs)
-
trunk/php/providers/class-blip-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-collegehumor-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-dailymotion-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-facebook-thumbnails.php (modified) (3 diffs)
-
trunk/php/providers/class-funnyordie-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-googledrive-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-kaltura-thumbnails.php (modified) (2 diffs)
-
trunk/php/providers/class-metacafe-thumbnails.php (modified) (3 diffs)
-
trunk/php/providers/class-rutube-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-sapo-thumbnails.php (modified) (3 diffs)
-
trunk/php/providers/class-ted-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-tudou-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-twitch-thumbnails.php (modified) (3 diffs)
-
trunk/php/providers/class-video-thumbnails-provider.php (modified) (1 diff)
-
trunk/php/providers/class-vimeo-thumbnails.php (modified) (2 diffs)
-
trunk/php/providers/class-vine-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-vk-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-wistia-thumbnails.php (modified) (1 diff)
-
trunk/php/providers/class-youku-thumbnails.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/video-thumbnails.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
video-thumbnails/tags/2.10.3/php/class-video-thumbnails-settings.php
r971730 r1070207 207 207 208 208 function get_file_hash( $url ) { 209 $response = wp_remote_get( $url , array( 'sslverify' => false ));209 $response = wp_remote_get( $url ); 210 210 if( is_wp_error( $response ) ) { 211 211 $result = false; … … 247 247 $failed++; 248 248 } else { 249 $result = explode( '?', $result );250 $result = $result[0];251 249 $result_hash = false; 252 250 if ( $result == $test_case['expected'] ) { -
video-thumbnails/tags/2.10.3/php/providers/class-blip-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $url ) { 43 43 $request = "http://blip.tv/oembed?url=$url"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-collegehumor-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.collegehumor.com/oembed.json?url=http%3A%2F%2Fwww.collegehumor.com%2Fvideo%2F$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-dailymotion-thumbnails.php
r931306 r1070207 44 44 public function get_thumbnail_url( $id ) { 45 45 $request = "https://api.dailymotion.com/video/$id?fields=thumbnail_url"; 46 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 47 47 if( is_wp_error( $response ) ) { 48 48 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-facebook-thumbnails.php
r931306 r1070207 37 37 public $regexes = array( 38 38 '#http://www\.facebook\.com/v/([0-9]+)#', // Flash Embed 39 '#https?://www\.facebook\.com/video/embed\?video_id=([0-9]+)#' // iFrame Embed 39 '#https?://www\.facebook\.com/video/embed\?video_id=([0-9]+)#', // iFrame Embed 40 '#https?://www\.facebook\.com/video\.php\?v=([0-9]+)#' 40 41 ); 41 42 … … 43 44 public function get_thumbnail_url( $id ) { 44 45 $request = 'https://graph.facebook.com/' . $id . '/picture?redirect=false'; 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 46 47 if( is_wp_error( $response ) ) { 47 48 $result = $this->construct_info_retrieval_error( $request, $response ); … … 65 66 array( 66 67 '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>', 67 'expected' => 'https:// graph.facebook.com/2560032632599/picture',68 'expected_hash' => ' fa4a6b4b7a0f056a7558dc9ccacb34c3',68 'expected' => 'https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xap1/v/t15.0-10/p160x160/50796_2560034672650_2560032632599_65313_313_b.jpg?oh=e8c767b1efafa6d8a4b672bad7be38d6&oe=55364081&__gda__=1428807476_a4d83140019b11ad602f2ef9960a364e', 69 'expected_hash' => '6b033d8f16dbf273048c5771d32ede64', 69 70 'name' => __( 'Flash Embed', 'video-thumbnails' ) 70 71 ), 71 72 array( 72 73 'markup' => '<iframe src="https://www.facebook.com/video/embed?video_id=2560032632599" width="960" height="720" frameborder="0"></iframe>', 73 'expected' => 'https:// graph.facebook.com/2560032632599/picture',74 'expected_hash' => ' fa4a6b4b7a0f056a7558dc9ccacb34c3',74 'expected' => 'https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xap1/v/t15.0-10/p160x160/50796_2560034672650_2560032632599_65313_313_b.jpg?oh=e8c767b1efafa6d8a4b672bad7be38d6&oe=55364081&__gda__=1428807476_a4d83140019b11ad602f2ef9960a364e', 75 'expected_hash' => '6b033d8f16dbf273048c5771d32ede64', 75 76 'name' => __( 'iFrame Embed', 'video-thumbnails' ) 77 ), 78 array( 79 'markup' => '<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script><div class="fb-post" data-href="https://www.facebook.com/video.php?v=10150326323406807" data-width="466"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/video.php?v=10150326323406807">Post</a> by <a href="https://www.facebook.com/PeterJacksonNZ">Peter Jackson</a>.</div></div>', 80 'expected' => 'https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xfa1/v/t15.0-10/p128x128/244423_10150326375786807_10150326323406807_4366_759_b.jpg?oh=013ce21bb54de51c383071598b269a91&oe=552CD270&__gda__=1428479462_339647870ec32227c391e98000935aec', 81 'expected_hash' => '184d20db21ac8edef9c9cee291be5ee6', 82 'name' => __( 'FBML Embed', 'video-thumbnails' ) 76 83 ), 77 84 ); -
video-thumbnails/tags/2.10.3/php/providers/class-funnyordie-thumbnails.php
r931306 r1070207 43 43 public function get_thumbnail_url( $id ) { 44 44 $request = "http://www.funnyordie.com/oembed.json?url=http%3A%2F%2Fwww.funnyordie.com%2Fvideos%2F$id"; 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));45 $response = wp_remote_get( $request ); 46 46 if( is_wp_error( $response ) ) { 47 47 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-googledrive-thumbnails.php
r931306 r1070207 59 59 if ( $api_key ) { 60 60 $request = "https://www.googleapis.com/drive/v2/files/$id?fields=thumbnailLink&key=$api_key"; 61 $response = wp_remote_get( $request , array( 'sslverify' => false ));61 $response = wp_remote_get( $request ); 62 62 if( is_wp_error( $response ) ) { 63 63 $result = $this->construct_info_retrieval_error( $request, $response ); 64 64 } else { 65 65 $json = json_decode( $response['body'] ); 66 $result = $json->thumbnailLink; 67 $result = str_replace( '=s220', '=s480', $result ); 66 if ( isset( $json->error ) ) { 67 $result = new WP_Error( 'googledrive_info_retrieval', $json->error->message ); 68 } else { 69 $result = $json->thumbnailLink; 70 $result = str_replace( '=s220', '=s480', $result ); 71 } 68 72 } 69 73 } else { -
video-thumbnails/tags/2.10.3/php/providers/class-kaltura-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.kaltura.com/api_v3/?service=thumbAsset&action=getbyentryid&entryId=$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); … … 49 49 $result = (string) $xml->result->item->id; 50 50 $request = "http://www.kaltura.com/api_v3/?service=thumbAsset&action=geturl&id=$result"; 51 $response = wp_remote_get( $request , array( 'sslverify' => false ));51 $response = wp_remote_get( $request ); 52 52 if( is_wp_error( $response ) ) { 53 53 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-metacafe-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.metacafe.com/api/item/$id/"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); … … 49 49 $result = $xml->xpath( "/rss/channel/item/media:thumbnail/@url" ); 50 50 $result = (string) $result[0]['url']; 51 $result = $this->drop_url_parameters( $result ); 51 52 } 52 53 return $result; … … 59 60 'markup' => '<embed flashVars="playerVars=autoPlay=no" src="http://www.metacafe.com/fplayer/8456223/men_in_black_3_trailer_2.swf" width="440" height="248" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_8456223" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>', 60 61 'expected' => 'http://s4.mcstatic.com/thumb/8456223/22479418/4/catalog_item5/0/1/men_in_black_3_trailer_2.jpg', 61 'expected_hash' => ' df46215fef1d9fb68eea64ba3ed9a4fd',62 'expected_hash' => '977187bfb00df55b39724d7de284f617', 62 63 'name' => __( 'Flash Embed', 'video-thumbnails' ) 63 64 ), -
video-thumbnails/tags/2.10.3/php/providers/class-rutube-thumbnails.php
r931306 r1070207 46 46 $request = "http://rutube.ru/api/video/$id/?format=json"; 47 47 } 48 $response = wp_remote_get( $request , array( 'sslverify' => false ));48 $response = wp_remote_get( $request ); 49 49 if( is_wp_error( $response ) ) { 50 50 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-sapo-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://videos.sapo.pt/$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); … … 52 52 $meta = $metas->item( $i ); 53 53 if ( $meta->getAttribute( 'property' ) == 'og:image' ) { 54 $result = $meta->getAttribute( 'content' ); 54 $og_image = $meta->getAttribute( 'content' ); 55 parse_str( parse_url( $og_image, PHP_URL_QUERY ), $image_array ); 56 $result = $image_array['pic']; 55 57 break; 56 58 } … … 65 67 array( 66 68 'markup' => '<iframe src="http://rd3.videos.sapo.pt/playhtml?file=http://rd3.videos.sapo.pt/ddACsFSuDEZZRWfNHTTy/mov/1" frameborder="0" scrolling="no" width="640" height="360" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe>', 67 'expected' => 'http://cache 12.stormap.sapo.pt/vidstore14/thumbnais/74/5f/4c/7038488_tf9s9.jpg',68 'expected_hash' => ' 0f95b2d32f3989a5d10d4d249f40b989',69 'expected' => 'http://cache02.stormap.sapo.pt/vidstore14/thumbnais/e9/08/37/7038489_l5VMt.jpg', 70 'expected_hash' => 'd8a74c3d4e054263a37abe9ceed782fd', 69 71 'name' => __( 'iFrame Embed', 'video-thumbnails' ) 70 72 ), -
video-thumbnails/tags/2.10.3/php/providers/class-ted-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.ted.com/talks/oembed.json?url=http%3A%2F%2Fwww.ted.com%2Ftalks%2F$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); 47 47 } else { 48 48 $result = json_decode( $response['body'] ); 49 $result = $result->thumbnail_url;49 $result = str_replace( '240x180.jpg', '480x360.jpg', $result->thumbnail_url ); 50 50 } 51 51 return $result; -
video-thumbnails/tags/2.10.3/php/providers/class-tudou-thumbnails.php
r931306 r1070207 57 57 if ( $app_key ) { 58 58 $request = "http://api.tudou.com/v6/video/info?app_key=$app_key&format=json&itemCodes=$id"; 59 $response = wp_remote_get( $request , array( 'sslverify' => false ));59 $response = wp_remote_get( $request ); 60 60 if( is_wp_error( $response ) ) { 61 61 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-twitch-thumbnails.php
r931306 r1070207 38 38 '#(?:www\.)?twitch\.tv/(?:[A-Za-z0-9_]+)/c/([0-9]+)#', // Video URL 39 39 '#<object[^>]+>.+?http://www\.twitch\.tv/widgets/archive_embed_player\.swf.+?chapter_id=([0-9]+).+?</object>#s', // Flash embed 40 '#<object[^>]+>.+?http://www\.twitch\.tv/swflibs/TwitchPlayer\.swf.+?videoId=c([0-9]+).+?</object>#s', // Newer Flash embed 40 41 ); 41 42 … … 43 44 public function get_thumbnail_url( $id ) { 44 45 $request = "https://api.twitch.tv/kraken/videos/c$id"; 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 46 47 if( is_wp_error( $response ) ) { 47 48 $result = $this->construct_info_retrieval_error( $request, $response ); … … 57 58 return array( 58 59 array( 59 'markup' => 'http://www.twitch.tv/ vanillatv/c/1537974',60 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive- 328087483-320x240.jpg',61 'expected_hash' => ' f3921b65f799aa648ef6dae29871c137',60 'markup' => 'http://www.twitch.tv/jodenstone/c/5793313', 61 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive-605904705-320x240.jpg', 62 'expected_hash' => '1b2c51fc7380c74d1b2d34751d73e4cb', 62 63 'name' => __( 'Video URL', 'video-thumbnails' ) 63 64 ), 64 65 array( 65 'markup' => '<object bgcolor="#000000" data="http://www.twitch.tv/ widgets/archive_embed_player.swf" height="378" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="620"><param name="movie" value="http://www.twitch.tv/widgets/archive_embed_player.swf"><param name="allowScriptAccess" value="always"><param name="allowNetworking" value="all"><param name="allowFullScreen" value="true"><param name="flashvars" value="title=VanillaTV%2B-%2BSweden%2Bvs%2BRussia%2B-%2BETF2L%2BNations%2BCup%2B-%2BSnakewater%2B%255BMap3%255D%2B-%2BPart%2B3&channel=vanillatv&auto_play=false&start_volume=25&chapter_id=1537974"></object>',66 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive- 328087483-320x240.jpg',67 'expected_hash' => ' f3921b65f799aa648ef6dae29871c137',66 'markup' => '<object bgcolor="#000000" data="http://www.twitch.tv/swflibs/TwitchPlayer.swf" height="378" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="620"><param name="movie" value="http://www.twitch.tv/swflibs/TwitchPlayer.swf" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="channel=jodenstone&auto_play=false&start_volume=25&videoId=c5793313&device_id=bbe9fbac133ab340" /></object>', 67 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive-605904705-320x240.jpg', 68 'expected_hash' => '1b2c51fc7380c74d1b2d34751d73e4cb', 68 69 'name' => __( 'Flash Embed', 'video-thumbnails' ) 69 70 ), -
video-thumbnails/tags/2.10.3/php/providers/class-video-thumbnails-provider.php
r931306 r1070207 83 83 84 84 /** 85 * Drops the parameters from a thumbnail URL 86 * @param string $url 87 * @return string 88 */ 89 static function drop_url_parameters( $url ) { 90 $url = explode( '?', $url ); 91 return $url[0]; 92 } 93 94 /** 85 95 * Constructs a WP_Error object after failed API retrieval 86 96 * @param string $request The URL wp_remote_get() failed to retrieve -
video-thumbnails/tags/2.10.3/php/providers/class-vimeo-thumbnails.php
r931306 r1070207 86 86 } else { 87 87 $request = "http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/$id"; 88 $response = wp_remote_get( $request , array( 'sslverify' => false ));88 $response = wp_remote_get( $request ); 89 89 if( is_wp_error( $response ) ) { 90 90 $result = $this->construct_info_retrieval_error( $request, $response ); … … 118 118 array( 119 119 'markup' => 'https://vimeo.com/channels/soundworkscollection/44520894', 120 'expected' => 'http://i.vimeocdn.com/video/ 313130530_1280.jpg',121 'expected_hash' => ' 32f742bbe980e5d98d8aa0256026b459',120 'expected' => 'http://i.vimeocdn.com/video/502998892_1280.jpg', 121 'expected_hash' => 'fde254d7ef7b6463cbd2451a99f2ddb1', 122 122 'name' => __( 'Channel URL', 'video-thumbnails' ) 123 123 ), -
video-thumbnails/tags/2.10.3/php/providers/class-vine-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "https://vine.co/v/$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/php/providers/class-vk-thumbnails.php
r931306 r1070207 43 43 $request = "http:$id"; 44 44 $request = html_entity_decode( $request ); 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));45 $response = wp_remote_get( $request ); 46 46 $result = false; 47 47 if( is_wp_error( $response ) ) { -
video-thumbnails/tags/2.10.3/php/providers/class-wistia-thumbnails.php
r931306 r1070207 64 64 $id = urlencode( $id ); 65 65 $request = "http://fast.wistia.com/oembed?url=$id"; 66 $response = wp_remote_get( $request , array( 'sslverify' => false ));66 $response = wp_remote_get( $request ); 67 67 if( is_wp_error( $response ) ) { 68 68 $result = $this->construct_info_retrieval_error( $request, $response ); 69 69 } else { 70 70 $result = json_decode( $response['body'] ); 71 $result = $ result->thumbnail_url;71 $result = $this->drop_url_parameters( $result->thumbnail_url ); 72 72 } 73 73 -
video-thumbnails/tags/2.10.3/php/providers/class-youku-thumbnails.php
r931306 r1070207 44 44 public function get_thumbnail_url( $id ) { 45 45 $request = "http://v.youku.com/player/getPlayList/VideoIDS/$id/"; 46 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 47 47 if( is_wp_error( $response ) ) { 48 48 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/tags/2.10.3/readme.txt
r971730 r1070207 4 4 Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image 5 5 Requires at least: 3.2 6 Tested up to: 3.9.27 Stable tag: 2.10. 26 Tested up to: 4.1 7 Stable tag: 2.10.3 8 8 9 9 Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template. … … 131 131 132 132 == Changelog == 133 134 = 2.10.3 = 135 * Various updates to providers 136 * Removed "sslverify" => false in wp_remote_get() (may cause errors on WordPress versions before 3.7) 137 * Better error messages for Google Drive 133 138 134 139 = 2.10.2 = -
video-thumbnails/tags/2.10.3/video-thumbnails.php
r971730 r1070207 6 6 Author: Sutherland Boswell 7 7 Author URI: http://sutherlandboswell.com 8 Version: 2.10. 28 Version: 2.10.3 9 9 License: GPL2 10 10 Text Domain: video-thumbnails … … 31 31 define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) ); 32 32 define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' ); 33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10. 2' );33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10.3' ); 34 34 35 35 // Providers … … 345 345 346 346 $error = ''; 347 $response = wp_remote_get( $image_url , array( 'sslverify' => false ));347 $response = wp_remote_get( $image_url ); 348 348 if( is_wp_error( $response ) ) { 349 349 $error = new WP_Error( 'thumbnail_retrieval', sprintf( __( 'Error retrieving a thumbnail from the URL <a href="%1$s">%1$s</a> using <code>wp_remote_get()</code><br />If opening that URL in your web browser returns anything else than an error page, the problem may be related to your web server and might be something your host administrator can solve.', 'video-thumbnails' ), $image_url ) . '<br>' . __( 'Error Details:', 'video-thumbnails' ) . ' ' . $response->get_error_message() ); -
video-thumbnails/trunk/php/class-video-thumbnails-settings.php
r971730 r1070207 207 207 208 208 function get_file_hash( $url ) { 209 $response = wp_remote_get( $url , array( 'sslverify' => false ));209 $response = wp_remote_get( $url ); 210 210 if( is_wp_error( $response ) ) { 211 211 $result = false; … … 247 247 $failed++; 248 248 } else { 249 $result = explode( '?', $result );250 $result = $result[0];251 249 $result_hash = false; 252 250 if ( $result == $test_case['expected'] ) { -
video-thumbnails/trunk/php/providers/class-blip-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $url ) { 43 43 $request = "http://blip.tv/oembed?url=$url"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-collegehumor-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.collegehumor.com/oembed.json?url=http%3A%2F%2Fwww.collegehumor.com%2Fvideo%2F$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-dailymotion-thumbnails.php
r931306 r1070207 44 44 public function get_thumbnail_url( $id ) { 45 45 $request = "https://api.dailymotion.com/video/$id?fields=thumbnail_url"; 46 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 47 47 if( is_wp_error( $response ) ) { 48 48 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-facebook-thumbnails.php
r931306 r1070207 37 37 public $regexes = array( 38 38 '#http://www\.facebook\.com/v/([0-9]+)#', // Flash Embed 39 '#https?://www\.facebook\.com/video/embed\?video_id=([0-9]+)#' // iFrame Embed 39 '#https?://www\.facebook\.com/video/embed\?video_id=([0-9]+)#', // iFrame Embed 40 '#https?://www\.facebook\.com/video\.php\?v=([0-9]+)#' 40 41 ); 41 42 … … 43 44 public function get_thumbnail_url( $id ) { 44 45 $request = 'https://graph.facebook.com/' . $id . '/picture?redirect=false'; 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 46 47 if( is_wp_error( $response ) ) { 47 48 $result = $this->construct_info_retrieval_error( $request, $response ); … … 65 66 array( 66 67 '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>', 67 'expected' => 'https:// graph.facebook.com/2560032632599/picture',68 'expected_hash' => ' fa4a6b4b7a0f056a7558dc9ccacb34c3',68 'expected' => 'https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xap1/v/t15.0-10/p160x160/50796_2560034672650_2560032632599_65313_313_b.jpg?oh=e8c767b1efafa6d8a4b672bad7be38d6&oe=55364081&__gda__=1428807476_a4d83140019b11ad602f2ef9960a364e', 69 'expected_hash' => '6b033d8f16dbf273048c5771d32ede64', 69 70 'name' => __( 'Flash Embed', 'video-thumbnails' ) 70 71 ), 71 72 array( 72 73 'markup' => '<iframe src="https://www.facebook.com/video/embed?video_id=2560032632599" width="960" height="720" frameborder="0"></iframe>', 73 'expected' => 'https:// graph.facebook.com/2560032632599/picture',74 'expected_hash' => ' fa4a6b4b7a0f056a7558dc9ccacb34c3',74 'expected' => 'https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xap1/v/t15.0-10/p160x160/50796_2560034672650_2560032632599_65313_313_b.jpg?oh=e8c767b1efafa6d8a4b672bad7be38d6&oe=55364081&__gda__=1428807476_a4d83140019b11ad602f2ef9960a364e', 75 'expected_hash' => '6b033d8f16dbf273048c5771d32ede64', 75 76 'name' => __( 'iFrame Embed', 'video-thumbnails' ) 77 ), 78 array( 79 'markup' => '<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script><div class="fb-post" data-href="https://www.facebook.com/video.php?v=10150326323406807" data-width="466"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/video.php?v=10150326323406807">Post</a> by <a href="https://www.facebook.com/PeterJacksonNZ">Peter Jackson</a>.</div></div>', 80 'expected' => 'https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xfa1/v/t15.0-10/p128x128/244423_10150326375786807_10150326323406807_4366_759_b.jpg?oh=013ce21bb54de51c383071598b269a91&oe=552CD270&__gda__=1428479462_339647870ec32227c391e98000935aec', 81 'expected_hash' => '184d20db21ac8edef9c9cee291be5ee6', 82 'name' => __( 'FBML Embed', 'video-thumbnails' ) 76 83 ), 77 84 ); -
video-thumbnails/trunk/php/providers/class-funnyordie-thumbnails.php
r931306 r1070207 43 43 public function get_thumbnail_url( $id ) { 44 44 $request = "http://www.funnyordie.com/oembed.json?url=http%3A%2F%2Fwww.funnyordie.com%2Fvideos%2F$id"; 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));45 $response = wp_remote_get( $request ); 46 46 if( is_wp_error( $response ) ) { 47 47 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-googledrive-thumbnails.php
r931306 r1070207 59 59 if ( $api_key ) { 60 60 $request = "https://www.googleapis.com/drive/v2/files/$id?fields=thumbnailLink&key=$api_key"; 61 $response = wp_remote_get( $request , array( 'sslverify' => false ));61 $response = wp_remote_get( $request ); 62 62 if( is_wp_error( $response ) ) { 63 63 $result = $this->construct_info_retrieval_error( $request, $response ); 64 64 } else { 65 65 $json = json_decode( $response['body'] ); 66 $result = $json->thumbnailLink; 67 $result = str_replace( '=s220', '=s480', $result ); 66 if ( isset( $json->error ) ) { 67 $result = new WP_Error( 'googledrive_info_retrieval', $json->error->message ); 68 } else { 69 $result = $json->thumbnailLink; 70 $result = str_replace( '=s220', '=s480', $result ); 71 } 68 72 } 69 73 } else { -
video-thumbnails/trunk/php/providers/class-kaltura-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.kaltura.com/api_v3/?service=thumbAsset&action=getbyentryid&entryId=$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); … … 49 49 $result = (string) $xml->result->item->id; 50 50 $request = "http://www.kaltura.com/api_v3/?service=thumbAsset&action=geturl&id=$result"; 51 $response = wp_remote_get( $request , array( 'sslverify' => false ));51 $response = wp_remote_get( $request ); 52 52 if( is_wp_error( $response ) ) { 53 53 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-metacafe-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.metacafe.com/api/item/$id/"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); … … 49 49 $result = $xml->xpath( "/rss/channel/item/media:thumbnail/@url" ); 50 50 $result = (string) $result[0]['url']; 51 $result = $this->drop_url_parameters( $result ); 51 52 } 52 53 return $result; … … 59 60 'markup' => '<embed flashVars="playerVars=autoPlay=no" src="http://www.metacafe.com/fplayer/8456223/men_in_black_3_trailer_2.swf" width="440" height="248" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_8456223" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>', 60 61 'expected' => 'http://s4.mcstatic.com/thumb/8456223/22479418/4/catalog_item5/0/1/men_in_black_3_trailer_2.jpg', 61 'expected_hash' => ' df46215fef1d9fb68eea64ba3ed9a4fd',62 'expected_hash' => '977187bfb00df55b39724d7de284f617', 62 63 'name' => __( 'Flash Embed', 'video-thumbnails' ) 63 64 ), -
video-thumbnails/trunk/php/providers/class-rutube-thumbnails.php
r931306 r1070207 46 46 $request = "http://rutube.ru/api/video/$id/?format=json"; 47 47 } 48 $response = wp_remote_get( $request , array( 'sslverify' => false ));48 $response = wp_remote_get( $request ); 49 49 if( is_wp_error( $response ) ) { 50 50 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-sapo-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://videos.sapo.pt/$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); … … 52 52 $meta = $metas->item( $i ); 53 53 if ( $meta->getAttribute( 'property' ) == 'og:image' ) { 54 $result = $meta->getAttribute( 'content' ); 54 $og_image = $meta->getAttribute( 'content' ); 55 parse_str( parse_url( $og_image, PHP_URL_QUERY ), $image_array ); 56 $result = $image_array['pic']; 55 57 break; 56 58 } … … 65 67 array( 66 68 'markup' => '<iframe src="http://rd3.videos.sapo.pt/playhtml?file=http://rd3.videos.sapo.pt/ddACsFSuDEZZRWfNHTTy/mov/1" frameborder="0" scrolling="no" width="640" height="360" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe>', 67 'expected' => 'http://cache 12.stormap.sapo.pt/vidstore14/thumbnais/74/5f/4c/7038488_tf9s9.jpg',68 'expected_hash' => ' 0f95b2d32f3989a5d10d4d249f40b989',69 'expected' => 'http://cache02.stormap.sapo.pt/vidstore14/thumbnais/e9/08/37/7038489_l5VMt.jpg', 70 'expected_hash' => 'd8a74c3d4e054263a37abe9ceed782fd', 69 71 'name' => __( 'iFrame Embed', 'video-thumbnails' ) 70 72 ), -
video-thumbnails/trunk/php/providers/class-ted-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "http://www.ted.com/talks/oembed.json?url=http%3A%2F%2Fwww.ted.com%2Ftalks%2F$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); 47 47 } else { 48 48 $result = json_decode( $response['body'] ); 49 $result = $result->thumbnail_url;49 $result = str_replace( '240x180.jpg', '480x360.jpg', $result->thumbnail_url ); 50 50 } 51 51 return $result; -
video-thumbnails/trunk/php/providers/class-tudou-thumbnails.php
r931306 r1070207 57 57 if ( $app_key ) { 58 58 $request = "http://api.tudou.com/v6/video/info?app_key=$app_key&format=json&itemCodes=$id"; 59 $response = wp_remote_get( $request , array( 'sslverify' => false ));59 $response = wp_remote_get( $request ); 60 60 if( is_wp_error( $response ) ) { 61 61 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-twitch-thumbnails.php
r931306 r1070207 38 38 '#(?:www\.)?twitch\.tv/(?:[A-Za-z0-9_]+)/c/([0-9]+)#', // Video URL 39 39 '#<object[^>]+>.+?http://www\.twitch\.tv/widgets/archive_embed_player\.swf.+?chapter_id=([0-9]+).+?</object>#s', // Flash embed 40 '#<object[^>]+>.+?http://www\.twitch\.tv/swflibs/TwitchPlayer\.swf.+?videoId=c([0-9]+).+?</object>#s', // Newer Flash embed 40 41 ); 41 42 … … 43 44 public function get_thumbnail_url( $id ) { 44 45 $request = "https://api.twitch.tv/kraken/videos/c$id"; 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 46 47 if( is_wp_error( $response ) ) { 47 48 $result = $this->construct_info_retrieval_error( $request, $response ); … … 57 58 return array( 58 59 array( 59 'markup' => 'http://www.twitch.tv/ vanillatv/c/1537974',60 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive- 328087483-320x240.jpg',61 'expected_hash' => ' f3921b65f799aa648ef6dae29871c137',60 'markup' => 'http://www.twitch.tv/jodenstone/c/5793313', 61 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive-605904705-320x240.jpg', 62 'expected_hash' => '1b2c51fc7380c74d1b2d34751d73e4cb', 62 63 'name' => __( 'Video URL', 'video-thumbnails' ) 63 64 ), 64 65 array( 65 'markup' => '<object bgcolor="#000000" data="http://www.twitch.tv/ widgets/archive_embed_player.swf" height="378" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="620"><param name="movie" value="http://www.twitch.tv/widgets/archive_embed_player.swf"><param name="allowScriptAccess" value="always"><param name="allowNetworking" value="all"><param name="allowFullScreen" value="true"><param name="flashvars" value="title=VanillaTV%2B-%2BSweden%2Bvs%2BRussia%2B-%2BETF2L%2BNations%2BCup%2B-%2BSnakewater%2B%255BMap3%255D%2B-%2BPart%2B3&channel=vanillatv&auto_play=false&start_volume=25&chapter_id=1537974"></object>',66 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive- 328087483-320x240.jpg',67 'expected_hash' => ' f3921b65f799aa648ef6dae29871c137',66 'markup' => '<object bgcolor="#000000" data="http://www.twitch.tv/swflibs/TwitchPlayer.swf" height="378" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="620"><param name="movie" value="http://www.twitch.tv/swflibs/TwitchPlayer.swf" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="channel=jodenstone&auto_play=false&start_volume=25&videoId=c5793313&device_id=bbe9fbac133ab340" /></object>', 67 'expected' => 'http://static-cdn.jtvnw.net/jtv.thumbs/archive-605904705-320x240.jpg', 68 'expected_hash' => '1b2c51fc7380c74d1b2d34751d73e4cb', 68 69 'name' => __( 'Flash Embed', 'video-thumbnails' ) 69 70 ), -
video-thumbnails/trunk/php/providers/class-video-thumbnails-provider.php
r931306 r1070207 83 83 84 84 /** 85 * Drops the parameters from a thumbnail URL 86 * @param string $url 87 * @return string 88 */ 89 static function drop_url_parameters( $url ) { 90 $url = explode( '?', $url ); 91 return $url[0]; 92 } 93 94 /** 85 95 * Constructs a WP_Error object after failed API retrieval 86 96 * @param string $request The URL wp_remote_get() failed to retrieve -
video-thumbnails/trunk/php/providers/class-vimeo-thumbnails.php
r931306 r1070207 86 86 } else { 87 87 $request = "http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/$id"; 88 $response = wp_remote_get( $request , array( 'sslverify' => false ));88 $response = wp_remote_get( $request ); 89 89 if( is_wp_error( $response ) ) { 90 90 $result = $this->construct_info_retrieval_error( $request, $response ); … … 118 118 array( 119 119 'markup' => 'https://vimeo.com/channels/soundworkscollection/44520894', 120 'expected' => 'http://i.vimeocdn.com/video/ 313130530_1280.jpg',121 'expected_hash' => ' 32f742bbe980e5d98d8aa0256026b459',120 'expected' => 'http://i.vimeocdn.com/video/502998892_1280.jpg', 121 'expected_hash' => 'fde254d7ef7b6463cbd2451a99f2ddb1', 122 122 'name' => __( 'Channel URL', 'video-thumbnails' ) 123 123 ), -
video-thumbnails/trunk/php/providers/class-vine-thumbnails.php
r931306 r1070207 42 42 public function get_thumbnail_url( $id ) { 43 43 $request = "https://vine.co/v/$id"; 44 $response = wp_remote_get( $request , array( 'sslverify' => false ));44 $response = wp_remote_get( $request ); 45 45 if( is_wp_error( $response ) ) { 46 46 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/php/providers/class-vk-thumbnails.php
r931306 r1070207 43 43 $request = "http:$id"; 44 44 $request = html_entity_decode( $request ); 45 $response = wp_remote_get( $request , array( 'sslverify' => false ));45 $response = wp_remote_get( $request ); 46 46 $result = false; 47 47 if( is_wp_error( $response ) ) { -
video-thumbnails/trunk/php/providers/class-wistia-thumbnails.php
r931306 r1070207 64 64 $id = urlencode( $id ); 65 65 $request = "http://fast.wistia.com/oembed?url=$id"; 66 $response = wp_remote_get( $request , array( 'sslverify' => false ));66 $response = wp_remote_get( $request ); 67 67 if( is_wp_error( $response ) ) { 68 68 $result = $this->construct_info_retrieval_error( $request, $response ); 69 69 } else { 70 70 $result = json_decode( $response['body'] ); 71 $result = $ result->thumbnail_url;71 $result = $this->drop_url_parameters( $result->thumbnail_url ); 72 72 } 73 73 -
video-thumbnails/trunk/php/providers/class-youku-thumbnails.php
r931306 r1070207 44 44 public function get_thumbnail_url( $id ) { 45 45 $request = "http://v.youku.com/player/getPlayList/VideoIDS/$id/"; 46 $response = wp_remote_get( $request , array( 'sslverify' => false ));46 $response = wp_remote_get( $request ); 47 47 if( is_wp_error( $response ) ) { 48 48 $result = $this->construct_info_retrieval_error( $request, $response ); -
video-thumbnails/trunk/readme.txt
r971730 r1070207 4 4 Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image 5 5 Requires at least: 3.2 6 Tested up to: 3.9.27 Stable tag: 2.10. 26 Tested up to: 4.1 7 Stable tag: 2.10.3 8 8 9 9 Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template. … … 131 131 132 132 == Changelog == 133 134 = 2.10.3 = 135 * Various updates to providers 136 * Removed "sslverify" => false in wp_remote_get() (may cause errors on WordPress versions before 3.7) 137 * Better error messages for Google Drive 133 138 134 139 = 2.10.2 = -
video-thumbnails/trunk/video-thumbnails.php
r971730 r1070207 6 6 Author: Sutherland Boswell 7 7 Author URI: http://sutherlandboswell.com 8 Version: 2.10. 28 Version: 2.10.3 9 9 License: GPL2 10 10 Text Domain: video-thumbnails … … 31 31 define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) ); 32 32 define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' ); 33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10. 2' );33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10.3' ); 34 34 35 35 // Providers … … 345 345 346 346 $error = ''; 347 $response = wp_remote_get( $image_url , array( 'sslverify' => false ));347 $response = wp_remote_get( $image_url ); 348 348 if( is_wp_error( $response ) ) { 349 349 $error = new WP_Error( 'thumbnail_retrieval', sprintf( __( 'Error retrieving a thumbnail from the URL <a href="%1$s">%1$s</a> using <code>wp_remote_get()</code><br />If opening that URL in your web browser returns anything else than an error page, the problem may be related to your web server and might be something your host administrator can solve.', 'video-thumbnails' ), $image_url ) . '<br>' . __( 'Error Details:', 'video-thumbnails' ) . ' ' . $response->get_error_message() );
Note: See TracChangeset
for help on using the changeset viewer.