Changeset 44438 for trunk/src/wp-includes/functions.php
- Timestamp:
- 01/07/2019 08:47:56 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r44406 r44438 2570 2570 * and some media files are commonly named with the wrong extension (.mov instead of .mp4) 2571 2571 */ 2572 2573 2572 if ( substr( $real_mime, 0, strcspn( $real_mime, '/' ) ) !== substr( $type, 0, strcspn( $type, '/' ) ) ) { 2573 $type = $ext = false; 2574 } 2575 } elseif ( 'text/plain' === $real_mime ) { 2576 // A few common file types are occasionally detected as text/plain; allow those. 2577 if ( ! in_array( $type, array( 2578 'text/plain', 2579 'text/csv', 2580 'text/richtext', 2581 'text/tsv', 2582 'text/vtt', 2583 ) ) 2584 ) { 2585 $type = $ext = false; 2586 } 2587 } elseif( 'text/rtf' === $real_mime ) { 2588 // Special casing for RTF files. 2589 if ( ! in_array( $type, array( 2590 'text/rtf', 2591 'text/plain', 2592 'application/rtf', 2593 ) ) 2594 ) { 2574 2595 $type = $ext = false; 2575 2596 }
Note: See TracChangeset
for help on using the changeset viewer.