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
This commit is contained in:
parent
8ec224c2f9
commit
4b4f08c7a0
|
@ -50,7 +50,7 @@ function wp_underscore_audio_template() {
|
||||||
function wp_underscore_video_template() {
|
function wp_underscore_video_template() {
|
||||||
$video_types = wp_get_video_extensions();
|
$video_types = wp_get_video_extensions();
|
||||||
?>
|
?>
|
||||||
<# var w_rule = h_rule = '', classes = [],
|
<# var w_rule = '', classes = [],
|
||||||
w, h, settings = wp.media.view.settings,
|
w, h, settings = wp.media.view.settings,
|
||||||
isYouTube = isVimeo = false;
|
isYouTube = isVimeo = false;
|
||||||
|
|
||||||
|
@ -67,16 +67,11 @@ function wp_underscore_video_template() {
|
||||||
|
|
||||||
if ( w !== data.model.width ) {
|
if ( w !== data.model.width ) {
|
||||||
h = Math.ceil( ( data.model.height * w ) / data.model.width );
|
h = Math.ceil( ( data.model.height * w ) / data.model.width );
|
||||||
} else {
|
|
||||||
h = data.model.height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( w ) {
|
if ( w ) {
|
||||||
w_rule = 'width: ' + w + 'px; ';
|
w_rule = 'width: ' + w + 'px; ';
|
||||||
}
|
}
|
||||||
if ( h ) {
|
|
||||||
h_rule = 'height: ' + h + 'px;';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( isYouTube ) {
|
if ( isYouTube ) {
|
||||||
classes.push( 'youtube-video' );
|
classes.push( 'youtube-video' );
|
||||||
|
@ -87,7 +82,7 @@ function wp_underscore_video_template() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#>
|
#>
|
||||||
<div style="{{ w_rule }}{{ h_rule }}" class="wp-video">
|
<div style="{{ w_rule }}" class="wp-video">
|
||||||
<video controls
|
<video controls
|
||||||
class="wp-video-shortcode {{ classes.join( ' ' ) }}"
|
class="wp-video-shortcode {{ classes.join( ' ' ) }}"
|
||||||
<# if ( w ) { #>width="{{ w }}"<# } #>
|
<# if ( w ) { #>width="{{ w }}"<# } #>
|
||||||
|
@ -308,17 +303,14 @@ function wp_print_media_templates() {
|
||||||
</audio>
|
</audio>
|
||||||
</div>
|
</div>
|
||||||
<# } else if ( 'video' === data.type ) {
|
<# } else if ( 'video' === data.type ) {
|
||||||
var w_rule = h_rule = '';
|
var w_rule = '';
|
||||||
if ( data.width ) {
|
if ( data.width ) {
|
||||||
w_rule = 'width: ' + data.width + 'px;';
|
w_rule = 'width: ' + data.width + 'px;';
|
||||||
} else if ( wp.media.view.settings.contentWidth ) {
|
} else if ( wp.media.view.settings.contentWidth ) {
|
||||||
w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
|
w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
|
||||||
}
|
}
|
||||||
if ( data.height ) {
|
|
||||||
h_rule = 'height: ' + data.height + 'px;';
|
|
||||||
}
|
|
||||||
#>
|
#>
|
||||||
<div style="{{ w_rule }}{{ h_rule }}" class="wp-media-wrapper wp-video">
|
<div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
|
||||||
<video controls="controls" class="wp-video-shortcode" preload="metadata"
|
<video controls="controls" class="wp-video-shortcode" preload="metadata"
|
||||||
<# if ( data.width ) { #>width="{{ data.width }}"<# } #>
|
<# if ( data.width ) { #>width="{{ data.width }}"<# } #>
|
||||||
<# if ( data.height ) { #>height="{{ data.height }}"<# } #>
|
<# if ( data.height ) { #>height="{{ data.height }}"<# } #>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34047';
|
$wp_version = '4.4-alpha-34048';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue