X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/dc1231b7312fbdca99e9e887cc2bb35a28f85cdc..refs/tags/wordpress-4.4:/wp-includes/media-template.php diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index 8edeb62e..8d7c758c 100644 --- a/wp-includes/media-template.php +++ b/wp-includes/media-template.php @@ -50,7 +50,7 @@ function wp_underscore_audio_template() { function wp_underscore_video_template() { $video_types = wp_get_video_extensions(); ?> -<# var w_rule = h_rule = '', classes = [], +<# var w_rule = '', classes = [], w, h, settings = wp.media.view.settings, isYouTube = isVimeo = false; @@ -69,14 +69,11 @@ function wp_underscore_video_template() { h = Math.ceil( ( data.model.height * w ) / data.model.width ); } else { h = data.model.height; - } + } if ( w ) { w_rule = 'width: ' + w + 'px; '; } - if ( h ) { - h_rule = 'height: ' + h + 'px;'; - } if ( isYouTube ) { classes.push( 'youtube-video' ); @@ -87,7 +84,7 @@ function wp_underscore_video_template() { } #> -
+