MediaElement upgrade: cleanup for generated markup for videos.

See #29110.

Built from https://develop.svn.wordpress.org/trunk@29429


git-svn-id: http://core.svn.wordpress.org/trunk@29207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2014-08-07 05:53:15 +00:00
parent afb0b3e4ef
commit b938bfb7d5
3 changed files with 38 additions and 8 deletions

View File

@@ -1874,7 +1874,14 @@ function wp_video_shortcode( $attr, $content = '' ) {
}
$html .= '</video>';
$output = sprintf( '<div style="width: %dpx; max-width: 100%%;" class="wp-video">%s</div>', $atts['width'], $html );
$width_rule = $height_rule = '';
if ( ! empty( $atts['width'] ) ) {
$width_rule = sprintf( ' width: %dpx;', $atts['width'] );
}
if ( ! empty( $atts['height'] ) ) {
$height_rule = sprintf( ' height: %dpx;', $atts['height'] );
}
$output = sprintf( '<div style="max-width: 100%%;%s%s" class="wp-video">%s</div>', $width_rule, $height_rule, $html );
/**
* Filter the output of the video shortcode.