Media: Remove extra space from the `width` attribute in `wp_playlist_shortcode()` output.

Props hvar.
Fixes #50840.
Built from https://develop.svn.wordpress.org/trunk@48716


git-svn-id: http://core.svn.wordpress.org/trunk@48478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-08-04 12:47:06 +00:00
parent e2c8e2fa5a
commit b1c6077591
2 changed files with 16 additions and 17 deletions

View File

@ -2687,15 +2687,11 @@ function wp_playlist_shortcode( $attr ) {
<?php if ( 'audio' === $atts['type'] ) : ?> <?php if ( 'audio' === $atts['type'] ) : ?>
<div class="wp-playlist-current-item"></div> <div class="wp-playlist-current-item"></div>
<?php endif ?> <?php endif ?>
<<?php echo $safe_type; ?> controls="controls" preload="none" width=" <<?php echo $safe_type; ?> controls="controls" preload="none" width="<?php echo (int) $theme_width; ?>"
<?php <?php
echo (int) $theme_width; if ( 'video' === $safe_type ) {
?>
"
<?php
if ( 'video' === $safe_type ) :
echo ' height="', (int) $theme_height, '"'; echo ' height="', (int) $theme_height, '"';
endif; }
?> ?>
></<?php echo $safe_type; ?>> ></<?php echo $safe_type; ?>>
<div class="wp-playlist-next"></div> <div class="wp-playlist-next"></div>
@ -3207,13 +3203,16 @@ function wp_video_shortcode( $attr, $content = '' ) {
} }
$html = ''; $html = '';
if ( 'mediaelement' === $library && 1 === $instance ) { if ( 'mediaelement' === $library && 1 === $instance ) {
$html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n"; $html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n";
} }
$html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) ); $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
$fileurl = ''; $fileurl = '';
$source = '<source type="%s" src="%s" />'; $source = '<source type="%s" src="%s" />';
foreach ( $default_types as $fallback ) { foreach ( $default_types as $fallback ) {
if ( ! empty( $atts[ $fallback ] ) ) { if ( ! empty( $atts[ $fallback ] ) ) {
if ( empty( $fileurl ) ) { if ( empty( $fileurl ) ) {

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.6-alpha-48715'; $wp_version = '5.6-alpha-48716';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.