Skip to content

Commit 82905a1

Browse files
committed
fix overuse of default mime icon and re-shuffle mp4/m4a file type matches. Props andy. see WordPress#5911
git-svn-id: https://develop.svn.wordpress.org/trunk@7045 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5500996 commit 82905a1

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

wp-includes/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,12 +1188,12 @@ function wp_check_filetype( $filename, $mimes = null ) {
11881188
'asf|asx|wax|wmv|wmx' => 'video/asf',
11891189
'avi' => 'video/avi',
11901190
'mov|qt' => 'video/quicktime',
1191-
'mpeg|mpg|mpe' => 'video/mpeg',
1191+
'mpeg|mpg|mpe|mp4' => 'video/mpeg',
11921192
'txt|c|cc|h' => 'text/plain',
11931193
'rtx' => 'text/richtext',
11941194
'css' => 'text/css',
11951195
'htm|html' => 'text/html',
1196-
'mp3|mp4' => 'audio/mpeg',
1196+
'mp3|m4a' => 'audio/mpeg',
11971197
'ra|ram' => 'audio/x-realaudio',
11981198
'wav' => 'audio/wav',
11991199
'ogg' => 'audio/ogg',

wp-includes/post.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,9 +2390,8 @@ function wp_mime_type_icon( $mime = 0 ) {
23902390
$post_mimes[] = str_replace('/', '_', $mime);
23912391
}
23922392

2393-
$post_mimes[] = 'default';
2394-
23952393
$matches = wp_match_mime_types(array_keys($types), $post_mimes);
2394+
$matches['default'] = array('default');
23962395

23972396
foreach ( $matches as $match => $wilds ) {
23982397
if ( isset($types[$wilds[0]])) {

0 commit comments

Comments
 (0)