Ticket #54788: 54788-2.diff
File 54788-2.diff, 1.7 KB (added by , 14 months ago) |
---|
-
src/wp-includes/media.php
3156 3156 * WordPress mp4s in a post. 3157 3157 * 3158 3158 * @since 3.6.0 3159 * @since 6.1.0 Add support for the muted attribute. 3159 3160 * 3160 3161 * @global int $content_width 3161 3162 * … … 3168 3169 * @type string $poster The 'poster' attribute for the `<video>` element. Default empty. 3169 3170 * @type string $loop The 'loop' attribute for the `<video>` element. Default empty. 3170 3171 * @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. 3171 3173 * @type string $preload The 'preload' attribute for the `<video>` element. 3172 3174 * Default 'metadata'. 3173 3175 * @type string $class The 'class' attribute for the `<video>` element. … … 3212 3214 'poster' => '', 3213 3215 'loop' => '', 3214 3216 'autoplay' => '', 3217 'muted' => 'false', 3215 3218 'preload' => 'metadata', 3216 3219 'width' => 640, 3217 3220 'height' => 360, … … 3339 3342 'poster' => esc_url( $atts['poster'] ), 3340 3343 'loop' => wp_validate_boolean( $atts['loop'] ), 3341 3344 'autoplay' => wp_validate_boolean( $atts['autoplay'] ), 3345 'muted' => wp_validate_boolean( $atts['muted'] ), 3342 3346 'preload' => $atts['preload'], 3343 3347 ); 3344 3348 3345 3349 // 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 ) { 3347 3351 if ( empty( $html_atts[ $a ] ) ) { 3348 3352 unset( $html_atts[ $a ] ); 3349 3353 }