mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Video: use auto
instead of actual height for the responsive wrapper in generated markup.
See #29110. Built from https://develop.svn.wordpress.org/trunk@29430 git-svn-id: http://core.svn.wordpress.org/trunk@29208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b938bfb7d5
commit
b053fe2e04
@ -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">
|
||||
|
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user