Plugin Directory

Changeset 1070207


Ignore:
Timestamp:
01/18/2015 02:04:42 AM (11 years ago)
Author:
sutherlandboswell
Message:

Version 2.10.3 with updates to fix a few providers and SSL issues

Location:
video-thumbnails
Files:
7 deleted
22 edited
35 copied

Legend:

Unmodified
Added
Removed
  • video-thumbnails/tags/2.10.3/php/class-video-thumbnails-settings.php

    r971730 r1070207  
    207207
    208208    function get_file_hash( $url ) {
    209         $response = wp_remote_get( $url, array( 'sslverify' => false ) );
     209        $response = wp_remote_get( $url );
    210210        if( is_wp_error( $response ) ) {
    211211            $result = false;
     
    247247                        $failed++;
    248248                    } else {
    249                         $result = explode( '?', $result );
    250                         $result = $result[0];
    251249                        $result_hash = false;
    252250                        if ( $result == $test_case['expected'] ) {
  • video-thumbnails/tags/2.10.3/php/providers/class-blip-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $url ) {
    4343        $request = "http://blip.tv/oembed?url=$url";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-collegehumor-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $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 );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-dailymotion-thumbnails.php

    r931306 r1070207  
    4444    public function get_thumbnail_url( $id ) {
    4545        $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 );
    4747        if( is_wp_error( $response ) ) {
    4848            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-facebook-thumbnails.php

    r931306 r1070207  
    3737    public $regexes = array(
    3838        '#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]+)#'
    4041    );
    4142
     
    4344    public function get_thumbnail_url( $id ) {
    4445        $request = 'https://graph.facebook.com/' . $id . '/picture?redirect=false';
    45         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     46        $response = wp_remote_get( $request );
    4647        if( is_wp_error( $response ) ) {
    4748            $result = $this->construct_info_retrieval_error( $request, $response );
     
    6566            array(
    6667                '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',
    6970                'name'          => __( 'Flash Embed', 'video-thumbnails' )
    7071            ),
    7172            array(
    7273                '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',
    7576                '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' )
    7683            ),
    7784        );
  • video-thumbnails/tags/2.10.3/php/providers/class-funnyordie-thumbnails.php

    r931306 r1070207  
    4343    public function get_thumbnail_url( $id ) {
    4444        $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 );
    4646        if( is_wp_error( $response ) ) {
    4747            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-googledrive-thumbnails.php

    r931306 r1070207  
    5959        if ( $api_key ) {
    6060            $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 );
    6262            if( is_wp_error( $response ) ) {
    6363                $result = $this->construct_info_retrieval_error( $request, $response );
    6464            } else {
    6565                $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                }
    6872            }
    6973        } else {
  • video-thumbnails/tags/2.10.3/php/providers/class-kaltura-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $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 );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
     
    4949            $result = (string) $xml->result->item->id;
    5050            $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 );
    5252            if( is_wp_error( $response ) ) {
    5353                $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-metacafe-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $request = "http://www.metacafe.com/api/item/$id/";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
     
    4949            $result = $xml->xpath( "/rss/channel/item/media:thumbnail/@url" );
    5050            $result = (string) $result[0]['url'];
     51            $result = $this->drop_url_parameters( $result );
    5152        }
    5253        return $result;
     
    5960                '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>',
    6061                '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',
    6263                'name'          => __( 'Flash Embed', 'video-thumbnails' )
    6364            ),
  • video-thumbnails/tags/2.10.3/php/providers/class-rutube-thumbnails.php

    r931306 r1070207  
    4646            $request = "http://rutube.ru/api/video/$id/?format=json";
    4747        }
    48         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     48        $response = wp_remote_get( $request );
    4949        if( is_wp_error( $response ) ) {
    5050            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-sapo-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $request = "http://videos.sapo.pt/$id";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
     
    5252                $meta = $metas->item( $i );
    5353                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'];
    5557                    break;
    5658                }
     
    6567            array(
    6668                '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://cache12.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',
    6971                'name'          => __( 'iFrame Embed', 'video-thumbnails' )
    7072            ),
  • video-thumbnails/tags/2.10.3/php/providers/class-ted-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $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 );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
    4747        } else {
    4848            $result = json_decode( $response['body'] );
    49             $result = $result->thumbnail_url;
     49            $result = str_replace( '240x180.jpg', '480x360.jpg', $result->thumbnail_url );
    5050        }
    5151        return $result;
  • video-thumbnails/tags/2.10.3/php/providers/class-tudou-thumbnails.php

    r931306 r1070207  
    5757        if ( $app_key ) {
    5858            $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 );
    6060            if( is_wp_error( $response ) ) {
    6161                $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-twitch-thumbnails.php

    r931306 r1070207  
    3838        '#(?:www\.)?twitch\.tv/(?:[A-Za-z0-9_]+)/c/([0-9]+)#', // Video URL
    3939        '#<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
    4041    );
    4142
     
    4344    public function get_thumbnail_url( $id ) {
    4445        $request = "https://api.twitch.tv/kraken/videos/c$id";
    45         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     46        $response = wp_remote_get( $request );
    4647        if( is_wp_error( $response ) ) {
    4748            $result = $this->construct_info_retrieval_error( $request, $response );
     
    5758        return array(
    5859            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',
    6263                'name'          => __( 'Video URL', 'video-thumbnails' )
    6364            ),
    6465            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&amp;channel=vanillatv&amp;auto_play=false&amp;start_volume=25&amp;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',
    6869                'name'          => __( 'Flash Embed', 'video-thumbnails' )
    6970            ),
  • video-thumbnails/tags/2.10.3/php/providers/class-video-thumbnails-provider.php

    r931306 r1070207  
    8383
    8484    /**
     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    /**
    8595     * Constructs a WP_Error object after failed API retrieval
    8696     * @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  
    8686        } else {
    8787            $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 );
    8989            if( is_wp_error( $response ) ) {
    9090                $result = $this->construct_info_retrieval_error( $request, $response );
     
    118118            array(
    119119                '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',
    122122                'name'          => __( 'Channel URL', 'video-thumbnails' )
    123123            ),
  • video-thumbnails/tags/2.10.3/php/providers/class-vine-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $request = "https://vine.co/v/$id";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/php/providers/class-vk-thumbnails.php

    r931306 r1070207  
    4343        $request = "http:$id";
    4444        $request = html_entity_decode( $request );
    45         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     45        $response = wp_remote_get( $request );
    4646        $result = false;
    4747        if( is_wp_error( $response ) ) {
  • video-thumbnails/tags/2.10.3/php/providers/class-wistia-thumbnails.php

    r931306 r1070207  
    6464        $id = urlencode( $id );
    6565        $request = "http://fast.wistia.com/oembed?url=$id";
    66         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     66        $response = wp_remote_get( $request );
    6767        if( is_wp_error( $response ) ) {
    6868            $result = $this->construct_info_retrieval_error( $request, $response );
    6969        } else {
    7070            $result = json_decode( $response['body'] );
    71             $result = $result->thumbnail_url;
     71            $result = $this->drop_url_parameters( $result->thumbnail_url );
    7272        }
    7373
  • video-thumbnails/tags/2.10.3/php/providers/class-youku-thumbnails.php

    r931306 r1070207  
    4444    public function get_thumbnail_url( $id ) {
    4545        $request = "http://v.youku.com/player/getPlayList/VideoIDS/$id/";
    46         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     46        $response = wp_remote_get( $request );
    4747        if( is_wp_error( $response ) ) {
    4848            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/tags/2.10.3/readme.txt

    r971730 r1070207  
    44Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image
    55Requires at least: 3.2
    6 Tested up to: 3.9.2
    7 Stable tag: 2.10.2
     6Tested up to: 4.1
     7Stable tag: 2.10.3
    88
    99Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
     
    131131
    132132== 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
    133138
    134139= 2.10.2 =
  • video-thumbnails/tags/2.10.3/video-thumbnails.php

    r971730 r1070207  
    66Author: Sutherland Boswell
    77Author URI: http://sutherlandboswell.com
    8 Version: 2.10.2
     8Version: 2.10.3
    99License: GPL2
    1010Text Domain: video-thumbnails
     
    3131define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
    3232define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
    33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10.2' );
     33define( 'VIDEO_THUMBNAILS_VERSION', '2.10.3' );
    3434
    3535// Providers
     
    345345
    346346        $error = '';
    347         $response = wp_remote_get( $image_url, array( 'sslverify' => false ) );
     347        $response = wp_remote_get( $image_url );
    348348        if( is_wp_error( $response ) ) {
    349349            $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  
    207207
    208208    function get_file_hash( $url ) {
    209         $response = wp_remote_get( $url, array( 'sslverify' => false ) );
     209        $response = wp_remote_get( $url );
    210210        if( is_wp_error( $response ) ) {
    211211            $result = false;
     
    247247                        $failed++;
    248248                    } else {
    249                         $result = explode( '?', $result );
    250                         $result = $result[0];
    251249                        $result_hash = false;
    252250                        if ( $result == $test_case['expected'] ) {
  • video-thumbnails/trunk/php/providers/class-blip-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $url ) {
    4343        $request = "http://blip.tv/oembed?url=$url";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-collegehumor-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $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 );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-dailymotion-thumbnails.php

    r931306 r1070207  
    4444    public function get_thumbnail_url( $id ) {
    4545        $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 );
    4747        if( is_wp_error( $response ) ) {
    4848            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-facebook-thumbnails.php

    r931306 r1070207  
    3737    public $regexes = array(
    3838        '#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]+)#'
    4041    );
    4142
     
    4344    public function get_thumbnail_url( $id ) {
    4445        $request = 'https://graph.facebook.com/' . $id . '/picture?redirect=false';
    45         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     46        $response = wp_remote_get( $request );
    4647        if( is_wp_error( $response ) ) {
    4748            $result = $this->construct_info_retrieval_error( $request, $response );
     
    6566            array(
    6667                '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',
    6970                'name'          => __( 'Flash Embed', 'video-thumbnails' )
    7071            ),
    7172            array(
    7273                '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',
    7576                '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' )
    7683            ),
    7784        );
  • video-thumbnails/trunk/php/providers/class-funnyordie-thumbnails.php

    r931306 r1070207  
    4343    public function get_thumbnail_url( $id ) {
    4444        $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 );
    4646        if( is_wp_error( $response ) ) {
    4747            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-googledrive-thumbnails.php

    r931306 r1070207  
    5959        if ( $api_key ) {
    6060            $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 );
    6262            if( is_wp_error( $response ) ) {
    6363                $result = $this->construct_info_retrieval_error( $request, $response );
    6464            } else {
    6565                $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                }
    6872            }
    6973        } else {
  • video-thumbnails/trunk/php/providers/class-kaltura-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $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 );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
     
    4949            $result = (string) $xml->result->item->id;
    5050            $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 );
    5252            if( is_wp_error( $response ) ) {
    5353                $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-metacafe-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $request = "http://www.metacafe.com/api/item/$id/";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
     
    4949            $result = $xml->xpath( "/rss/channel/item/media:thumbnail/@url" );
    5050            $result = (string) $result[0]['url'];
     51            $result = $this->drop_url_parameters( $result );
    5152        }
    5253        return $result;
     
    5960                '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>',
    6061                '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',
    6263                'name'          => __( 'Flash Embed', 'video-thumbnails' )
    6364            ),
  • video-thumbnails/trunk/php/providers/class-rutube-thumbnails.php

    r931306 r1070207  
    4646            $request = "http://rutube.ru/api/video/$id/?format=json";
    4747        }
    48         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     48        $response = wp_remote_get( $request );
    4949        if( is_wp_error( $response ) ) {
    5050            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-sapo-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $request = "http://videos.sapo.pt/$id";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
     
    5252                $meta = $metas->item( $i );
    5353                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'];
    5557                    break;
    5658                }
     
    6567            array(
    6668                '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://cache12.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',
    6971                'name'          => __( 'iFrame Embed', 'video-thumbnails' )
    7072            ),
  • video-thumbnails/trunk/php/providers/class-ted-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $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 );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
    4747        } else {
    4848            $result = json_decode( $response['body'] );
    49             $result = $result->thumbnail_url;
     49            $result = str_replace( '240x180.jpg', '480x360.jpg', $result->thumbnail_url );
    5050        }
    5151        return $result;
  • video-thumbnails/trunk/php/providers/class-tudou-thumbnails.php

    r931306 r1070207  
    5757        if ( $app_key ) {
    5858            $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 );
    6060            if( is_wp_error( $response ) ) {
    6161                $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-twitch-thumbnails.php

    r931306 r1070207  
    3838        '#(?:www\.)?twitch\.tv/(?:[A-Za-z0-9_]+)/c/([0-9]+)#', // Video URL
    3939        '#<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
    4041    );
    4142
     
    4344    public function get_thumbnail_url( $id ) {
    4445        $request = "https://api.twitch.tv/kraken/videos/c$id";
    45         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     46        $response = wp_remote_get( $request );
    4647        if( is_wp_error( $response ) ) {
    4748            $result = $this->construct_info_retrieval_error( $request, $response );
     
    5758        return array(
    5859            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',
    6263                'name'          => __( 'Video URL', 'video-thumbnails' )
    6364            ),
    6465            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&amp;channel=vanillatv&amp;auto_play=false&amp;start_volume=25&amp;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',
    6869                'name'          => __( 'Flash Embed', 'video-thumbnails' )
    6970            ),
  • video-thumbnails/trunk/php/providers/class-video-thumbnails-provider.php

    r931306 r1070207  
    8383
    8484    /**
     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    /**
    8595     * Constructs a WP_Error object after failed API retrieval
    8696     * @param  string   $request  The URL wp_remote_get() failed to retrieve
  • video-thumbnails/trunk/php/providers/class-vimeo-thumbnails.php

    r931306 r1070207  
    8686        } else {
    8787            $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 );
    8989            if( is_wp_error( $response ) ) {
    9090                $result = $this->construct_info_retrieval_error( $request, $response );
     
    118118            array(
    119119                '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',
    122122                'name'          => __( 'Channel URL', 'video-thumbnails' )
    123123            ),
  • video-thumbnails/trunk/php/providers/class-vine-thumbnails.php

    r931306 r1070207  
    4242    public function get_thumbnail_url( $id ) {
    4343        $request = "https://vine.co/v/$id";
    44         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     44        $response = wp_remote_get( $request );
    4545        if( is_wp_error( $response ) ) {
    4646            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/php/providers/class-vk-thumbnails.php

    r931306 r1070207  
    4343        $request = "http:$id";
    4444        $request = html_entity_decode( $request );
    45         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     45        $response = wp_remote_get( $request );
    4646        $result = false;
    4747        if( is_wp_error( $response ) ) {
  • video-thumbnails/trunk/php/providers/class-wistia-thumbnails.php

    r931306 r1070207  
    6464        $id = urlencode( $id );
    6565        $request = "http://fast.wistia.com/oembed?url=$id";
    66         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     66        $response = wp_remote_get( $request );
    6767        if( is_wp_error( $response ) ) {
    6868            $result = $this->construct_info_retrieval_error( $request, $response );
    6969        } else {
    7070            $result = json_decode( $response['body'] );
    71             $result = $result->thumbnail_url;
     71            $result = $this->drop_url_parameters( $result->thumbnail_url );
    7272        }
    7373
  • video-thumbnails/trunk/php/providers/class-youku-thumbnails.php

    r931306 r1070207  
    4444    public function get_thumbnail_url( $id ) {
    4545        $request = "http://v.youku.com/player/getPlayList/VideoIDS/$id/";
    46         $response = wp_remote_get( $request, array( 'sslverify' => false ) );
     46        $response = wp_remote_get( $request );
    4747        if( is_wp_error( $response ) ) {
    4848            $result = $this->construct_info_retrieval_error( $request, $response );
  • video-thumbnails/trunk/readme.txt

    r971730 r1070207  
    44Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image
    55Requires at least: 3.2
    6 Tested up to: 3.9.2
    7 Stable tag: 2.10.2
     6Tested up to: 4.1
     7Stable tag: 2.10.3
    88
    99Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
     
    131131
    132132== 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
    133138
    134139= 2.10.2 =
  • video-thumbnails/trunk/video-thumbnails.php

    r971730 r1070207  
    66Author: Sutherland Boswell
    77Author URI: http://sutherlandboswell.com
    8 Version: 2.10.2
     8Version: 2.10.3
    99License: GPL2
    1010Text Domain: video-thumbnails
     
    3131define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
    3232define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
    33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10.2' );
     33define( 'VIDEO_THUMBNAILS_VERSION', '2.10.3' );
    3434
    3535// Providers
     
    345345
    346346        $error = '';
    347         $response = wp_remote_get( $image_url, array( 'sslverify' => false ) );
     347        $response = wp_remote_get( $image_url );
    348348        if( is_wp_error( $response ) ) {
    349349            $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.