mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Don't hardcode height for videos - this was a workaround for MediaElement internals causing problems. Responsive videos now work properly and don't cause extra whitespace.
Fixes MediaElement by hand in the interim: https://github.com/johndyer/mediaelement/pull/1337 Video playlists were completely broken by this. Fixes #30078. git-svn-id: https://develop.svn.wordpress.org/trunk@30082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1855,14 +1855,11 @@ function wp_video_shortcode( $attr, $content = '' ) {
|
||||
}
|
||||
$html .= '</video>';
|
||||
|
||||
$width_rule = $height_rule = '';
|
||||
$width_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="%s%s" class="wp-video">%s</div>', $width_rule, $height_rule, $html );
|
||||
$output = sprintf( '<div style="%s" class="wp-video">%s</div>', $width_rule, $html );
|
||||
|
||||
/**
|
||||
* Filter the output of the video shortcode.
|
||||
|
||||
Reference in New Issue
Block a user