Changeset 901424
- Timestamp:
- 04/24/2014 03:58:34 AM (12 years ago)
- Location:
- fluid-video-embeds/trunk
- Files:
-
- 4 edited
-
fluid-video-embeds.php (modified) (8 diffs)
-
lib/constants.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
views/options.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fluid-video-embeds/trunk/fluid-video-embeds.php
r887847 r901424 5 5 Description: Makes your YouTube and Vimeo auto-embeds fluid/full width. 6 6 Author: jamie3d 7 Version: 1.2. 37 Version: 1.2.4 8 8 Author URI: http://jamie3d.com 9 9 */ … … 33 33 'fve_alignment' => 'left', 34 34 'fve_responsive_hyperlink' => false, 35 'fve_force_youtube_16_9' => false, 35 36 'fve_responsive_hyperlink_mq' => '@media screen and (max-device-width: 768px)', 36 37 ); … … 56 57 if ( empty( $this->fve_responsive_hyperlink_mq ) ) { 57 58 $this->fve_responsive_hyperlink_mq = $this->defaults['fve_responsive_hyperlink_mq']; 59 } 60 61 // Autoload the Responsive Hyperlink options 62 $this->fve_force_youtube_16_9 = (bool) $this->get_option( 'fve_force_youtube_16_9' ); 63 if ( empty( $this->fve_force_youtube_16_9 ) ) { 64 $this->fve_force_youtube_16_9 = $this->defaults['fve_force_youtube_16_9']; 58 65 } 59 66 … … 369 376 */ 370 377 $wrapper_padding = '75%'; 371 if( $this->meta['aspect'] == 'widescreen' ) {378 if( isset( $this->meta['aspect'] ) && $this->meta['aspect'] == 'widescreen' ) { 372 379 $wrapper_padding = '56.25%'; 373 380 } … … 375 382 $iframe_url = 'http://www.youtube.com/embed/' . $this->meta['id'] . '?wmode=transparent&modestbranding=1&autohide=1&showinfo=0&rel=0'; 376 383 $permalink = 'http://www.youtube.com/watch?v=' . $this->meta['id']; 377 $thumbnail = $this->meta['full_image'];384 $thumbnail = isset( $this->meta['full_image'] ) ? $this->meta['full_image'] : ''; 378 385 break; 379 386 case 'vimeo': … … 382 389 $iframe_url = 'http://player.vimeo.com/video/' . $this->meta['id'] . '?portrait=0&byline=0&title=0'; 383 390 $permalink = 'http://vimeo.com/' . $this->meta['id']; 384 $thumbnail = $this->meta['full_image'];391 $thumbnail = isset( $this->meta['full_image'] ) ? $this->meta['full_image'] : ''; 385 392 break; 386 393 } … … 629 636 switch( $service ){ 630 637 case 'youtube': 638 639 if( $response_json->pageInfo->totalResults == 0 ) break; 640 631 641 $video_meta['title'] = $response_json->items[0]->snippet->title; 632 642 $video_meta['permalink'] = 'http://www.youtube.com/watch?v=' . $video_id; … … 638 648 if( isset( $response_json->items[0]->contentDetails->definition ) ) { 639 649 $video_meta['aspect'] = ( $response_json->items[0]->contentDetails->definition === 'hd' ) ? 'widescreen' : 'standard'; 650 } 651 652 // Allow the widescreen option to be overriden 653 if( $this->fve_force_youtube_16_9 ) { 654 $video_meta['aspect'] = 'widescreen'; 640 655 } 641 656 $video_meta['duration'] = $response_json->items[0]->contentDetails->duration; -
fluid-video-embeds/trunk/lib/constants.php
r887847 r901424 7 7 8 8 // The current version of this plugin 9 if( !defined( 'FLUID_VIDEO_EMBEDS_VERSION' ) ) define( 'FLUID_VIDEO_EMBEDS_VERSION', '1.2. 3' );9 if( !defined( 'FLUID_VIDEO_EMBEDS_VERSION' ) ) define( 'FLUID_VIDEO_EMBEDS_VERSION', '1.2.4' ); 10 10 11 11 // The cache prefix -
fluid-video-embeds/trunk/readme.txt
r887847 r901424 63 63 64 64 == Changelog == 65 = 1.2.4 = 66 * Fixes a few PHP notices due to empty API results. 67 * Adds a new YouTube option that allows you to force the 16:9 ratio. 68 65 69 = 1.2.3 = 66 70 * Upgraded to version 3 of the YouTube API. … … 100 104 101 105 == Upgrade Notice == 106 = 1.2.4 = 107 * Adds a new YouTube option that allows you to force the 16:9 ratio. 108 102 109 = 1.2.3 = 103 110 * Fixes bug with 4:3 YouTube aspect ratio (SD) videos. -
fluid-video-embeds/trunk/views/options.php
r887847 r901424 33 33 </div> 34 34 </li> 35 <li class="fve_youtube_options settings-group"> 36 <h3><?php _e( 'YouTube Options', $namespace ); ?></h3> 37 <input id="fve_force_youtube_16_9" name="data[fve_force_youtube_16_9]" type="checkbox" size="3" value="yes"<?php echo ( $this->fve_force_youtube_16_9 == true ) ? ' checked="checked"' : ''; ?>> 38 <label for="fve_force_youtube_16_9"><?php _e( 'Force 16:9 aspect Ratio?', $namespace ); ?></label> 39 40 <p class="description"><?php _e( 'Disables aspect ratio detection for YouTube.', $namespace ); ?></p> 41 <p class="description"><?php _e( 'Although YouTube videos uploaded at a 4:3 ratio look better in a 4:3 player, some people have YouTube videos that are 480p but 16:9. This option makes 480p 16:9 videos look better.', $namespace ); ?></p> 42 </li> 35 43 <li class="submit-row"> 36 44 <input type="submit" name="submit" class="button-primary" value="<?php _e( "Save Changes", $namespace ) ?>" />
Note: See TracChangeset
for help on using the changeset viewer.