Make WordPress Core

Ticket #54788: 54788-2.diff

File 54788-2.diff, 1.7 KB (added by antpb, 14 months ago)
  • src/wp-includes/media.php

     
    31563156 * WordPress mp4s in a post.
    31573157 *
    31583158 * @since 3.6.0
     3159 * @since 6.1.0 Add support for the muted attribute.
    31593160 *
    31603161 * @global int $content_width
    31613162 *
     
    31683169 *     @type string $poster   The 'poster' attribute for the `<video>` element. Default empty.
    31693170 *     @type string $loop     The 'loop' attribute for the `<video>` element. Default empty.
    31703171 *     @type string $autoplay The 'autoplay' attribute for the `<video>` element. Default empty.
     3172 *     @type string $muted    The 'muted' attribute for the `<video>` element. Default false.
    31713173 *     @type string $preload  The 'preload' attribute for the `<video>` element.
    31723174 *                            Default 'metadata'.
    31733175 *     @type string $class    The 'class' attribute for the `<video>` element.
     
    32123214                'poster'   => '',
    32133215                'loop'     => '',
    32143216                'autoplay' => '',
     3217                'muted'    => 'false',
    32153218                'preload'  => 'metadata',
    32163219                'width'    => 640,
    32173220                'height'   => 360,
     
    33393342                'poster'   => esc_url( $atts['poster'] ),
    33403343                'loop'     => wp_validate_boolean( $atts['loop'] ),
    33413344                'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
     3345                'muted'    => wp_validate_boolean( $atts['muted'] ),
    33423346                'preload'  => $atts['preload'],
    33433347        );
    33443348
    33453349        // These ones should just be omitted altogether if they are blank.
    3346         foreach ( array( 'poster', 'loop', 'autoplay', 'preload' ) as $a ) {
     3350        foreach ( array( 'poster', 'loop', 'autoplay', 'preload', 'muted' ) as $a ) {
    33473351                if ( empty( $html_atts[ $a ] ) ) {
    33483352                        unset( $html_atts[ $a ] );
    33493353                }