Make WordPress Core


Ignore:
Timestamp:
08/07/2014 05:52:03 AM (11 years ago)
Author:
wonderboymusic
Message:

MediaElement upgrade: cleanup for generated markup for videos.

See #29110.

File:
1 edited

Legend:

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

    r29428 r29429  
    18751875    $html .= '</video>';
    18761876
    1877     $output = sprintf( '<div style="width: %dpx; max-width: 100%%;" class="wp-video">%s</div>', $atts['width'], $html );
     1877    $width_rule = $height_rule = '';
     1878    if ( ! empty( $atts['width'] ) ) {
     1879        $width_rule = sprintf( ' width: %dpx;', $atts['width'] );
     1880    }
     1881    if ( ! empty( $atts['height'] ) ) {
     1882        $height_rule = sprintf( ' height: %dpx;', $atts['height'] );
     1883    }
     1884    $output = sprintf( '<div style="max-width: 100%%;%s%s" class="wp-video">%s</div>', $width_rule, $height_rule, $html );
    18781885
    18791886    /**
Note: See TracChangeset for help on using the changeset viewer.