Changeset 32172
- Timestamp:
- 04/20/2015 06:43:28 AM (10 years ago)
- Location:
- branches/4.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-includes/functions.php
r30674 r32172 2050 2050 2051 2051 foreach ( $mimes as $ext_preg => $mime_match ) { 2052 $ext_preg = '!\.(' . $ext_preg . ') (\?.*)?$!i';2052 $ext_preg = '!\.(' . $ext_preg . ')$!i'; 2053 2053 if ( preg_match( $ext_preg, $filename, $ext_matches ) ) { 2054 2054 $type = $mime_match; -
branches/4.1/tests/phpunit/tests/media.php
r30640 r32172 468 468 } 469 469 470 function test_wp_check_filetype() {471 $url = 'http://example.com/testFile.mp4?autoplay=true&otherstuff=false';472 $filetype = wp_check_filetype( $url );473 $expected = array(474 'ext' => 'mp4',475 'type' => 'video/mp4'476 );477 $this->assertEquals( $expected, $filetype );478 }479 470 }
Note: See TracChangeset
for help on using the changeset viewer.