Make WordPress Core

Changeset 48716


Ignore:
Timestamp:
08/04/2020 12:45:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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

Props hvar.
Fixes #50840.

File:
1 edited

Legend:

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

    r48649 r48716  
    26862686<div class="wp-playlist wp-<?php echo $safe_type; ?>-playlist wp-playlist-<?php echo $safe_style; ?>">
    26872687    <?php if ( 'audio' === $atts['type'] ) : ?>
    2688     <div class="wp-playlist-current-item"></div>
     2688        <div class="wp-playlist-current-item"></div>
    26892689    <?php endif ?>
    2690     <<?php echo $safe_type; ?> controls="controls" preload="none" width="
    2691                 <?php
    2692                 echo (int) $theme_width;
    2693                 ?>
    2694     "
    2695     <?php
    2696     if ( 'video' === $safe_type ) :
    2697         echo ' height="', (int) $theme_height, '"';
    2698     endif;
    2699     ?>
     2690    <<?php echo $safe_type; ?> controls="controls" preload="none" width="<?php echo (int) $theme_width; ?>"
     2691        <?php
     2692        if ( 'video' === $safe_type ) {
     2693            echo ' height="', (int) $theme_height, '"';
     2694        }
     2695        ?>
    27002696    ></<?php echo $safe_type; ?>>
    27012697    <div class="wp-playlist-next"></div>
     
    27032699    <noscript>
    27042700    <ol>
    2705     <?php
    2706     foreach ( $attachments as $att_id => $attachment ) {
    2707         printf( '<li>%s</li>', wp_get_attachment_link( $att_id ) );
    2708     }
    2709     ?>
     2701        <?php
     2702        foreach ( $attachments as $att_id => $attachment ) {
     2703            printf( '<li>%s</li>', wp_get_attachment_link( $att_id ) );
     2704        }
     2705        ?>
    27102706    </ol>
    27112707    </noscript>
     
    32083204
    32093205    $html = '';
     3206
    32103207    if ( 'mediaelement' === $library && 1 === $instance ) {
    32113208        $html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n";
    32123209    }
     3210
    32133211    $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
    32143212
    32153213    $fileurl = '';
    32163214    $source  = '<source type="%s" src="%s" />';
     3215
    32173216    foreach ( $default_types as $fallback ) {
    32183217        if ( ! empty( $atts[ $fallback ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.