Changeset 54128
- Timestamp:
- 09/11/2022 10:17:04 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r54097 r54128 3220 3220 * @type string $loop The 'loop' attribute for the `<video>` element. Default empty. 3221 3221 * @type string $autoplay The 'autoplay' attribute for the `<video>` element. Default empty. 3222 * @type string $muted The 'muted' attribute for the `<video>` element. Default false. 3222 3223 * @type string $preload The 'preload' attribute for the `<video>` element. 3223 3224 * Default 'metadata'. … … 3264 3265 'loop' => '', 3265 3266 'autoplay' => '', 3267 'muted' => 'false', 3266 3268 'preload' => 'metadata', 3267 3269 'width' => 640, … … 3391 3393 'loop' => wp_validate_boolean( $atts['loop'] ), 3392 3394 'autoplay' => wp_validate_boolean( $atts['autoplay'] ), 3395 'muted' => wp_validate_boolean( $atts['muted'] ), 3393 3396 'preload' => $atts['preload'], 3394 3397 ); 3395 3398 3396 3399 // These ones should just be omitted altogether if they are blank. 3397 foreach ( array( 'poster', 'loop', 'autoplay', 'preload' ) as $a ) {3400 foreach ( array( 'poster', 'loop', 'autoplay', 'preload', 'muted' ) as $a ) { 3398 3401 if ( empty( $html_atts[ $a ] ) ) { 3399 3402 unset( $html_atts[ $a ] ); -
trunk/tests/phpunit/tests/media.php
r54097 r54128 1024 1024 /** 1025 1025 * @ticket 35367 1026 * @ticket 54788 1026 1027 * @depends test_video_shortcode_body 1027 1028 */ … … 1036 1037 $this->assertStringNotContainsString( 'loop', $actual ); 1037 1038 $this->assertStringNotContainsString( 'autoplay', $actual ); 1039 $this->assertStringNotContainsString( 'muted', $actual ); 1038 1040 $this->assertStringContainsString( 'preload="metadata"', $actual ); 1039 1041 $this->assertStringContainsString( 'width="640"', $actual ); … … 1047 1049 'loop' => true, 1048 1050 'autoplay' => true, 1051 'muted' => true, 1049 1052 'preload' => true, 1050 1053 'width' => 123, … … 1058 1061 $this->assertStringContainsString( 'loop="1"', $actual ); 1059 1062 $this->assertStringContainsString( 'autoplay="1"', $actual ); 1063 $this->assertStringContainsString( 'muted', $actual ); 1060 1064 $this->assertStringContainsString( 'preload="1"', $actual ); 1061 1065 $this->assertStringContainsString( 'width="123"', $actual );
Note: See TracChangeset
for help on using the changeset viewer.