From 4b4f08c7a076e3f879ca8b064a6e4b9a7d5e8195 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 11 Sep 2015 18:27:25 +0000 Subject: [PATCH] In [30082], hardcoded heights were removed on the front end for videos rendered via shortcode. These values were not removed from the admin, which was an oversight. See #33798. Built from https://develop.svn.wordpress.org/trunk@34048 git-svn-id: http://core.svn.wordpress.org/trunk@34016 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media-template.php | 16 ++++------------ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index d633e15949..ea758efe2d 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; @@ -67,16 +67,11 @@ function wp_underscore_video_template() { if ( w !== data.model.width ) { 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 +82,7 @@ function wp_underscore_video_template() { } #> -
+
<# } else if ( 'video' === data.type ) { - var w_rule = h_rule = ''; + var w_rule = ''; if ( data.width ) { w_rule = 'width: ' + data.width + 'px;'; } else if ( wp.media.view.settings.contentWidth ) { w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;'; } - if ( data.height ) { - h_rule = 'height: ' + data.height + 'px;'; - } #> -
+