Video: use `auto` instead of actual height for the responsive wrapper in generated markup.

See #29110.


git-svn-id: https://develop.svn.wordpress.org/trunk@29430 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-08-07 06:19:29 +00:00
parent 0b7342e906
commit 7f000f2fdd
2 changed files with 4 additions and 2 deletions

View File

@ -71,7 +71,7 @@ function wp_underscore_video_template() {
}
if ( h ) {
h_rule = ' height: ' + h + 'px;';
h_rule = ' height: auto';
}
#>
<div style="max-width: 100%;{{ w_rule }}{{ h_rule }}">
@ -297,7 +297,7 @@ function wp_print_media_templates() {
w_rule = ' width: ' + wp.media.view.settings.contentWidth + 'px;';
}
if ( data.height ) {
h_rule = ' height: ' + data.height + 'px;';
h_rule = ' height: auto';
}
#>
<div style="max-width: 100%; {{ w_rule }}{{ h_rule }}" class="wp-media-wrapper">

View File

@ -1880,6 +1880,8 @@ function wp_video_shortcode( $attr, $content = '' ) {
}
if ( ! empty( $atts['height'] ) ) {
$height_rule = sprintf( ' height: %dpx;', $atts['height'] );
} else {
$height_rule = ' height: auto;';
}
$output = sprintf( '<div style="max-width: 100%%;%s%s" class="wp-video">%s</div>', $width_rule, $height_rule, $html );