Make WordPress Core


Ignore:
Timestamp:
09/11/2015 06:26:53 PM (9 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r33998 r34048  
    5151    $video_types = wp_get_video_extensions();
    5252?>
    53 <#  var w_rule = h_rule = '', classes = [],
     53<#  var w_rule = '', classes = [],
    5454        w, h, settings = wp.media.view.settings,
    5555        isYouTube = isVimeo = false;
     
    6868    if ( w !== data.model.width ) {
    6969        h = Math.ceil( ( data.model.height * w ) / data.model.width );
    70     } else {
    71         h = data.model.height;
    7270    }
    7371
     
    7573        w_rule = 'width: ' + w + 'px; ';
    7674    }
    77     if ( h ) {
    78         h_rule = 'height: ' + h + 'px;';
    79     }
    8075
    8176    if ( isYouTube ) {
     
    8883
    8984#>
    90 <div style="{{ w_rule }}{{ h_rule }}" class="wp-video">
     85<div style="{{ w_rule }}" class="wp-video">
    9186<video controls
    9287    class="wp-video-shortcode {{ classes.join( ' ' ) }}"
     
    309304                </div>
    310305                <# } else if ( 'video' === data.type ) {
    311                     var w_rule = h_rule = '';
     306                    var w_rule = '';
    312307                    if ( data.width ) {
    313308                        w_rule = 'width: ' + data.width + 'px;';
     
    315310                        w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
    316311                    }
    317                     if ( data.height ) {
    318                         h_rule = 'height: ' + data.height + 'px;';
    319                     }
    320312                #>
    321                 <div style="{{ w_rule }}{{ h_rule }}" class="wp-media-wrapper wp-video">
     313                <div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
    322314                    <video controls="controls" class="wp-video-shortcode" preload="metadata"
    323315                        <# if ( data.width ) { #>width="{{ data.width }}"<# } #>
Note: See TracChangeset for help on using the changeset viewer.