Changeset 34048 for trunk/src/wp-includes/media-template.php
- Timestamp:
- 09/11/2015 06:26:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media-template.php
r33998 r34048 51 51 $video_types = wp_get_video_extensions(); 52 52 ?> 53 <# var w_rule = h_rule ='', classes = [],53 <# var w_rule = '', classes = [], 54 54 w, h, settings = wp.media.view.settings, 55 55 isYouTube = isVimeo = false; … … 68 68 if ( w !== data.model.width ) { 69 69 h = Math.ceil( ( data.model.height * w ) / data.model.width ); 70 } else {71 h = data.model.height;72 70 } 73 71 … … 75 73 w_rule = 'width: ' + w + 'px; '; 76 74 } 77 if ( h ) {78 h_rule = 'height: ' + h + 'px;';79 }80 75 81 76 if ( isYouTube ) { … … 88 83 89 84 #> 90 <div style="{{ w_rule }} {{ h_rule }}" class="wp-video">85 <div style="{{ w_rule }}" class="wp-video"> 91 86 <video controls 92 87 class="wp-video-shortcode {{ classes.join( ' ' ) }}" … … 309 304 </div> 310 305 <# } else if ( 'video' === data.type ) { 311 var w_rule = h_rule ='';306 var w_rule = ''; 312 307 if ( data.width ) { 313 308 w_rule = 'width: ' + data.width + 'px;'; … … 315 310 w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;'; 316 311 } 317 if ( data.height ) {318 h_rule = 'height: ' + data.height + 'px;';319 }320 312 #> 321 <div style="{{ w_rule }} {{ h_rule }}" class="wp-media-wrapper wp-video">313 <div style="{{ w_rule }}" class="wp-media-wrapper wp-video"> 322 314 <video controls="controls" class="wp-video-shortcode" preload="metadata" 323 315 <# if ( data.width ) { #>width="{{ data.width }}"<# } #>
Note: See TracChangeset
for help on using the changeset viewer.