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:
Scott Taylor 2015-09-11 18:27:25 +00:00
parent 8ec224c2f9
commit 4b4f08c7a0
2 changed files with 5 additions and 13 deletions

View File

@ -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() {
}
#>
<div style="{{ w_rule }}{{ h_rule }}" class="wp-video">
<div style="{{ w_rule }}" class="wp-video">
<video controls
class="wp-video-shortcode {{ classes.join( ' ' ) }}"
<# if ( w ) { #>width="{{ w }}"<# } #>
@ -308,17 +303,14 @@ function wp_print_media_templates() {
</audio>
</div>
<# } 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;';
}
#>
<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"
<# if ( data.width ) { #>width="{{ data.width }}"<# } #>
<# if ( data.height ) { #>height="{{ data.height }}"<# } #>

View File

@ -4,7 +4,7 @@
*
* @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.