WordPress.org

Plugin Directory

Changeset 571082


Ignore:
Timestamp:
07/12/12 06:09:36 (22 months ago)
Author:
Viper007Bond
Message:

v6.4.2

Location:
vipers-video-quicktags/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vipers-video-quicktags/trunk/readme.txt

    r530715 r571082  
    9999 
    100100== Changelog == 
     101 
     102= v6.4.2 = 
     103 
     104* **General:** Support SSL (`https://`) video URLs. Props [Tyrel Kelsey](http://ninnypants.com/) for the bug report. 
    101105 
    102106= v6.4.1 = 
  • vipers-video-quicktags/trunk/vipers-video-quicktags.php

    r530715 r571082  
    66Plugin URI:   http://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/ 
    77Description:  Easily embed videos from various video websites such as YouTube, DailyMotion, and Vimeo into your posts. 
    8 Version:      6.4.1 
     8Version:      6.4.2 
    99Author:       Viper007Bond 
    1010Author URI:   http://www.viper007bond.com/ 
     
    5656 
    5757class VipersVideoQuicktags { 
    58     var $version = '6.4.1'; 
     58    var $version = '6.4.2'; 
    5959    var $settings = array(); 
    6060    var $defaultsettings = array(); 
     
    15501550            <td> 
    15511551                <input type="text" name="vvq-youtube-width" id="vvq-width" size="3" value="<?php echo esc_attr($this->settings['youtube']['width']); ?>" /> &#215; 
    1552                 <input type="text" name="vvq-youtube-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['youtube']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?>  
     1552                <input type="text" name="vvq-youtube-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['youtube']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?> 
    15531553                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="checkbox" name="vvq-youtube-aspectratio" id="vvq-aspectratio" value="1"<?php checked($this->settings['youtube']['aspectratio'], 1); ?> /> <?php _e('Maintain aspect ratio', 'vipers-video-quicktags'); ?></label> 
    15541554                <input type="hidden" id="vvq-width-default" value="<?php echo esc_attr($this->defaultsettings['youtube']['width']); ?>" /> 
     
    16461646            <td> 
    16471647                <input type="text" name="vvq-googlevideo-width" id="vvq-width" size="3" value="<?php echo esc_attr($this->settings['googlevideo']['width']); ?>" /> &#215; 
    1648                 <input type="text" name="vvq-googlevideo-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['googlevideo']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?>  
     1648                <input type="text" name="vvq-googlevideo-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['googlevideo']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?> 
    16491649                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="checkbox" name="vvq-googlevideo-aspectratio" id="vvq-aspectratio" value="1"<?php checked($this->settings['googlevideo']['aspectratio'], 1); ?> /> <?php _e('Maintain aspect ratio', 'vipers-video-quicktags'); ?></label> 
    16501650                <input type="hidden" id="vvq-width-default" value="<?php echo esc_attr($this->defaultsettings['googlevideo']['width']); ?>" /> 
     
    17321732            <td> 
    17331733                <input type="text" name="vvq-dailymotion-width" id="vvq-width" size="3" value="<?php echo esc_attr($this->settings['dailymotion']['width']); ?>" /> &#215; 
    1734                 <input type="text" name="vvq-dailymotion-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['dailymotion']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?>  
     1734                <input type="text" name="vvq-dailymotion-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['dailymotion']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?> 
    17351735                <input type="hidden" id="vvq-aspectratio" value="0" /> 
    17361736                <input type="hidden" id="vvq-width-default" value="<?php echo esc_attr($this->defaultsettings['dailymotion']['width']); ?>" /> 
     
    18741874            <td> 
    18751875                <input type="text" name="vvq-vimeo-width" id="vvq-width" size="3" value="<?php echo esc_attr($this->settings['vimeo']['width']); ?>" /> &#215; 
    1876                 <input type="text" name="vvq-vimeo-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['vimeo']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?>  
     1876                <input type="text" name="vvq-vimeo-height" id="vvq-height" size="3" value="<?php echo esc_attr($this->settings['vimeo']['height']); ?>" /> <?php _e('pixels', 'vipers-video-quicktags'); ?> 
    18771877                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="checkbox" name="vvq-vimeo-aspectratio" id="vvq-aspectratio" value="1"<?php checked($this->settings['vimeo']['aspectratio'], 1); ?> /> <?php _e('Maintain aspect ratio', 'vipers-video-quicktags'); ?></label> 
    18781878                <input type="hidden" id="vvq-width-default" value="<?php echo esc_attr($this->defaultsettings['vimeo']['width']); ?>" /> 
     
    28232823 
    28242824 
     2825    // Is a string a URL? Not as perfect as esc_url() validation but it'll do 
     2826    function is_url( $string ) { 
     2827        return preg_match( '#^https?://#i', $string ); 
     2828    } 
     2829 
     2830 
    28252831    // Reverse the parts we care about (and probably some we don't) of wptexturize() which gets applied before shortcodes 
    28262832    function wpuntexturize( $text ) { 
     
    28922898 
    28932899        // If a URL was passed 
    2894         if ( 'http://' == substr( $content, 0, 7 ) ) { 
     2900        if ( $this->is_url( $content ) ) { 
    28952901 
    28962902            // Playlist URL ( http://www.youtube.com/playlist?list=PLXXXXX ) 
     
    30123018 
    30133019        // If a URL was passed 
    3014         if ( 'http://' == substr( $content, 0, 7 ) ) { 
    3015             preg_match( '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', $content, $matches ); 
     3020        if ( $this->is_url( $content ) ) { 
     3021            preg_match( '#https?://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', $content, $matches ); 
    30163022            if ( empty($matches) || empty($matches[2]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('Google Video', 'vipers-video-quicktags') ) ); 
    30173023 
     
    30643070 
    30653071        // If a URL was passed 
    3066         if ( 'http://' == substr( $content, 0, 7 ) ) { 
     3072        if ( $this->is_url( $content ) ) { 
    30673073            //http://www.dailymotion.com/visited/search/top%2Bgear/video/x347lz_bugatti-veyron-407-kmh-la-plus-rapi_shortfilms 
    3068             preg_match( '#http://(www.dailymotion|dailymotion)\.com/(.+)/([0-9a-zA-Z]+)\_(.*?)#i', $content, $matches ); 
     3074            preg_match( '#https?://(www.dailymotion|dailymotion)\.com/(.+)/([0-9a-zA-Z]+)\_(.*?)#i', $content, $matches ); 
    30693075            if ( empty($matches) || empty($matches[3]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('DailyMotion', 'vipers-video-quicktags') ) ); 
    30703076 
     
    31273133 
    31283134        // If a URL was passed 
    3129         if ( 'http://' == substr( $content, 0, 7 ) ) { 
    3130             preg_match( '#http://(www.vimeo|vimeo)\.com(/|/clip:)(\d+)(.*?)#i', $content, $matches ); 
     3135        if ( $this->is_url( $content ) ) { 
     3136            preg_match( '#https?://(www.vimeo|vimeo)\.com(/|/clip:)(\d+)(.*?)#i', $content, $matches ); 
    31313137            if ( empty($matches) || empty($matches[3]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('Vimeo', 'vipers-video-quicktags') ) ); 
    31323138 
     
    31803186 
    31813187        // If a URL was passed 
    3182         if ( 'http://' == substr( $content, 0, 7 ) ) { 
     3188        if ( $this->is_url( $content ) ) { 
    31833189            $videoid = null; 
    31843190 
    31853191            // Old format 
    3186             preg_match( '#http://(www.veoh|veoh)\.com/videos/([0-9a-zA-Z]+)(.*?)#i', $content, $matches ); 
     3192            preg_match( '#https?://(www.veoh|veoh)\.com/videos/([0-9a-zA-Z]+)(.*?)#i', $content, $matches ); 
    31873193            if ( !empty($matches) && !empty($matches[2]) ) 
    31883194                $videoid = $matches[2]; 
     
    31903196            // Must be the new format then 
    31913197            if ( empty($videoid) ) { 
    3192                 preg_match( '#http://(www.veoh|veoh)\.com/(.*?)/watch/([0-9a-zA-Z]+)(.*?)#i', $content, $matches ); 
     3198                preg_match( '#https?://(www.veoh|veoh)\.com/(.*?)/watch/([0-9a-zA-Z]+)(.*?)#i', $content, $matches ); 
    31933199                if ( !empty($matches) && !empty($matches[3]) ) 
    31943200                    $videoid = $matches[3]; 
     
    32773283 
    32783284        // If a URL was passed 
    3279         if ( 'http://' == substr( $content, 0, 7 ) ) { 
    3280             preg_match( '#http://(www.metacafe|metacafe)\.com/watch/(.*?)/(.*?)#i', $content, $matches ); 
     3285        if ( $this->is_url( $content ) ) { 
     3286            preg_match( '#https?://(www.metacafe|metacafe)\.com/watch/(.*?)/(.*?)#i', $content, $matches ); 
    32813287            if ( empty($matches) || empty($matches[2]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('Metacafe', 'vipers-video-quicktags') ) ); 
    32823288 
     
    34073413 
    34083414        // If a URL was passed 
    3409         if ( 'http://' == substr( $content, 0, 7 ) ) { 
    3410             preg_match( '#http://(www.flickr|flickr)\.com/photos/(.+)/(\d+)(.*?)#i', $content, $matches ); 
     3415        if ( $this->is_url( $content ) ) { 
     3416            preg_match( '#https?://(www.flickr|flickr)\.com/photos/(.+)/(\d+)(.*?)#i', $content, $matches ); 
    34113417            if ( empty($matches) || empty($matches[3]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('Flickr Video', 'vipers-video-quicktags') ) ); 
    34123418 
     
    34523458 
    34533459        // If a URL was passed 
    3454         if ( 'http://' == substr( $content, 0, 7 ) ) { 
    3455             preg_match( '#http://(www.ifilm|ifilm|www.spike|spike)\.com/(.+)/(\d+)#i', $content, $matches ); 
     3460        if ( $this->is_url( $content ) ) { 
     3461            preg_match( '#https?://(www.ifilm|ifilm|www.spike|spike)\.com/(.+)/(\d+)#i', $content, $matches ); 
    34563462            if ( empty($matches) || empty($matches[3]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('IFILM/Spike', 'vipers-video-quicktags') ) ); 
    34573463 
     
    34933499 
    34943500        // If a URL was passed 
    3495         if ( 'http://' == substr( $content, 0, 7 ) ) { 
    3496             preg_match( '#http://(vids.myspace|myspacetv)\.com/index\.cfm\?fuseaction=vids\.individual(.+)videoid=(\d+)#i', $content, $matches ); // Had issues with the "&" 
     3501        if ( $this->is_url( $content ) ) { 
     3502            preg_match( '#https?://(vids.myspace|myspacetv)\.com/index\.cfm\?fuseaction=vids\.individual(.+)videoid=(\d+)#i', $content, $matches ); // Had issues with the "&" 
    34973503            if ( empty($matches) || empty($matches[3]) ) return $this->error( sprintf( __('Unable to parse URL, check for correct %s format', 'vipers-video-quicktags'), __('MySpace', 'vipers-video-quicktags') ) ); 
    34983504 
Note: See TracChangeset for help on using the changeset viewer.