diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 1ca29cf864..d411b9ebe2 100644
|
a
|
b
|
function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { |
| 2735 | 2735 | $type = false; |
| 2736 | 2736 | $ext = false; |
| 2737 | 2737 | } |
| | 2738 | } elseif ( 'text/html' === $real_mime ) { |
| | 2739 | // Subrip text files can optionally contain HTML tags |
| | 2740 | if ( 'srt' !== $ext ) { |
| | 2741 | $type = false; |
| | 2742 | $ext = false; |
| | 2743 | } |
| 2738 | 2744 | } elseif ( 'text/rtf' === $real_mime ) { |
| 2739 | 2745 | // Special casing for RTF files. |
| 2740 | 2746 | if ( ! in_array( |
diff --git a/tests/phpunit/data/uploads/test.srt b/tests/phpunit/data/uploads/test.srt
new file mode 100644
index 0000000000..a531b9c5a8
|
-
|
+
|
|
| | 1 | 0 |
| | 2 | 00:00:00,1 --> 00:00:04 |
| | 3 | HTML5 <video> and <audio> was supposed to be awesome, powerful, and fun. |
| | 4 | |
| | 5 | 1 |
| | 6 | 00:00:04 --> 00:00:07 |
| | 7 | But browser vendors couldn't agree on a codec |
| | 8 | |
| | 9 | 2 |
| | 10 | 00:00:07 --> 00:00:10 |
| | 11 | and older browsers don't support <video> at all. |
| | 12 | |
| | 13 | 3 |
| | 14 | 00:00:10 --> 00:00:12 |
| | 15 | This means <video src="myfile.mp4" /> doesn't work ... |
| | 16 | |
| | 17 | 4 |
| | 18 | 00:00:12 --> 00:00:14 |
| | 19 | until now. |
| | 20 | |
| | 21 | 5 |
| | 22 | 00:00:14 --> 00:00:18 |
| | 23 | Introducing MediaElement.js, an HTML5 <video> and <audio> player |
| | 24 | |
| | 25 | 6 |
| | 26 | 00:00:18 --> 00:00:21 |
| | 27 | that looks and works the same in every browser (even iPhone and Android). |
| | 28 | |
| | 29 | 7 |
| | 30 | 00:00:21 --> 00:00:24 |
| | 31 | For older browsers, it has custom Flash and Silverlight plugins |
| | 32 | |
| | 33 | 8 |
| | 34 | 00:00:24 --> 00:00:27 |
| | 35 | that fully replicate the HTML5 MediaElement API |
| | 36 | |
| | 37 | 9 |
| | 38 | 00:00:27 --> 00:00:30 |
| | 39 | so you can build a consistent control UI using just HTML and CSS. |
| | 40 | |
| | 41 | 10 |
| | 42 | 00:00:30 --> 00:00:33 |
| | 43 | MediaElement.js even supports newer standards |
| | 44 | |
| | 45 | 11 |
| | 46 | 00:00:33 --> 00:00:36 |
| | 47 | like the <track> element that enables the subtitles you're reading right now. |
| | 48 | |
| | 49 | 12 |
| | 50 | 00:00:36 --> 00:00:39 |
| | 51 | The subtitles can even be translated into any language using Google's Translation API. |
| | 52 | |
| | 53 | 13 |
| | 54 | 00:00:39 --> 00:00:42 |
| | 55 | As a bonus, the Flash and Silverlight fallbacks allow you to use FLV and WMV files. |
| | 56 | |
| | 57 | 14 |
| | 58 | 00:00:42 --> 00:00:45 |
| | 59 | Hope you like it. |
| | 60 | |
| | 61 | Come follow me at <a href="http://twitter.com/johndyer">twitter.com/johndyer</a> |
| | 62 | No newline at end of file |
diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php
index 2191af7ddb..26bb59738a 100644
|
a
|
b
|
public function _wp_check_filetype_and_ext_data() { |
| 1384 | 1384 | 'proper_filename' => false, |
| 1385 | 1385 | ), |
| 1386 | 1386 | ), |
| | 1387 | array( |
| | 1388 | DIR_TESTDATA . '/uploads/test.srt', |
| | 1389 | 'test.srt', |
| | 1390 | array( |
| | 1391 | 'ext' => 'srt', |
| | 1392 | 'type' => 'text/plain', |
| | 1393 | 'proper_filename' => false, |
| | 1394 | ), |
| | 1395 | ), |
| | 1396 | |
| 1387 | 1397 | ) |
| 1388 | 1398 | ); |
| 1389 | 1399 | } |